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 - ProjectMemberConvertor.write throws NullPointerException
Summary: ProjectMemberConvertor.write throws NullPointerException
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All Linux
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
Depends on:
Blocks: 29211
  Show dependency tree
 
Reported: 2002-11-28 17:49 UTC by Ondrej Rypacek
Modified: 2004-04-19 16:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.