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 171173

Summary: NullPointerException at org.netbeans.modules.bugtracking.kenai.KenaiRepositories.getRepository
Product: connecteddeveloper Reporter: Jaromir Uhrik <juhrik>
Component: Team FrameworkAssignee: pgebauer <pgebauer>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=157443
Issue Type: DEFECT Exception Reporter: 157443
Attachments: stacktrace

Description Jaromir Uhrik 2009-08-31 14:06:29 UTC
Build: NetBeans IDE Dev (Build cdev-1329-on-090828)
VM: Java HotSpot(TM) Client VM, 1.5.0_19-137, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_19-b02-304
OS: Mac OS X, 10.5.8, i386

User Comments:
juhrik: Share on kenai fails and the NPE appears...



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.bugtracking.kenai.KenaiRepositories.getRepository(KenaiRepositories.java:91)
        at org.netbeans.modules.bugtracking.util.KenaiUtil.getKenaiRepository(KenaiUtil.java:143)
        at org.netbeans.modules.bugtracking.bridge.kenai.VCSKenaiSupportImpl.setFirmAssociations(VCSKenaiSupportImpl.java:82)
        at org.netbeans.modules.subversion.SvnKenaiSupport.setFirmAssociations(SvnKenaiSupport.java:77)
        at org.netbeans.modules.subversion.api.Subversion.checkoutRepositoryFolder(Subversion.java:325)
        at org.netbeans.modules.kenai.ui.NewKenaiProjectWizardIterator.instantiate(NewKenaiProjectWizardIterator.java:239)
Comment 1 Jaromir Uhrik 2009-08-31 14:06:33 UTC
Created attachment 86854 [details]
stacktrace
Comment 2 Ondrej Vrabec 2009-09-01 12:13:32 UTC
*** Issue 171167 has been marked as a duplicate of this issue. ***
Comment 3 Ondrej Vrabec 2009-09-01 12:19:54 UTC
fix: cdev #9afc4c658bd0
KenaiProject.forRepository may return null, so i added a simple test of the return value

However it is interesting why null is returned: repositories on testkenai.com now have a different url than till now.
They start with https://svn.testkenai.com/svn/... or https://hg.testkenai.com/hg/... and reg pattern in
KenaiProject.forRepository fails.
Comment 4 Petr Dvorak 2009-09-03 10:33:53 UTC
Isn't the Kenai project name known at the moment? You fill it in the SoK dialog... ?
Comment 5 Petr Dvorak 2009-09-03 12:57:27 UTC
added partial fix to "forRepository" method - please review it to see how this method works at the moment...

http://hg.netbeans.org/cdev/rev/e337366d52d1
Comment 6 Tomas Pavek 2009-09-03 12:57:55 UTC
We need to adapt to the new scheme of SCM URL provided by Kenai. We also need the old one still be recognized. After 
fixing in trunk we need to create a patch for NB 6.7(.1).
Comment 7 Quality Engineering 2009-09-04 03:49:37 UTC
Integrated into 'main-golden', will be available in build *200909032054* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9afc4c658bd0
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #171173 - NPE at o.n.m.bugtracking.kenai.KenaiRepositories.getRepository
KenaiProject.forRepository can return null
Comment 8 Petr Dvorak 2009-09-04 10:52:24 UTC
The changeset http://hg.netbeans.org/cdev/rev/e337366d52d1 should be transplanted in 67_fixes repository, please. Petr,
could you do this please?

(note: I called the fix "partial" because it still uses only the regexp - but this is the best we can do for 6.7 without
digging too deep, I guess).
Comment 9 pgebauer 2009-09-04 11:25:01 UTC
The changeset http://hg.netbeans.org/cdev/rev/e337366d52d1 has been ported into the release67_fixes branch.
http://hg.netbeans.org/release67_fixes/rev/698afeb48bdc
Comment 10 Jan Becicka 2009-09-04 11:51:05 UTC
the fix is not complete. there are several places, where it can cause problems. I'll try to find them.
Comment 11 Jan Becicka 2009-09-04 12:08:02 UTC
Ignore my previous comment. There are several places, but not in 6.7. (only in trunk)
Comment 12 Petr Dvorak 2009-09-04 12:20:32 UTC
Yes, I have checked in 6.7(.1) sources just now and the only place the regexp is present is in the single file... I
believe the fix is correct.
Comment 13 Jan Becicka 2009-09-08 13:46:24 UTC
Yes. The fix is correct. Was correct from beginning. My fault.
Comment 14 Jaromir Uhrik 2009-09-10 10:36:58 UTC
Verified.