Author: helder
Date: Sat Jul 28 13:09:53 2012
New Revision: 1366666
URL: http://svn.apache.org/viewvc?rev=1366666&view=rev
Log:
Improvement:
Prefer "javax.imageio" over proprietary "com.sun.image"
(improves compatibility with GNU Classpath, OpenJDK and other open JVM);
(fixes building with JDK 7+ without messing with the "build.properties");
(resolves bug #46513).
Modified:
xmlgraphics/batik/trunk/CHANGES
xmlgraphics/batik/trunk/build.xml
xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.ImageWriter
xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.RegistryEntry
Modified: xmlgraphics/batik/trunk/CHANGES
URL:
http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/CHANGES?rev=1366666&r1=1366665&r2=1366666&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/CHANGES (original)
+++ xmlgraphics/batik/trunk/CHANGES Sat Jul 28 13:09:53 2012
@@ -12,8 +12,8 @@ Bug fixing is an ongoing task, so it is
42408, 43411, 43847, 43950, 44553, 44590, 44919, 44936, 44966,
45112, 45114, 45117, 45397, 45520, 45883, 45958, 46072, 46124,
- 46202, 46430, 46431, 46855, 46871, 47201, 47202, 48182, 48411,
- 49889, 49968, 50006, 50100
+ 46202, 46430, 46431, 46513, 46855, 46871, 47201, 47202, 48182,
+ 48411, 49889, 49968, 50006, 50100
2. New features
@@ -40,6 +40,8 @@ Bug fixing is an ongoing task, so it is
* Internally registers not only font families but also makes font available
through their font names.
* All CSS font weights are now handled for font selection
+ * Compatibility with GNU Classpath, OpenJDK and other open JVM was improved
+ (image I/O is now used by default, over the Sun proprietary classes).
4. Bug fixes
@@ -78,6 +80,7 @@ Bug fixing is an ongoing task, so it is
* Fixed HeadlessExceptions related to WMF transcoding.
* Font families containing numbers (like "Univers 45 Light") no longer
cause errors.
+ * Compiling on Oracle JDK 7 and JDK 8 as well now works.
5. Misc
Modified: xmlgraphics/batik/trunk/build.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/build.xml?rev=1366666&r1=1366665&r2=1366666&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/build.xml (original)
+++ xmlgraphics/batik/trunk/build.xml Sat Jul 28 13:09:53 2012
@@ -164,6 +164,20 @@ To display the available targets type:
<and>
<available classname="com.sun.image.codec.jpeg.JPEGCodec"
classpathref="libs-classpath"/>
+ <!-- This became quite tricky in JDK 7, as the Sun codecs were
"retired"
+ (they are available in run-time although the "classes are not
located when compiling")
+ http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527962 -->
+ <not>
+ <and>
+ <equals arg1="${java.specification.vendor}" arg2="Oracle
Corporation"/>
+ <or>
+ <!-- According to Sun issue 6527962, the classes are to be
completely removed in JDK 8
+ (so there should be no need to extend this list any
longer) -->
+ <equals arg1="${java.specification.version}" arg2="1.7"/>
+ <equals arg1="${java.specification.version}" arg2="1.8"/>
+ </or>
+ </and>
+ </not>
<not>
<equals arg1="${sun-codecs.disabled}" arg2="true"/>
</not>
Modified:
xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.ImageWriter
URL:
http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.ImageWriter?rev=1366666&r1=1366665&r2=1366666&view=diff
==============================================================================
---
xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.ImageWriter
(original)
+++
xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.ImageWriter
Sat Jul 28 13:09:53 2012
@@ -20,7 +20,10 @@
# $Id$
# -----------------------------------------------------------------------------
-org.apache.batik.ext.awt.image.codec.png.PNGImageWriter
-#org.apache.batik.ext.awt.image.codec.imageio.ImageIOPNGImageWriter
-#org.apache.batik.ext.awt.image.codec.imageio.ImageIOTIFFImageWriter
+# NOTE: the "codec" package is deprecated, there entries are kept here for
compatibility with older JVM versions
+# (uses "sun.image", which is only supported in Sun Java implementations and
was retired in JDK 7)
+#org.apache.batik.ext.awt.image.codec.png.PNGImageWriter
+
+org.apache.batik.ext.awt.image.codec.imageio.ImageIOPNGImageWriter
+org.apache.batik.ext.awt.image.codec.imageio.ImageIOTIFFImageWriter
org.apache.batik.ext.awt.image.codec.imageio.ImageIOJPEGImageWriter
Modified:
xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.RegistryEntry
URL:
http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.RegistryEntry?rev=1366666&r1=1366665&r2=1366666&view=diff
==============================================================================
---
xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.RegistryEntry
(original)
+++
xmlgraphics/batik/trunk/resources/META-INF/services/org.apache.batik.ext.awt.image.spi.RegistryEntry
Sat Jul 28 13:09:53 2012
@@ -20,8 +20,11 @@
# $Id$
# -----------------------------------------------------------------------------
-org.apache.batik.ext.awt.image.codec.png.PNGRegistryEntry
-org.apache.batik.ext.awt.image.codec.tiff.TIFFRegistryEntry
+# NOTE: the "codec" package is deprecated, there entries are kept here for
compatibility with older JVM versions
+# (uses "sun.image", which is only supported in Sun Java implementations and
was retired in JDK 7)
+#org.apache.batik.ext.awt.image.codec.png.PNGRegistryEntry
+#org.apache.batik.ext.awt.image.codec.tiff.TIFFRegistryEntry
+
org.apache.batik.ext.awt.image.codec.imageio.ImageIOJPEGRegistryEntry
-#org.apache.batik.ext.awt.image.codec.imageio.ImageIOPNGRegistryEntry
-#org.apache.batik.ext.awt.image.codec.imageio.ImageIOTIFFRegistryEntry
+org.apache.batik.ext.awt.image.codec.imageio.ImageIOPNGRegistryEntry
+org.apache.batik.ext.awt.image.codec.imageio.ImageIOTIFFRegistryEntry