Community
Participate
Working Groups
Somewhere we end up creating NameVersionDescriptors with null as the ID. This is related to bug 346336. 1) Create a target definition with an install location that has missing bundles (i.e. an incorrect bundles.info after updating) 2) On the content tab, hit deselect all then select all 3) Apply this target as the active target platform java.lang.NullPointerException at org.eclipse.pde.core.target.NameVersionDescriptor.hashCode(NameVersionDescriptor.java:91) at java.util.HashMap.put(HashMap.java:372) at java.util.HashSet.add(HashSet.java:200) at org.eclipse.pde.core.target.LoadTargetDefinitionJob.handleReload(LoadTargetDefinitionJob.java:442) at org.eclipse.pde.core.target.LoadTargetDefinitionJob.loadPlugins(LoadTargetDefinitionJob.java:286) at org.eclipse.pde.core.target.LoadTargetDefinitionJob.runInWorkspace(LoadTargetDefinitionJob.java:143) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Can't reproduce anymore, but I changed the constructor of NameVersionDescriptor to assert the ID as not null. If the problem surfaces again it will give a much better stack trace then the hashCode NPE.
The NPE came up again. This time I was able to track down the cause. Typically the only time we use InvalidTargetBundles is when there is a missing bundle. However, the ProfileBundleContainer also uses them when a file can't be found in hte Bundles.info list. Since we only have a location for the invalid bundle, if we try to make a name/version descriptor for it, it dies. This was happening in two places, in the target content group (we try to save missing bundles information) and during resolution (we never checked the all bundles list for error statuses). Fixed in master.