Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-5198

PrincipalImpl is not part of the java API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.0, 0.9.1, 0.10.0
    • 0.9.1, 0.10.0
    • build, Core
    • None

    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.
      

      Attachments

        Activity

          People

            Reamer Philipp Dallig
            Reamer Philipp Dallig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 40m
                1h 40m