lbownik commented on code in PR #4969:
URL: https://github.com/apache/netbeans/pull/4969#discussion_r1023979714
##########
nbbuild/antsrc/org/netbeans/nbbuild/CheckLinks.java:
##########
@@ -633,8 +645,33 @@ final Boolean isOk (URI u) throws BuildException {
throw new BuildException ("Each filter must have pattern
attribute");
}
- if (pattern.matcher (u.toString ()).matches ()) {
- log ("Matched " + u + " accepted: " + accept,
org.apache.tools.ant.Project.MSG_VERBOSE);
+ if (pattern.matcher(u.toString()).matches()) {
+ log("Matched " + u + " accepted: " + accept,
org.apache.tools.ant.Project.MSG_VERBOSE);
+ if (externallinksdump != null) {
+ try {
+ String dummyName;
+ if (accept) {
+ dummyName = "acceptednetbeans.txt";
+ } else {
+ dummyName = "rejectednetbeans.txt";
+ }
+ Path dumppath =
externallinksdump.toPath().resolve(dummyName);
+ if (Files.notExists(dumppath)) {
+ Files.createDirectories(dumppath.getParent());
+ Files.createFile(dumppath);
+ }
+ List<String> existingEntries =
Files.readAllLines(externallinksdump.toPath().resolve(dummyName));
Review Comment:
existing entries variable seems unneeded.
would
Set<String> sortedEntries = new
TreeSet<>(Files.readAllLines(externallinksdump.toPath().resolve(dummyName)));
rork?
--
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