Commits

Jan Lahoda committed 24ff9bf

PositionRef.getLine returns 0-based line numbers, while the warning format mandates 1-based line numbers.

Comments (0)

Files changed (2)

cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Main.java

 
         b.append('^');
 
-        System.out.println(FileUtil.getFileDisplayName(error.getFile()) + ":" + lineNumber + ": warning: " + error.getDescription());
+        System.out.println(FileUtil.getFileDisplayName(error.getFile()) + ":" + (lineNumber + 1) + ": warning: " + error.getDescription());
         System.out.println(line);
         System.out.println(b);
     }

cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/MainTest.java

             "}\n";
 
         doRunCompiler(golden,
-                      "${workdir}/src/test/Test.java:3: warning: Usage of .size() == 0 can be replaced with .isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:4: warning: Usage of .size() == 0 can be replaced with .isEmpty()\n" +
                       "        boolean b1 = c.size() == 0;\n" +
                       "                     ^\n" +
-                      "${workdir}/src/test/Test.java:4: warning: Usage of .size() == 0 can be replaced with .isEmpty()\n" +
+                      "${workdir}/src/test/Test.java:5: warning: Usage of .size() == 0 can be replaced with .isEmpty()\n" +
                       "\tboolean b2 = c.size() == 0;\n" +
                       "\t             ^\n",
                       null,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.