sdedic commented on code in PR #6789:
URL: https://github.com/apache/netbeans/pull/6789#discussion_r1423563981


##########
java/maven/src/org/netbeans/modules/maven/classpath/AbstractProjectClassPathImpl.java:
##########
@@ -54,13 +55,18 @@ public abstract class AbstractProjectClassPathImpl 
implements ClassPathImplement
     
     protected AbstractProjectClassPathImpl(NbMavenProjectImpl proj) {
         project = proj;
+        LOGGER.log(Level.FINER, "Creating {0} for project {1}, with original 
{2}", new Object[] { getClass(), proj, proj.getOriginalMavenProjectOrNull() });
         //TODO make weak or remove the listeners as well??
         NbMavenProject.addPropertyChangeListener(proj, new 
PropertyChangeListener() {
             @Override
             public void propertyChange(PropertyChangeEvent evt) {
                 //explicitly listing both RESOURCE and PROJECT properties, 
it's unclear if both are required but since some other places call 
addWatchedPath but don't listen it's likely required
                 if (NbMavenProject.PROP_RESOURCE.equals(evt.getPropertyName()) 
|| NbMavenProject.PROP_PROJECT.equals(evt.getPropertyName())) {
+                    MavenProject mp = project.getOriginalMavenProjectOrNull();
+                    LOGGER.log(Level.FINE, "{0} got change {1} from project: 
{2} with maven project {3}", new Object[] { getClass(), evt.getPropertyName(), 
project,
+                        System.identityHashCode(mp == null ? this : null) });

Review Comment:
   the intention is to provide _some_ identification; I'd prefer the classpath 
object's ID instead of just 0 for `null



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
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