JaroslavTulach closed pull request #369: Making Maven projects usable without 
properly installed Java support.
URL: https://github.com/apache/incubator-netbeans/pull/369
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/maven/src/org/netbeans/modules/maven/nodes/DependenciesNode.java 
b/maven/src/org/netbeans/modules/maven/nodes/DependenciesNode.java
index b027579c1..649e96ca3 100644
--- a/maven/src/org/netbeans/modules/maven/nodes/DependenciesNode.java
+++ b/maven/src/org/netbeans/modules/maven/nodes/DependenciesNode.java
@@ -174,16 +174,21 @@ protected Node createNodeForKey(DependencyWrapper wr) {
         @SuppressWarnings("LeakingThisInConstructor")       
         DependenciesSet(NbMavenProjectImpl project, DependencyType type) {
             this.project = project;
-            this.type = type;           
+            this.type = type;
+            ModuleInfoSupport mis = null;
             switch (type) {   
                 case COMPILE:
                 case TEST:
-                    moduleInfoSupport = new ModuleInfoSupport(project, type);
-                    break;
+                    try {
+                        mis = new ModuleInfoSupport(project, type);
+                        break;
+                    } catch (LinkageError err) {
+                        LOG.log(Level.INFO, "Can't initialize dependencies", 
err);
+                        // fallthrough
+                    }
                 default:
-                    moduleInfoSupport = null;
-                    break;
             }
+            this.moduleInfoSupport = mis;
             
             NbMavenProject nbmp = project.getProjectWatcher();
             nbmp.addPropertyChangeListener(WeakListeners.propertyChange(this, 
nbmp));


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to