java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector cannot access class com.sun.tools.javac.code.Symbol$

It took me up to 3 working days and I found a simple solution. Go to android/gradle.properties change org.gradle.jvmargs=-Xmx1536M to org.gradle.jvmargs=-Xmx1536M –add-exports=java.base/sun.nio.ch=ALL-UNNAMED –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED –add-opens=java.base/java.lang.reflect=ALL-UNNAMED –add-opens=java.base/java.io=ALL-UNNAMED –add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED

What is the use case for null(Input/Output)Stream API in Java?

Sometimes you want to have a parameter of InputStream type, but also to be able to choose not to feed your code with any data. In tests it’s probably easier to mock it but in production you may choose to bind null input instead of scattering your code with ifs and flags. compare: class ComposableReprinter … Read more

Migration JAXWS application from Java 8 to Java 11

Note sure about sprint boot, but to get JAXWS working in Java 11, I used <profiles> <!– add back the jaxws SOAP dependendies which were removed in JDK11 –> <profile> <id>jdk11</id> <activation> <jdk>[11,)</jdk> </activation> <!– tested working with OpenJDK 11.0.8 –> <dependencies> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>jaxws-rt</artifactId> <version>2.3.3</version> <type>pom</type> </dependency> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>rt</artifactId> <version>2.3.3</version> </dependency> </dependencies> </profile> … Read more

Empty methods noticeably slower in Java 11 than Java 8

You are measuring empty benchmarks, not empty methods. In other words, measuring the minimal infrastructure code that handles the benchmark itself. This is easy to dissect, because you’d expect only a few instructions on the hot path. JMH’s -prof perfasm or -prof xperfasm would give you those hottest instructions in seconds. I think the effect … Read more