You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2020/10/09 18:50:03 UTC

[netbeans] branch master updated: [NETBEANS-4818] Using equals instead of == in multi-module J2SE project's tasks, as suggested in the bug.

This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ca815a  [NETBEANS-4818] Using equals instead of == in multi-module J2SE project's tasks, as suggested in the bug.
8ca815a is described below

commit 8ca815ae17bb50cf2ff51c686b01b83b0d3e56d4
Author: Jan Lahoda <jl...@netbeans.org>
AuthorDate: Fri Oct 9 07:42:19 2020 +0200

    [NETBEANS-4818] Using equals instead of == in multi-module J2SE project's tasks, as suggested in the bug.
---
 .../org/netbeans/modules/java/j2semodule/resources/build-impl.xsl    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/resources/build-impl.xsl b/java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/resources/build-impl.xsl
index 606133b..339e7a3 100644
--- a/java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/resources/build-impl.xsl
+++ b/java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/resources/build-impl.xsl
@@ -226,6 +226,7 @@ package netbeans;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 import java.util.stream.Collectors;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
@@ -317,10 +318,10 @@ public class ModsourceRegexp extends Task {
         });
         String tail = "";
         String separatorString = separator;
-        if (separatorString == "\\") {
+        if ("\\".equals(separatorString)) {
             separatorString = "\\\\";
         }
-        if (filepattern != null && filepattern != tail) {
+        if (filepattern != null && !Objects.equals(filepattern, tail)) {
             tail = separatorString + filepattern;
         }
         return "([^" + separatorString +"]+)\\Q" + separator + "\\E(" + suffixes.stream().collect(Collectors.joining("|")) + ")" + tail;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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