1. Jan Lahoda
  2. jackpot30

Commits

Jan Lahoda  committed 2405e0d

Preventing NPE.

  • Participants
  • Parent commits d8471a1
  • Branches default

Comments (0)

Files changed (1)

File api/src/org/netbeans/modules/jackpot30/spi/JavaFix.java

View file
  • Ignore whitespace
 
                     @Override
                     public Void visitExpressionStatement(ExpressionStatementTree node, Void p) {
-                        String name = Utilities.getWildcardTreeName(node).toString();
+                        CharSequence name = Utilities.getWildcardTreeName(node);
 
                         if (name != null) {
-                            TreePath tp = parameters.get(name);
+                            TreePath tp = parameters.get(name.toString());
 
                             if (tp != null) {
                                 wc.rewrite(node, tp.getLeaf());