1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
Description: Do not build JPEGEncoder13.java which uses Sun proprietary APIs
and is superceeded by JPEGEncoder.java. Patched other source files accordingly.
Forwarded: not-needed
Author: Onkar Shinde <onshinde@ubuntu.com>
--- a/build/build.xml 2011-05-07 20:46:55.000000000 +0530
+++ b/build/build.xml 2011-05-07 20:48:21.000000000 +0530
@@ -47,7 +47,9 @@
<!--===============================================================================-->
<target name="compile" depends="prepare">
- <javac classpath="${batik.classpath};${environment.J2EE_HOME}/lib/j2ee.jar" srcdir="../${dir.src}" destdir="${dir.build}" />
+ <javac sourcepath="" classpath="${batik.classpath};${environment.J2EE_HOME}/lib/j2ee.jar" srcdir="../${dir.src}" destdir="${dir.build}">
+ <exclude name="**/encoders/JPEGEncoder13.java" />
+ </javac>
</target>
@@ -83,7 +85,11 @@
<!--===============================================================================-->
<target name="jar" depends="compile">
<delete file="${jar.jCharts}" />
- <jar jarfile="${jar.jCharts}" basedir="${dir.build}" />
+ <jar jarfile="${jar.jCharts}" basedir="${dir.build}">
+ <manifest>
+ <attribute name="Class-Path" value="batik.jar" />
+ </manifest>
+ </jar>
<delete dir="${dir.build}" />
</target>
@@ -92,8 +98,8 @@
<target name="javadocs">
<delete dir="${dir.javadocs}" />
<mkdir dir="${dir.javadocs}" />
- <javadoc sourcepath="../${dir.src}"
- classpath="${batik.classpath};${environment.J2EE_HOME}/lib/j2ee.jar"
+ <javadoc sourcepath=""
+ classpath="${batik.classpath};/usr/share/java/servlet-api-3.1.jar"
destdir="${dir.javadocs}"
packagenames="org.jCharts.*"
excludepackagenames="javax.*"
@@ -102,6 +108,11 @@
version="true"
windowtitle="${project.name}-${project.version} API"
doctitle="${project.name}-${project.version}">
+ <fileset dir="../${dir.src}">
+ <exclude name="**/JPEGEncoder13.java" />
+ </fileset>
+ <link offline="true" packagelistLoc="/usr/share/doc/default-jdk-doc/api" href="/usr/share/doc/default-jdk-doc/api/" />
+ <link offline="true" packagelistLoc="/usr/share/doc/libservlet2.5-java/api" href="/usr/share/doc/libservlet2.5-java/api/" />
</javadoc>
</target>
--- a/src/org/jCharts/encoders/ServletEncoderHelper.java 2011-05-07 20:46:55.000000000 +0530
+++ b/src/org/jCharts/encoders/ServletEncoderHelper.java 2011-05-07 20:47:08.000000000 +0530
@@ -81,30 +81,6 @@
* Convenience method to call from a Servlet or JSP. This method will set the appropriate
* mime type and then export the chart as the response.
*
- * We cannot overload encode(...) as it will create a compile time dependency with the
- * HttpServletResponse Class which will require the J2EE libraries.
- *
- * @param chart
- * @param quality float value from 0.0f(worst image quality) - 1.0f(best image quality)
- * @param httpServletResponse
- * @throws ChartDataException
- * @throws PropertyException
- * @throws IOException
- * @since 0.7
- ******************************************************************************************/
- public static final void encodeJPEG13( Chart chart,
- float quality,
- HttpServletResponse httpServletResponse ) throws ChartDataException, PropertyException, IOException
- {
- httpServletResponse.setContentType( JPEG_MIME_TYPE );
- JPEGEncoder13.encode( chart, quality, httpServletResponse.getOutputStream() );
- }
-
-
- /******************************************************************************************
- * Convenience method to call from a Servlet or JSP. This method will set the appropriate
- * mime type and then export the chart as the response.
- *
* @param chart
* @param quality float value from 0.0f(worst image quality) - 1.0f(best image quality)
* @param httpServletResponse
--- a/src/org/jCharts/test/ChartTestDriver.java 2011-05-07 20:46:55.000000000 +0530
+++ b/src/org/jCharts/test/ChartTestDriver.java 2011-05-07 20:47:08.000000000 +0530
@@ -182,7 +182,7 @@
}
else if( EXTENSION.equals( JPEG_LEGACY ) )
{
- JPEGEncoder13.encode( chart, 1.0f, fileOutputStream );
+ JPEGEncoder.encode( chart, 1.0f, fileOutputStream );
}
else
{
|