File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,6 +316,9 @@ static class LanguageBundle {
316316
317317 void read (File additions ) {
318318 String [] lines = PApplet .loadStrings (additions );
319+ if (lines == null ) {
320+ throw new NullPointerException ("File not found:\n " + additions .getAbsolutePath ());
321+ }
319322 //for (String line : lines) {
320323 for (int i = 0 ; i < lines .length ; i ++) {
321324 String line = lines [i ];
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ static public File getContentFile(String name) {
288288 // Decode URL
289289 String decodedPath ;
290290 try {
291- decodedPath = pathURL .toURI ().getPath ();
291+ decodedPath = pathURL .toURI ().getSchemeSpecificPart ();
292292 } catch (URISyntaxException e ) {
293293 e .printStackTrace ();
294294 return null ;
Original file line number Diff line number Diff line change @@ -7413,7 +7413,7 @@ static protected String calcSketchPath() {
74137413 URL jarURL =
74147414 PApplet .class .getProtectionDomain ().getCodeSource ().getLocation ();
74157415 // Decode URL
7416- String jarPath = jarURL .toURI ().getPath ();
7416+ String jarPath = jarURL .toURI ().getSchemeSpecificPart ();
74177417
74187418 // Workaround for bug in Java for OS X from Oracle (7u51)
74197419 // https://github.com/processing/processing/issues/2181
You can’t perform that action at this time.
0 commit comments