Changeset 17660 in josm


Ignore:
Timestamp:
2021-03-24T23:10:58+01:00 (3 months ago)
Author:
Don-vip
Message:

see #18737 - add JNLP robustness in order to be able to start unsigned JAR with OpenWebStart

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/RestartAction.java

    r17396 r17660  
    142142
    143143    private static boolean isExecutableFile(File f) {
    144         return f.isFile() && f.canExecute();
     144        try {
     145            return f.isFile() && f.canExecute();
     146        } catch (SecurityException e) {
     147            Logging.error(e);
     148            return false;
     149        }
    145150    }
    146151
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r17182 r17660  
    397397            System.err.println("Unable to set locale providers: " + e.getMessage());
    398398        }
    399         return System.setProperty("java.locale.providers", "JRE,CLDR");
     399        try {
     400            return System.setProperty("java.locale.providers", "JRE,CLDR");
     401        } catch (SecurityException e) {
     402            // Don't call Logging class, it may not be fully initialized yet
     403            System.err.println("Unable to set locale providers: " + e.getMessage());
     404            return null;
     405        }
    400406    }
    401407
  • trunk/src/org/openstreetmap/josm/tools/Logging.java

    r16905 r17660  
    120120                // output stream is set to
    121121                this.outputStreamMemo = outputStream;
    122                 super.setOutputStream(outputStream);
     122                try {
     123                    super.setOutputStream(outputStream);
     124                } catch (SecurityException e) {
     125                    System.err.println("Unable to set logging output stream: " + e.getMessage());
     126                }
    123127            }
    124128        }
Note: See TracChangeset for help on using the changeset viewer.