Bug 127320 [Wizards] NPE importing from zip file
Build id: I20060208-0848 I got this NPE in my log when trying to import an existing project from a zip file: at org.eclipse.core.internal.resources.Workspace.loadProjectDescription(Workspace.java:1399) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage$ProjectRecord.setProjectName(WizardProjectsImportPage.java:145) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage$ProjectRecord.<init>(WizardProjectsImportPage.java:132) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage.collectProjectFilesFromProvider(WizardProjectsImportPage.java:919)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ZipFileStructureProvider.java
.removeLastSegments(1));
        ZipEntry newEntry = new ZipEntry(pathname.toString());
        directoryEntryCache.put(pathname, newEntry);
        addToChildren(parent, newEntry);
    }
    /**
     * Creates a new file zip entry with the specified name.
     */
    protected void createFile(ZipEntry entry) {
        IPath pathname = new Path(entry.getName());
        ZipEntry parent;
        if (pathname.segmentCount() == 1)
            parent = root;
        else
            parent = (ZipEntry) directoryEntryCache.get(pathname
                    .removeLastSegments(1));
        addToChildren(parent, entry);
    }
    /* (non-Javadoc)
     * Method declared on IImportStructureProvider
     */
    public List getChildren(Object element) {
        if (children == null)
            initialize();
        return ((List) children.get(element));
    }
    /* (non-Javadoc)
     * Method declared on IImportStructureProvider
     */
    public InputStream getContents(Object element) {