Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-885

Migrate from proprietary "com.sun.image" to "javax.imageio"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.8
    • None
    • SVG Rasterizer
    • None
    • Operating System: All
      Platform: All

    Description

      The Batik framework uses Sun's proprietary, non-standard image codecs. This was already reported to Sun to be problematic [1] and, according to the report, support for the classes will be dropped in JDK 7 [2]: the new Java version, although apparently without an official release schedule yet, may occur somewhere in second semester 2009 [3].

      Feasibility to fix this issue was somehow pending on the drop of Java 1.3 support, as the Java Image I/O API was only introduced in Java 1.4 [1]. The Java 1.3 drop was made in revision 666001 (Batik version 1.8).

      Using these classes fires lots of annoying warnings ("warning: com.sun.image.codec.[*] is Sun proprietary API and may be removed in a future release") while compiling - apparently, when using JDK 1.5+. My initial proposal was to disable the warnings in the meantime, using @SuppressWarnings [4], but it didn't help [5].

      The main advantage I see in this is (potentially) achieving compatibility with more open Java implementations such as IcedTea, GNU Classpath (found a related mailing list thread [6]) and Apache Harmony. Nevertheless, this is quite a bit speculative as I'm not familiar enough with the Batik framework nor with those Java implementations to assure that this is the only code portion blocking full compatibility.

      Disclaimer: this report was created without a deep analysis of the work involved in this task - the main purpose was to create a placeholder for possible interested to subscribe to (through the "CC" field of the report), gather patches, stimulate further investigation, etc..

      [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527962
      [2] https://jdk7.dev.java.net/
      [3] http://knol.google.com/k/alex-miller/java-se-7/1f092vcri65lh/2#Planning
      [4] http://java.sun.com/javase/6/docs/api/java/lang/SuppressWarnings.html
      [5] http://forums.java.net/jive/message.jspa?messageID=158989
      [6] http://www.nabble.com/batik-rasterizer.jar-(cant-convert-jpg-from-svg)-to13948656.html

      Attachments

        Issue Links

          Activity

            People

              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              helder.magalhaes@gmail.com Helder Magalhães
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: