You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "jjazzboss (via GitHub)" <gi...@apache.org> on 2023/05/29 14:34:10 UTC
[GitHub] [netbeans-nbpackage] jjazzboss opened a new issue, #28: InvalidPathException in FileUtils.findDirs()
jjazzboss opened a new issue, #28:
URL: https://github.com/apache/netbeans-nbpackage/issues/28
Tested on WIN10, JDK17.
Problem is line 246 in the calculation of `inDepth`, `Path.of()` can't manage glob wildcard such as "etc/*.conf" (see below).
`findDirs()` is always called using rather simple patterns (no use of "**"), so I just fixed inDepth to 6 and test ran OK.
I've just started experimenting with the tool, InnoSetup type installer worked fine on first trial :-)
```
T E S T S
Running org.apache.netbeans.nbpackage.FileUtilsTest
Tests run: 6, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.226 s <<< FAILURE! - in org.apache.netbeans.nbpackage.FileUtilsTest
org.apache.netbeans.nbpackage.FileUtilsTest.testFindDirs Time elapsed: 0.009 s <<< ERROR!
java.nio.file.InvalidPathException: Illegal char <*> at index 4: etc/*.conf
at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
at java.base/java.nio.file.Path.of(Path.java:147)
at org.apache.netbeans.nbpackage@1.0-beta3-SNAPSHOT/org.apache.netbeans.nbpackage.FileUtils.lambda$findDirs$2(FileUtils.java:246)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:520)
at java.base/java.util.stream.IntPipeline.max(IntPipeline.java:483)
at org.apache.netbeans.nbpackage@1.0-beta3-SNAPSHOT/org.apache.netbeans.nbpackage.FileUtils.findDirs(FileUtils.java:248)
at org.apache.netbeans.nbpackage@1.0-beta3-SNAPSHOT/org.apache.netbeans.nbpackage.FileUtilsTest.testFindDirs(FileUtilsTest.java:173)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
```
--
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: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans-nbpackage] neilcsmith-net commented on issue #28: InvalidPathException in FileUtils.findDirs()
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #28:
URL: https://github.com/apache/netbeans-nbpackage/issues/28#issuecomment-1568130347
Thanks for the report. I'll fix this for beta 3, and also set up a build / test on other OS as part of the workflows. I always build InnoSetup installers on Linux so this issue slipped through the net. Glad to know that other than that, the InnoSetup installer is working for you!
I'll also better document that this method specifically does not support `**` patterns. Will probably consider `String::split` instead to calculate the internal depth.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans-nbpackage] neilcsmith-net closed issue #28: InvalidPathException in FileUtils.findDirs()
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net closed issue #28: InvalidPathException in FileUtils.findDirs()
URL: https://github.com/apache/netbeans-nbpackage/issues/28
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans-nbpackage] neilcsmith-net commented on issue #28: InvalidPathException in FileUtils.findDirs()
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #28:
URL: https://github.com/apache/netbeans-nbpackage/issues/28#issuecomment-1568661959
Thanks for the report @jjazzboss I've opened a PR to fix, and also added the build / test on other OS to the workflow.
See #29
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans-nbpackage] jjazzboss commented on issue #28: InvalidPathException in FileUtils.findDirs()
Posted by "jjazzboss (via GitHub)" <gi...@apache.org>.
jjazzboss commented on issue #28:
URL: https://github.com/apache/netbeans-nbpackage/issues/28#issuecomment-1570559522
Thanks ! I'll keep you informed about my test progress on Linux and MacOS
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists