[ 
https://issues.apache.org/jira/browse/NETBEANS-4818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Austin Stephens updated NETBEANS-4818:
--------------------------------------
    Description: 
To fix the issue of Nashorn being removed, someone is having ant compile 
scripts. They apparently did this without using an IDE since they are comparing 
strings with "==" and "!=", which is why it doesn't work on Windows. I have 
fixed it but am too lazy to check it in. Here is the new fixed method as it 
appears in build-impl.xml:
{noformat}
    private String toRegexp2(String spec, String filepattern, String separator) 
{
        List<String> prefixes = new ArrayList<>();
        List<String> suffixes = new ArrayList<>();
        pathVariants(spec).forEach(item -> {
            suffixes.add(item);
        });
        String tail = "";
        String separatorString = separator;
        if ("\\".equals(separatorString)) {
            separatorString = "\\\\";
        }
        if (filepattern != null && !filepattern.equals(tail)) {
            tail = separatorString + filepattern;
        }
        return "([^" + separatorString +"]+)\\Q" + separator + "\\E(" + 
suffixes.stream().collect(Collectors.joining("|")) + ")" + tail;
    }{noformat}

  was:
To fix the issue of Nashorn being removed, someone is having ant compile 
scripts. They apparently did this without using a debugger since they are 
comparing strings with "==" and "!=", which is why it doesn't work on Windows. 
I have fixed it but am too lazy to check it in. Here is the new fixed method as 
it appears in build-impl.xml:
{noformat}
    private String toRegexp2(String spec, String filepattern, String separator) 
{
        List<String> prefixes = new ArrayList<>();
        List<String> suffixes = new ArrayList<>();
        pathVariants(spec).forEach(item -> {
            suffixes.add(item);
        });
        String tail = "";
        String separatorString = separator;
        if ("\\".equals(separatorString)) {
            separatorString = "\\\\";
        }
        if (filepattern != null && !filepattern.equals(tail)) {
            tail = separatorString + filepattern;
        }
        return "([^" + separatorString +"]+)\\Q" + separator + "\\E(" + 
suffixes.stream().collect(Collectors.joining("|")) + ")" + tail;
    }{noformat}


> New Module system build-impl.xml doesn't work on windows
> --------------------------------------------------------
>
>                 Key: NETBEANS-4818
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4818
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Compiler
>    Affects Versions: 12.2
>            Reporter: Austin Stephens
>            Priority: Critical
>
> To fix the issue of Nashorn being removed, someone is having ant compile 
> scripts. They apparently did this without using an IDE since they are 
> comparing strings with "==" and "!=", which is why it doesn't work on 
> Windows. I have fixed it but am too lazy to check it in. Here is the new 
> fixed method as it appears in build-impl.xml:
> {noformat}
>     private String toRegexp2(String spec, String filepattern, String 
> separator) {
>         List<String> prefixes = new ArrayList<>();
>         List<String> suffixes = new ArrayList<>();
>         pathVariants(spec).forEach(item -> {
>             suffixes.add(item);
>         });
>         String tail = "";
>         String separatorString = separator;
>         if ("\\".equals(separatorString)) {
>             separatorString = "\\\\";
>         }
>         if (filepattern != null && !filepattern.equals(tail)) {
>             tail = separatorString + filepattern;
>         }
>         return "([^" + separatorString +"]+)\\Q" + separator + "\\E(" + 
> suffixes.stream().collect(Collectors.joining("|")) + ")" + tail;
>     }{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

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

Reply via email to