This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 29160

Summary: ProjectMemberConvertor.write throws NullPointerException
Product: projects Reporter: Ondrej Rypacek <rypacek>
Component: Generic InfrastructureAssignee: Vitezslav Stejskal <vstejskal>
Status: CLOSED FIXED    
Severity: blocker CC: jpokorsky, rmatous
Priority: P1    
Version: 3.x   
Hardware: All   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 29211    

Description Ondrej Rypacek 2002-11-28 17:49:34 UTC
ProjectMemberConvertor.write throws
NullPointerException on SourcesDescriptor from
JavaProject. The descriptor is being found in java
project as follows:

	JavaProject javaProject =
JavaProject.getJavaProject(project);
	Collection javaSources = javaProject.getSources();

	Iterator jsIt = javaSources.iterator();
	if (jsIt.hasNext()) {
	    ProjectMember srcpm = (ProjectMember)jsIt.next();
	    return srcpm; // <== thats him,!=null
	} 

Trying to convert srcpm to settings via
ProjectMemberConvertor throws NullPointerException.
Comment 1 Jan Pokorsky 2002-11-29 18:08:27 UTC
If DOMConvertor delegated reading/writing to a plain Convertor it did
not pass the context containing source FileObject at all.

fixed in src/org/netbeans/spi/settings/DOMConvertor.java,v 1.4
Comment 2 Jan Pokorsky 2002-12-02 13:39:28 UTC
additional fix of revision 1.4. The delegating writer does not return
written content via toString(), so the origin CharArrayWriter has to
be asked.

src/org/netbeans/spi/settings/DOMConvertor.java,v 1.5

Comment 3 Vitezslav Stejskal 2002-12-02 15:41:46 UTC
It should be fixed now, thanks Honzo. Ondro could you please verify
the fix. You should check out the core/settings module which received
the fix.
Comment 4 Jan Becicka 2003-08-21 15:28:20 UTC
Silence means agreement.
Comment 5 Jan Becicka 2003-11-25 14:24:27 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.

Marking issue as CLOSED.