Skip to content

Commit e1990a9

Browse files
author
jantje
committed
#1297 fix List.get returning NULL
I do not think this is #1297 related but I found this while investigating #1297
1 parent 538c61a commit e1990a9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

io.sloeber.core/src/io/sloeber/core/tools/Helpers.java

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public static boolean addIncludeFolder(ICConfigurationDescription configurationD
7676
List<IPath> IncludePaths, boolean isWorkspacePath) {
7777

7878
boolean confDesckMustBeSet = false;
79+
if (IncludePaths == null) {
80+
return false;
81+
}
7982
ICLanguageSetting[] languageSettings = configurationDescription.getRootFolderDescription()
8083
.getLanguageSettings();
8184
int pathSetting = ICSettingEntry.VALUE_WORKSPACE_PATH;

io.sloeber.core/src/io/sloeber/core/tools/Libraries.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ public static boolean adjustProjectDescription(ICConfigurationDescription confde
449449
List<IPath> foldersToAddToInclude = foldersToInclude.get(INCLUDE);
450450
boolean descriptionMustBeSet = Helpers.addIncludeFolder(confdesc, foldersToAddToInclude, true);
451451
List<IPath> foldersToRemoveFromBuildPath = foldersToInclude.get(REMOVE);
452-
if (!foldersToRemoveFromBuildPath.isEmpty()) {
452+
if ((foldersToRemoveFromBuildPath != null) && (!foldersToRemoveFromBuildPath.isEmpty())) {
453453
ICResourceDescription cfgd = confdesc.getResourceDescription(new Path(new String()), true);
454454
ICSourceEntry[] sourceEntries = cfgd.getConfiguration().getSourceEntries();
455455
for (IPath curFile : foldersToRemoveFromBuildPath) {

0 commit comments

Comments
 (0)