vieiro commented on code in PR #5379:
URL: https://github.com/apache/netbeans/pull/5379#discussion_r1090321654


##########
apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ModuleDependency.java:
##########
@@ -146,7 +146,7 @@ public int compareTo(ModuleDependency other) {
         if (result != 0) { return result; }
         
         // do not force resolution of SPEC_VERSION_LAZY for comparisons, 
unnecessary
-        if (specVersion != SPEC_VERSION_LAZY || other.specVersion != 
SPEC_VERSION_LAZY) {
+        if (!SPEC_VERSION_LAZY.equals(specVersion) || 
!SPEC_VERSION_LAZY.equals(other.specVersion)) {

Review Comment:
   Not a bug. SPEC_VERSION_LAZY is a class internal String that is used in one 
of the constructors. The comparison with `==` will detect if the class was 
created with this constructor.



##########
apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ModuleDependency.java:
##########
@@ -167,7 +167,7 @@ public boolean equals(Object o) {
             ModuleDependency other = (ModuleDependency) o;
             return getCodeNameBase().equals(other.getCodeNameBase()) &&
                     Utilities.compareObjects(getReleaseVersion(), 
other.getReleaseVersion()) &&
-                    ((specVersion == SPEC_VERSION_LAZY && other.specVersion == 
SPEC_VERSION_LAZY) ||
+                    ((SPEC_VERSION_LAZY.equals(specVersion) && 
SPEC_VERSION_LAZY.equals(other.specVersion)) ||

Review Comment:
   Same here.



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