Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3484

non portable JDK dependant clasess (sun.**)

    XMLWordPrintable

Details

    Description

      We should not be using sun.** classes in tests or in code. they are naughty and break working on non Sun JDKs.

      [andy@localhost jboss-4.0.x]$ find . -name "*.java" -exec grep -i "sun.misc.BASE64Encoder" '{}' ';'
      sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();

      [andy@localhost jboss-4.0.x]$ find . -name "*.java" -exec grep -Hi "sun.misc.BASE64Encoder" '{}' ';'
      ./security/src/main/org/jboss/test/UtilTestCase.java: sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();
      [andy@localhost jboss-4.0.x]$ find . -name "*.java" -exec grep -Hi "sun.misc" '{}' ';'
      ./security/src/main/org/jboss/test/UtilTestCase.java: /** Compare Util.encodeBase64 against the sun misc class
      ./security/src/main/org/jboss/test/UtilTestCase.java: sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();
      ./jaxrpc/src/main/org/jboss/axis/utils/Base64.java: * Eliminates dependency on sun.misc.Base64Encoding,
      ./jaxrpc/src/main/org/jboss/axis/utils/Base64.java: * (it's an access exception to load sun.misc.* classes
      [andy@localhost jboss-4.0.x]$ find . -name "*.java" -exec grep -Hi "sun.io" '{}' ';'
      ./messaging/src/main/org/jboss/mq/xml/XElement.java: sun.io.CharToByteUTF8 conv = new sun.io.CharToByteUTF8();
      ./messaging/src/main/org/jboss/mq/xml/XElement.java: } catch ( sun.io.MalformedInputException e ) {
      [andy@localhost jboss-4.0.x]$

      Moreover the

      Attachments

        Activity

          People

            dandread1@redhat.com Dimitrios Andreadis
            acoliver_jira Andrew Oliver (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: