Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4818

New Module system build-impl.xml doesn't work on windows

    XMLWordPrintableJSON

Details

    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:

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Sir Intellegence Austin Stephens
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m