[hg] main-silver: #228924 NPE fix

  • From: Milos Kleint < >
  • To: ,
  • Subject: [hg] main-silver: #228924 NPE fix
  • Date: Wed, 24 Apr 2013 04:32:49 -0700

changeset bbb6f809d683 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/bbb6f809d683
description:
        #228924 NPE fix

diffstat:

 
maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java
 |  2 +-
 
maven/src/org/netbeans/modules/maven/output/DependencyAnalyzeOutputProcessor.java
         |  2 +-
 
maven/src/org/netbeans/modules/maven/output/ExecPluginOutputListenerProvider.java
         |  2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diffs (36 lines):

diff --git 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java
 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java
--- 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java
+++ 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java
@@ -121,7 +121,7 @@
     public void sequenceStart(String sequenceId, OutputVisitor visitor) {
         OutputVisitor.Context context = visitor.getContext();
         Project prj = project;
-        if (context != null) {
+        if (context != null && context.getCurrentProject() != null) {
             prj = context.getCurrentProject();
         }        
         classpath = createCP(prj, new HashSet<Project>());
diff --git 
a/maven/src/org/netbeans/modules/maven/output/DependencyAnalyzeOutputProcessor.java
 
b/maven/src/org/netbeans/modules/maven/output/DependencyAnalyzeOutputProcessor.java
--- 
a/maven/src/org/netbeans/modules/maven/output/DependencyAnalyzeOutputProcessor.java
+++ 
b/maven/src/org/netbeans/modules/maven/output/DependencyAnalyzeOutputProcessor.java
@@ -96,7 +96,7 @@
                 visitor.setLine(line + " (Click to add to pom.xml)"); 
//NOI18N - part of maven output
                 OutputVisitor.Context context = visitor.getContext();
                 Project prj = project;
-                if (context != null) {
+                if (context != null && context.getCurrentProject() != null) {
                     prj = context.getCurrentProject();
                 }
                 visitor.setOutputListener(new Listener(prj, gr, ar, type, 
ver, sc), false);
diff --git 
a/maven/src/org/netbeans/modules/maven/output/ExecPluginOutputListenerProvider.java
 
b/maven/src/org/netbeans/modules/maven/output/ExecPluginOutputListenerProvider.java
--- 
a/maven/src/org/netbeans/modules/maven/output/ExecPluginOutputListenerProvider.java
+++ 
b/maven/src/org/netbeans/modules/maven/output/ExecPluginOutputListenerProvider.java
@@ -75,7 +75,7 @@
     public void processLine(String line, OutputVisitor visitor) {
         OutputVisitor.Context context = visitor.getContext();
         Project prj = project;
-        if (context != null) {
+        if (context != null && context.getCurrentProject() != null) {
             prj = context.getCurrentProject();
         }
         ClassPath[] cp = 
prj.getLookup().lookup(ProjectSourcesClassPathProvider.class).getProjectClassPaths(ClassPath.EXECUTE);

[hg] main-silver: #228924 NPE fix

Milos Kleint 04/24/2013

Project Features

About this Project

APIsupport was started in November 2009, is owned by Antonin Nebuzelsky, and has 43 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close