Menu

#3 PoEditorMain - null pointer exception

v1.0 (example)
open
nobody
None
1
2013-06-19
2013-06-19
No

Running the jar from the downloads does not work.
Running with the command line "java -jar Multi-Po-Editv1.5.2.jar" prints the stacktrace

Exception in thread "main" java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:542)
at multipoeditor.POHash.createTable(POHash.java:73)
at multipoeditor.POHash.<init>(POHash.java:44)
at multipoeditor.POEditMain.<init>(POEditMain.java:309)
at multipoeditor.POEditMain.main(POEditMain.java:134)

Upon further investigation (downloading the source code and running main) line 73 of PoHash.java is:

comments.put(text.get(i++).substring(6), comment);

With IDE debugging showing local variables, comment was null. I simply changed line 26 of PoHash.java:

String comment; >>> String comment = "";

And Multi-Po-Edit work.

Discussion


Log in to post a comment.