mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix StringIndexOutOfBoundsException caused by import statements with no dots (bug #1145)
This commit is contained in:
@@ -1411,7 +1411,9 @@ public class Sketch {
|
||||
importedLibraries = new ArrayList<File>();
|
||||
for (String item : preprocessor.getExtraImports()) {
|
||||
// remove things up to the last dot
|
||||
String entry = item.substring(0, item.lastIndexOf('.'));
|
||||
int dot = item.lastIndexOf('.');
|
||||
// http://dev.processing.org/bugs/show_bug.cgi?id=1145
|
||||
String entry = (dot == -1) ? item : item.substring(0, dot);
|
||||
File libFolder = (File) Base.importToLibraryTable.get(entry);
|
||||
|
||||
if (libFolder != null) {
|
||||
|
||||
+6
-3
@@ -30,11 +30,14 @@ X Got NoClassDefFoundError exception when accessing quicktime API
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1128
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1129
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1130
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1138
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1140
|
||||
X not using present mode correctly
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1138
|
||||
X apparent graphics driver conflict on vista
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1140
|
||||
X PImage.save() does not create parent directories
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1124
|
||||
|
||||
X sketch turning blue and not working on osx
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1164
|
||||
xml
|
||||
X fix for xml elements that have null names
|
||||
X added listChildren() method
|
||||
|
||||
@@ -7,9 +7,9 @@ X add -X switch to cp on osx build so that extended attrs are not copied
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1098
|
||||
_ after deleting a tab code still get's preprocessed, pde file is not forgotten
|
||||
_ http://dev.processing.org/bugs/show_bug.cgi?id=1092
|
||||
|
||||
_ multipage pdf works not like described in the docs
|
||||
_ http://dev.processing.org/bugs/show_bug.cgi?id=1131
|
||||
X add JVMArchs to Info.plist so that stupid Apple error msg doesn't appear
|
||||
X StringIndexOutOfBoundsException caused by import statements with no dots
|
||||
X http://dev.processing.org/bugs/show_bug.cgi?id=1145
|
||||
|
||||
invalid
|
||||
X Sketchbook sub-menu is empty after changing Sketchbook location preference
|
||||
|
||||
Reference in New Issue
Block a user