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 40533 - NPEs are thrown by wizard when mounting CVS file system
Summary: NPEs are thrown by wizard when mounting CVS file system
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcsgeneric (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-26 16:46 UTC by Martin Entlicher
Modified: 2004-03-08 17:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The contextual diff of the fix. (15.66 KB, patch)
2004-03-05 11:51 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2004-02-26 16:46:21 UTC
How to reproduce:

1. Call popup menu on Filesystems node and select
Mount->Version Control->Generic VCS menu item
2. Select CVS profile on the appeared winzard
dialog pane and observe the exception
3. Try to fill in any "browseable"/"selectable"
field (like working dir, relative mount point an
etc) and observe the same exception after cloding
file chooser dialog 

Annotation: Exception detected in class
org.netbeans.modules.vcs.profiles.cvsprofiles.commands.CvsAutoFillConfig.
java.lang.NullPointerException
	at
org.netbeans.modules.vcs.profiles.cvsprofiles.commands.CvsAutoFillConfig.exec(CvsAutoFillConfig.java:106)
	at
org.netbeans.modules.vcscore.cmdline.ExecuteCommand.runClass(ExecuteCommand.java:724)
	at
org.netbeans.modules.vcscore.cmdline.ExecuteCommand.run(ExecuteCommand.java:819)
	at
org.netbeans.modules.vcscore.cmdline.UserCommandSupport.execute(UserCommandSupport.java:315)
	at
org.netbeans.spi.vcs.commands.CommandTaskSupport.execute(CommandTaskSupport.java:74)
	at
org.netbeans.modules.vcscore.cmdline.UserCommandTask.execute(UserCommandTask.java:329)
	at
org.netbeans.api.vcs.commands.CommandTask.runCommandTask(CommandTask.java:112)
	at
org.netbeans.api.vcs.commands.CommandTaskInfoImpl.run(CommandTaskInfoImpl.java:40)
	at
org.netbeans.modules.vcscore.commands.CommandProcessor$5.run(CommandProcessor.java:690)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)


NB CVS module doesn't properly handle CVS/Root
files contains the following url (which works just
fine with cvs 1.11.5):

:pserver:user@host/path

One can notice that ':' is ommited after the host
name and
org.netbeans.modules.vcs.profiles.cvsprofiles.commands.CvsAutoFillConfig.exec(...)
is not capable of parsing such kind of urls.

This should be fixed in
org.netbeans.lib.cvsclient.CVSRoot and
CvsAutoFillConfig should use CVSRoot class to
parse the CVSROOT.
Comment 1 Martin Entlicher 2004-03-05 11:33:14 UTC
This was actually a stopper for SJS, increasing priority to P1.

The problem is fixed in trunk:

CVSRoot in javacvs library can parse the new format:

/cvs/javacvs/libsrc/org/netbeans/lib/cvsclient/CVSRoot.java,v  <-- 
CVSRoot.java
new revision: 1.5; previous revision: 1.4

Tests are updated:

/cvs/javacvs/test/unit/library/org/netbeans/lib/cvsclient/CVSRootTest.java,v
 <--  CVSRootTest.java
new revision: 1.3; previous revision: 1.2

CVS profile uses CVSRoot to parse the line in CVS/Root:

/cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsAutoFillConfig.java,v
 <--  CvsAutoFillConfig.java
new revision: 1.4; previous revision: 1.3
Comment 2 Martin Entlicher 2004-03-05 11:51:50 UTC
Created attachment 13834 [details]
The contextual diff of the fix.
Comment 3 Milos Kleint 2004-03-05 14:18:24 UTC
reviewed. the fix looks ok, the updated tests are passing.
Comment 4 Milan Kubec 2004-03-08 14:27:24 UTC
QA, please, verify the fix in trunk build. Thanks.
Comment 5 dmladek 2004-03-08 17:01:36 UTC
It seems fine on latest DEV build
Comment 6 Martin Entlicher 2004-03-08 17:48:15 UTC
Thanks for the review and verification.
The fix is merged into release36 branch:

Checking in javacvs/libsrc/org/netbeans/lib/cvsclient/CVSRoot.java;
/shared/data/helm/cvs/repository/javacvs/libsrc/org/netbeans/lib/cvsclient/CVSRoot.java,v
 <--  CVSRoot.java
new revision: 1.3.26.1; previous revision: 1.3
done
Checking in
javacvs/test/unit/library/org/netbeans/lib/cvsclient/CVSRootTest.java;
/shared/data/helm/cvs/repository/javacvs/test/unit/library/org/netbeans/lib/cvsclient/CVSRootTest.java,v
 <--  CVSRootTest.java
new revision: 1.2.26.1; previous revision: 1.2
done
Checking in
vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsAutoFillConfig.java;
/shared/data/helm/cvs/repository/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsAutoFillConfig.java,v
 <--  CvsAutoFillConfig.java
new revision: 1.3.10.1; previous revision: 1.3
done