Community
Participate
Working Groups
TargetContentsGroup.getBundleChildren calls to IBundleContainer container = (IBundleContainer) parent; return container.getBundles(); getBundles can return null but callers of getBundleChildren are not expecting null. Changing the method to read private Object[] getBundleChildren(Object parent) { Object[] result = null; if (parent == null) { result = fAllBundles.toArray(); } else if (fFeaureModeButton.getSelection() && parent == OTHER_CATEGORY) { result = ((TargetDefinition) fTargetDefinition).getOtherBundles(); } else if (fGrouping == GROUP_BY_CONTAINER && parent instanceof IBundleContainer) { IBundleContainer container = (IBundleContainer) parent; result = container.getBundles(); } else if (fGrouping == GROUP_BY_FILE_LOC && parent instanceof IPath) { List bundles = (List) getFileBundleMapping().get(parent); if (bundles != null && bundles.size() > 0) { result = bundles.toArray(); } } if (result == null) { return new Object[0]; } return result; } Here the two returns in the if/else statements were changed to result = . Then the pre-existing check at the end converts null to an empty object.
Jeff, is this something that will be integrated into bug 331068?
yes, this fix is included in the patch with bug 331068.
Fixed with bug 331068