Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9480

New v9 ClassFinder throws NoSuchFileException/UnsupportedOperationException and writes it to stderr

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 4.0.0-alpha-1, 3.0.3
    • Component/s: None
    • Labels:
      None

      Description

      org.codehaus.groovy.vmplugin.v9.ClassFinder
      
          private static Map<String, Set<String>> find(URI uri, String prefix, String packageName, boolean recursive) {
              ...
              try (FileSystem fs = newFileSystem(uri)) {
                  ...
              } catch (UnsupportedOperationException ignored) {
              } catch (Exception e) {
                  e.printStackTrace(); // boo!
              }
      
      java.nio.file.NoSuchFileException: C:\Users\...\org.codehaus.groovy30\groovy
      	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
      	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
      	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
      	at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
      	at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
      	at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:198)
      	at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
      	at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
      	at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
      	at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
      	at java.base/java.nio.file.Files.walkFileTree(Files.java:2716)
      	at java.base/java.nio.file.Files.walkFileTree(Files.java:2796)
      	at org.codehaus.groovy.vmplugin.v9.ClassFinder.find(ClassFinder.java:119)
      	at org.codehaus.groovy.vmplugin.v9.ClassFinder.find(ClassFinder.java:107)
      	at org.codehaus.groovy.vmplugin.v9.Java9.doFindClasses(Java9.java:107)
      	at org.codehaus.groovy.vmplugin.v9.Java9.getDefaultImportClasses(Java9.java:95)
      	at org.codehaus.groovy.control.ResolveVisitor.<clinit>(ResolveVisitor.java:670)
      	at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:124)
      	at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:161)
      	at ...
      	Suppressed: java.lang.UnsupportedOperationException
      		at java.base/sun.nio.fs.WindowsFileSystem.close(WindowsFileSystem.java:91)
      		at org.codehaus.groovy.vmplugin.v9.ClassFinder.find(ClassFinder.java:118)
      		... 18 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                daniel_sun Daniel Sun
                Reporter:
                emilles Eric Milles
              • 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 - 1h
                  1h