obfuscated class name does not have consistent capitalization
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
Using ProGuard 6.1.1 and JDK 11.0.3, I'm seeing class files generated where the filesystem path for the class representing the package of the class does not have the same capitalization as the fully qualified name of the class in the class file.
For example, the class file com/acme/N/a.class defines a class named com.acme.n.a:
> javap --class-path . com.acme.n.a
Compiled from "stripped"
public class com.acme.n.a extends org.acme.BasePhase {
...
This causes problems when trying to compile a module-info.java that references the obfuscated class:
module-info.java:16: error: cannot access a
provides org.acme.PluginFactory with com.acme.N.a;
^
bad class file: com/acme/N/a.class
class file contains wrong class: com.acme.n.a
Please remove or make sure it appears in the correct subdirectory of the classpath.
I can work around this with the -dontusemixedcaseclassnames option but it would be nice if I did not have to.
ProGuard consistently distinguishes between similar mixed-case class names (they're just different strings after all), but your file system probably doesn't. Somewhere in your build process, the files must have been unpacked from their jars, with the similarly named files overwriting one another.