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

Avoid processing duplicated entries within META-INF

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.18, 5.0.0-alpha-5
    • None
    • None

    Description

      Though only one entry is found within META-INF, e.g. META-INF/groovy/org.codehaus.groovy.source.Extensions, two entries are retrieved via getResources method.

      def loader = this.class.classLoader
      def r = loader.getResources("META-INF/groovy/org.codehaus.groovy.source.Extensions").toList()
      println r
      

      Output:

      [jar:file:/D:/_DEV/Groovy/groovy-4.0.14/lib/groovy-4.0.14.jar!/META-INF/groovy/org.codehaus.groovy.source.Extensions, jar:file:/D:/_DEV/Groovy/groovy-4.0.14/lib/groovy-4.0.14.jar!/META-INF/groovy/org.codehaus.groovy.source.Extensions]
      

      As a result, Groovy processes them repeatedly, which is meaningless and should be avoided.

      Attachments

        Activity

          People

            daniel_sun Daniel Sun
            daniel_sun Daniel Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: