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 246956 - NullPointerException at org.netbeans.libs.git.GitRepository.getInstance
Summary: NullPointerException at org.netbeans.libs.git.GitRepository.getInstance
Status: RESOLVED FIXED
Alias: None
Product: third-party
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: markiewb
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-09 21:41 UTC by alied
Modified: 2014-09-10 18:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 208560


Attachments
stacktrace (443 bytes, text/plain)
2014-09-09 21:41 UTC, alied
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2014-09-09 21:41:24 UTC
Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.65-b04, Java(TM) SE Runtime Environment, 1.7.0_67-b01
OS: Linux

User Comments:
GUEST: This happens every time I turn on netbeans.  When I launch the program I typically have one local project that is version controlled by git, and multiple remote projects that are also git controlled, but Netbeans does not seem to recognize git when opening/creating a fully remote project.

GUEST: Installed some plugins, including the "show git branch in statusbar"

alied: last git-related thing I did was a push.
In case it matters, a gradle multi project was still loading .

GUEST: while scanning a remote project




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.libs.git.GitRepository.getInstance(GitRepository.java:94)
   at de.markiewb.netbeans.plugin.git.showbranch.GitUtils.getActiveBranch(GitUtils.java:39)
   at de.markiewb.netbeans.plugin.git.showbranch.Installer$2.run(Installer.java:61)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 1 alied 2014-09-09 21:41:27 UTC
Created attachment 149094 [details]
stacktrace
Comment 2 Ondrej Vrabec 2014-09-10 06:45:46 UTC
Benno, you likely call GitRepository.getInstance with null as an argument.
Comment 3 markiewb 2014-09-10 18:22:01 UTC
Fixed. https://github.com/markiewb/nb-git-branch-in-statusbar/issues/4

I could not reproduce the issue, but I added some null checks, which should solve the issue.

Please wait for the verification of the plugin version 1.0.2 at the plugin center.