You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by ga...@apache.org on 2012/04/09 20:22:43 UTC

svn commit: r1311364 - in /xmlgraphics/commons/trunk: build.xml src/java/org/apache/xmlgraphics/image/loader/spi/ImageImplRegistry.java status.xml test/java/org/apache/xmlgraphics/util/ServiceTest.java

Author: gadams
Date: Mon Apr  9 18:22:43 2012
New Revision: 1311364

URL: http://svn.apache.org/viewvc?rev=1311364&view=rev
Log:
Minor build improvements to eliminate warning and parameterize junit formatting. Eliminate (5) deprecation warnings.

Modified:
    xmlgraphics/commons/trunk/build.xml
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageImplRegistry.java
    xmlgraphics/commons/trunk/status.xml
    xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/util/ServiceTest.java

Modified: xmlgraphics/commons/trunk/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/build.xml?rev=1311364&r1=1311363&r2=1311364&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/build.xml (original)
+++ xmlgraphics/commons/trunk/build.xml Mon Apr  9 18:22:43 2012
@@ -35,6 +35,9 @@
   <property name="javac.fork" value="no"/>
 
   <property name="junit.fork" value="on"/>
+  <property name="junit.haltonfailure" value="off"/>
+  <property name="junit.printsummary" value="off"/>
+  <property name="junit.formatter.brief" value="on"/>
 
   <property name="javadoc.packages" value="org.apache.xmlgraphics.*"/>
   
@@ -202,7 +205,7 @@
     <mkdir dir="${build.classes.dir}"/>
     <javac destdir="${build.classes.dir}" fork="${javac.fork}" debug="${javac.debug}"
            deprecation="${javac.deprecation}" optimize="${javac.optimize}"
-           source="${javac.source}" target="${javac.target}">
+           source="${javac.source}" target="${javac.target}" includeAntRuntime="true">
       <src path="${src.java.dir}"/>
       <patternset refid="compile-pattern"/>
       <classpath refid="libs-build-classpath"/>
@@ -275,13 +278,18 @@
   <!-- =================================================================== -->
   <!-- Testing                                                             -->
   <!-- =================================================================== -->
-  <target name="junit-compile" depends="package" if="junit.present">
+  <target name="junit-init" depends="init-avail">
+    <condition property="junit.formatter.brief.use">
+      <istrue value="${junit.formatter.brief}"/>
+    </condition>
+  </target>
+  <target name="junit-compile" depends="package,junit-init" if="junit.present">
     <mkdir dir="${build.dir}/test-classes"/>
     <mkdir dir="${build.dir}/test-reports"/>
     <javac destdir="${build.dir}/test-classes" fork="${javac.fork}"
            debug="${javac.debug}" deprecation="${javac.deprecation}"
            optimize="${javac.optimize}" source="${javac.source}"
-           target="${javac.target}">
+           target="${javac.target}" includeAntRuntime="true">
       <src path="${basedir}/test/java"/>
       <patternset refid="compile-pattern"/>
       <classpath>
@@ -299,14 +307,13 @@
       </fileset>
     </copy>
   </target>
-
   <target name="junit-basic" depends="junit-compile" description="Runs the standard JUnit test suite" if="junit.present">
     <echo message="Running basic functionality tests"/>
-    <junit haltonerror="no" fork="${junit.fork}" errorproperty="test.junit.error" failureproperty="test.junit.failure">
+    <junit haltonerror="no" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="test.junit.error" failureproperty="test.junit.failure" printsummary="${junit.printsummary}">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <jvmarg value="-enableassertions"/>
-      <formatter type="brief" usefile="false"/>
+      <formatter type="brief" usefile="false" if="junit.formatter.brief.use"/>
       <formatter type="plain" usefile="true"/>
       <formatter type="xml" usefile="true"/>
       <classpath>

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageImplRegistry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageImplRegistry.java?rev=1311364&r1=1311363&r2=1311364&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageImplRegistry.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageImplRegistry.java Mon Apr  9 18:22:43 2012
@@ -104,19 +104,19 @@ public class ImageImplRegistry {
      */
     public void discoverClasspathImplementations() {
         //Dynamic registration of ImagePreloaders
-        Iterator iter = Service.providers(ImagePreloader.class, true);
+        Iterator iter = Service.providers(ImagePreloader.class);
         while (iter.hasNext()) {
             registerPreloader((ImagePreloader)iter.next());
         }
 
         //Dynamic registration of ImageLoaderFactories
-        iter = Service.providers(ImageLoaderFactory.class, true);
+        iter = Service.providers(ImageLoaderFactory.class);
         while (iter.hasNext()) {
             registerLoaderFactory((ImageLoaderFactory)iter.next());
         }
 
         //Dynamic registration of ImageConverters
-        iter = Service.providers(ImageConverter.class, true);
+        iter = Service.providers(ImageConverter.class);
         while (iter.hasNext()) {
             registerConverter((ImageConverter)iter.next());
         }

Modified: xmlgraphics/commons/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/status.xml?rev=1311364&r1=1311363&r2=1311364&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/status.xml (original)
+++ xmlgraphics/commons/trunk/status.xml Mon Apr  9 18:22:43 2012
@@ -21,6 +21,7 @@
 <status>
 	<developers>
 	  <!-- In alphabetical order (last name) -->
+	  <person name="Glenn Adams"       email="gadams@apache.org"        id="GA"/>
 	  <person name="Max Berger"        email="mayberger@apache.org"     id="MB"/>
 	  <person name="Chris Bowditch"    email="cbowditch@apache.org"     id="CB"/>
 	  <person name="Adrian Cumiskey"   email="acumiskey@apache.org"     id="AC"/>
@@ -40,6 +41,10 @@
   </contexts>
   <changes>
     <release version="Trunk" date="n/a">
+      <action context="Code" dev="GA" type="update">
+        Minor build improvements to eliminate warning and parameterize junit formatting.
+        Eliminate (5) deprecation warnings.
+      </action>
       <action context="Code" dev="PH" type="fix" fixes-bug="51911" due-to="JM and Mehdi Houshmand">
         Support for T.4 Group 3 1D encoding.
       </action>

Modified: xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/util/ServiceTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/util/ServiceTest.java?rev=1311364&r1=1311363&r2=1311364&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/util/ServiceTest.java (original)
+++ xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/util/ServiceTest.java Mon Apr  9 18:22:43 2012
@@ -83,7 +83,7 @@ public class ServiceTest extends TestCas
     public void testWithClassNames() throws Exception {
         Class cls = ImageWriter.class;
         boolean found = true;
-        Iterator iter = Service.providers(cls, false);
+        Iterator iter = Service.providerNames(cls);
         while (iter.hasNext()) {
             Object obj = iter.next();
             assertNotNull(obj);
@@ -97,7 +97,7 @@ public class ServiceTest extends TestCas
         assertTrue("None of the expected classes found", found);
 
         //Do it a second time to make sure the cache works as expected
-        iter = Service.providers(cls, false);
+        iter = Service.providerNames(cls);
         while (iter.hasNext()) {
             Object obj = iter.next();
             assertNotNull(obj);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org