I don't know if this is necessarily related to the problem you are having, but FWIW, doing this will cause problems on case-insensitive filesystems -- depending on the compile sequencing (I assume it is the sequence in the file, but I'm not sure), the class file for Check will overwrite the class file for CHECK.
Personally, I would stay away from names that are so possibly conflatable, either by humans or machines. Regards, Justin On Fri, Jul 6, 2018 at 3:46 PM Andreas Schaefer <[email protected]> wrote: > Hi > > Will developing some code in org-apache-sling-resourceresolver I ran into > an issue with the animal sniffer maven plugin. > > I create an Interface that contains: > - an enum called ‘CHECK' > - an inner class that is named’ Check' > - that inner class has a private variable 'CHECK check’ > > Then I see this report while building the module: > > [INFO] --- animal-sniffer-maven-plugin:1.16:check (default) @ > org.apache.sling.resourceresolver --- > [INFO] Checking unresolved references to > org.codehaus.mojo.signature:java17:1.0 > [ERROR] /Users/schaefa/Development/ > madplanet.com/apache/sling-dev/sling-git/org-apache-sling-resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java:993: > Undefined reference: > org.apache.sling.resourceresolver.impl.mapping.PlaceholderProvider.CHECK > [ERROR] /Users/schaefa/Development/ > madplanet.com/apache/sling-dev/sling-git/org-apache-sling-resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java:993: > Undefined reference: > org.apache.sling.resourceresolver.impl.mapping.PlaceholderProvider.CHECK > org.apache.sling.resourceresolver.impl.mapping.PlaceholderProvider.CHECK.found > > Renaming the enum to something else like ‘STATUS’ did resolve the issue. > > Upgrading to 1.17 did caused the same issue but I now see this error which > seems to indicate an issue with the plugin itself: > > [ERROR] Failed to execute goal > org.codehaus.mojo:animal-sniffer-maven-plugin:1.17:check (default) on > project org.apache.sling.resourceresolver: Execution default of goal > org.codehaus.mojo:animal-sniffer-maven-plugin:1.17:check failed: An API > incompatibility was encountered while executing > org.codehaus.mojo:animal-sniffer-maven-plugin:1.17:check: > java.lang.NoSuchMethodError: > java.nio.CharBuffer.position(I)Ljava/nio/CharBuffer; > [ERROR] ----------------------------------------------------- > [ERROR] realm = > plugin>org.codehaus.mojo:animal-sniffer-maven-plugin:1.17 > … > > Did anyone see something similar? > > Cheers - Andy Schaefer
