Details
Description
The test class ShiroAuthenticationServiceTest uses the PrincipalImpl class, which is not part of the Java API.
https://rules.sonarsource.com/java/RSPEC-1191
Classes in the sun.* or com.sun.* packages are considered implementation details, and are not part of the Java API.
They can cause problems when moving to new versions of Java because there is no backwards compatibility guarantee. Similarly, they can cause problems when moving to a different Java vendor, such as OpenJDK.
Such classes are almost always wrapped by Java API classes that should be used instead.
This implementation also triggers Maven warnings
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ zeppelin-server --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 34 source files to /home/philipp/git/zeppelin/zeppelin-server/target/test-classes [WARNING] /home/philipp/git/zeppelin/zeppelin-server/src/test/java/org/apache/zeppelin/service/ShiroAuthenticationServiceTest.java:[36,24] sun.security.acl.PrincipalImpl is internal proprietary API and may be removed in a future release [WARNING] /home/philipp/git/zeppelin/zeppelin-server/src/test/java/org/apache/zeppelin/service/ShiroAuthenticationServiceTest.java:[36,24] sun.security.acl.PrincipalImpl is internal proprietary API and may be removed in a future release [WARNING] /home/philipp/git/zeppelin/zeppelin-server/src/test/java/org/apache/zeppelin/service/ShiroAuthenticationServiceTest.java:[36,24] sun.security.acl.PrincipalImpl is internal proprietary API and may be removed in a future release [WARNING] /home/philipp/git/zeppelin/zeppelin-server/src/test/java/org/apache/zeppelin/service/ShiroAuthenticationServiceTest.java:[76,23] sun.security.acl.PrincipalImpl is internal proprietary API and may be removed in a future release [INFO] /home/philipp/git/zeppelin/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java: Some input files use or override a deprecated API. [INFO] /home/philipp/git/zeppelin/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java: Recompile with -Xlint:deprecation for details. [INFO] /home/philipp/git/zeppelin/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java: Some input files use unchecked or unsafe operations. [INFO] /home/philipp/git/zeppelin/zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java: Recompile with -Xlint:unchecked for details.