groovy
  1. groovy
  2. GROOVY-4390

Add GDK File methods to the NIO2 API

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      The GDK adds a bunch of methods to java.io.File and directory
      searching stuff. We'll need to add some sor tof parity for the new
      NIO2 API.

      The good news is NIO 2 is finished and hasn't changed in a while, and
      it is well documented.

      This is a fun and sort of easy bit of work. Mostly analysis and then a
      bunch of new DGM methods.

        Issue Links

          Activity

          Hide
          Merlyn Albery-Speyer added a comment -

          Attached GROOVY-4390_Path_getText.patch. Includes org.codehaus.groovy.vmplugin.v7.PluginDefaultGroovyMethodsTest. I've tested the Ant build behaviour with both Java 1.6 and Java 1.7. When building using Java 1.7 the distribution will include the org.codehaus.groovy.vmplugin.v7.PluginDefaultGroovyMethods methods.

          This patch includes just two new DGM methods:

          • Path.getText()
          • ReadableByteChannel.getText()

          I'll gladly code more DGM methods. Is this general approach to our liking?

          Show
          Merlyn Albery-Speyer added a comment - Attached GROOVY-4390 _Path_getText.patch. Includes org.codehaus.groovy.vmplugin.v7.PluginDefaultGroovyMethodsTest. I've tested the Ant build behaviour with both Java 1.6 and Java 1.7. When building using Java 1.7 the distribution will include the org.codehaus.groovy.vmplugin.v7.PluginDefaultGroovyMethods methods. This patch includes just two new DGM methods: Path.getText() ReadableByteChannel.getText() I'll gladly code more DGM methods. Is this general approach to our liking?
          Hide
          Merlyn Albery-Speyer added a comment -

          The Java 1.7 test failures highlighted in GROOVY-4391 block this issue IMO.

          Show
          Merlyn Albery-Speyer added a comment - The Java 1.7 test failures highlighted in GROOVY-4391 block this issue IMO.
          Hide
          Paul King added a comment -

          Looks good. Some minor things.

          If we were following the conventions currently used in other places, we would use vm7 as the test package even though we use v7 as our plugin package convention. It would be nice if these were aligned. Though to be honest, perhaps we should rename vm6 tests to v6. I'll have to check if there are any ramifications of such a move.

          In the build for the javac task you have source="1.7" target="1.7". Does it actually compile if you drop those values down to 1.6 (or even 1.5)? Just curious.

          Show
          Paul King added a comment - Looks good. Some minor things. If we were following the conventions currently used in other places, we would use vm7 as the test package even though we use v7 as our plugin package convention. It would be nice if these were aligned. Though to be honest, perhaps we should rename vm6 tests to v6. I'll have to check if there are any ramifications of such a move. In the build for the javac task you have source="1.7" target="1.7" . Does it actually compile if you drop those values down to 1.6 (or even 1.5)? Just curious.
          Hide
          Merlyn Albery-Speyer added a comment -

          > In the build for the javac task you have source="1.7" target="1.7". Does it actually compile if you drop those values down to 1.6 (or even 1.5)? Just curious.

          I'm pretty sure it's required as we're using 1.7 classes.

          Show
          Merlyn Albery-Speyer added a comment - > In the build for the javac task you have source="1.7" target="1.7". Does it actually compile if you drop those values down to 1.6 (or even 1.5)? Just curious. I'm pretty sure it's required as we're using 1.7 classes.
          Hide
          Merlyn Albery-Speyer added a comment -

          FYI The blocker, GROOVY-4391, is now resolved thanks to Roshan.

          Show
          Merlyn Albery-Speyer added a comment - FYI The blocker, GROOVY-4391 , is now resolved thanks to Roshan.
          Hide
          Merlyn Albery-Speyer added a comment -

          I think that this JIRA is now redundant, and this issue and it's patch can be discarded. The Groovy NIO module has a comprehensive set of Path methods.

          Show
          Merlyn Albery-Speyer added a comment - I think that this JIRA is now redundant, and this issue and it's patch can be discarded. The Groovy NIO module has a comprehensive set of Path methods.
          Hide
          Pascal Schumacher added a comment -

          As said previously this issue is no longer relevant.

          Could someone with the necessary permissions please close it? Thanks!

          Show
          Pascal Schumacher added a comment - As said previously this issue is no longer relevant. Could someone with the necessary permissions please close it? Thanks!

            People

            • Assignee:
              Unassigned
              Reporter:
              Merlyn Albery-Speyer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: