Code: Select all
java -jar ***.jar Aiwa-CX.rmduCode: Select all
...
java.lang.NullPointerException: Cannot invoke "java.io.File.getAbsolutePath()" because "file" is null
at com.hifiremote.jp1.PropertyFile.setProperty(PropertyFile.java:112)
at com.hifiremote.jp1.Preferences.setUpgradePath(Preferences.java:245)
at com.hifiremote.jp1.KeyMapMaster.loadUpgrade(KeyMapMaster.java:1479)
at com.hifiremote.jp1.RemoteMaster$1.run(RemoteMaster.java:506)
...
One possible fix would be to replace all getParentFile() by getCanonicFile.getParent(), but there are several of those. A more elegant fix appears to be to canonicalize the file name just when read, i.e.,
Code: Select all
Index: src/main/java/com/hifiremote/jp1/RemoteMaster.java
===================================================================
--- src/main/java/com/hifiremote/jp1/RemoteMaster.java (revision 2082)
+++ src/main/java/com/hifiremote/jp1/RemoteMaster.java (working copy)
@@ -358,7 +358,7 @@
File fileToOpen = null;
if ( commandLineArgs.fileName != null )
{
- fileToOpen = new File( commandLineArgs.fileName );
+ fileToOpen = new File( commandLineArgs.fileName ).getCanonicalFile();
if ( hasEnding( commandLineArgs.fileName, upgradeEndings, upgradeImportEndings ) )
{
if ( commandLineArgs.launchRMIR || commandLineArgs.launchRMPB )