You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ss...@apache.org on 2017/08/04 14:41:12 UTC

svn commit: r1804130 [5/5] - in /xmlgraphics/batik/trunk: batik-anim/src/main/java/org/apache/batik/anim/ batik-anim/src/main/java/org/apache/batik/anim/dom/ batik-anim/src/main/java/org/apache/batik/anim/timing/ batik-anim/src/main/java/org/apache/bat...

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/apps/rasterizer/SVGConverterTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/apps/rasterizer/SVGConverterTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/apps/rasterizer/SVGConverterTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/apps/rasterizer/SVGConverterTest.java Fri Aug  4 14:41:11 2017
@@ -84,7 +84,7 @@ public class SVGConverterTest extends De
         t.setId("HintsConfigTest.KEY_AOI");
 
         t = new HintsConfigTest(new Object[][]{
-            {JPEGTranscoder.KEY_QUALITY, Float.valueOf(.5f)}}){
+            {JPEGTranscoder.KEY_QUALITY, .5f}}){
                 protected void deltaConfigure(SVGConverter c){
                     c.setQuality(.5f);
                 }
@@ -94,7 +94,7 @@ public class SVGConverterTest extends De
         t.setId("HintsConfigTest.KEY_QUALITY");
 
         t = new HintsConfigTest(new Object[][]{
-            {PNGTranscoder.KEY_INDEXED, Integer.valueOf(8)}}){
+            {PNGTranscoder.KEY_INDEXED, 8}}){
                 protected void deltaConfigure(SVGConverter c){
                     c.setIndexed(8);
                 }
@@ -113,7 +113,7 @@ public class SVGConverterTest extends De
         t.setId("HintsConfigTest.KEY_BACKGROUND_COLOR");
 
         t = new HintsConfigTest(new Object[][]{
-            {ImageTranscoder.KEY_HEIGHT, Float.valueOf(50)}}){
+            {ImageTranscoder.KEY_HEIGHT, 50f}}){
                 protected void deltaConfigure(SVGConverter c){
                     c.setHeight(50);
                 }
@@ -123,7 +123,7 @@ public class SVGConverterTest extends De
         t.setId("HintsConfigTest.KEY_HEIGHT");
 
         t = new HintsConfigTest(new Object[][]{
-            {ImageTranscoder.KEY_WIDTH, Float.valueOf(50)}}){
+            {ImageTranscoder.KEY_WIDTH, 50f}}){
                 protected void deltaConfigure(SVGConverter c){
                     c.setWidth(50);
                 }
@@ -133,7 +133,7 @@ public class SVGConverterTest extends De
         t.setId("HintsConfigTest.KEY_WIDTH");
 
         t = new HintsConfigTest(new Object[][]{
-            {ImageTranscoder.KEY_MAX_HEIGHT, Float.valueOf(50)}}){
+            {ImageTranscoder.KEY_MAX_HEIGHT, 50f}}){
                 protected void deltaConfigure(SVGConverter c){
                     c.setMaxHeight(50);
                 }
@@ -142,7 +142,7 @@ public class SVGConverterTest extends De
         t.setId("HintsConfigTest.KEY_MAX_HEIGHT");
 
         t = new HintsConfigTest(new Object[][]{
-            {ImageTranscoder.KEY_MAX_WIDTH, Float.valueOf(50)}}){
+            {ImageTranscoder.KEY_MAX_WIDTH, 50f}}){
                 protected void deltaConfigure(SVGConverter c){
                     c.setMaxWidth(50);
                 }
@@ -199,7 +199,7 @@ public class SVGConverterTest extends De
         t.setId("HintsConfigTest.KEY_LANGUAGE");
 
         t = new HintsConfigTest(new Object[][]{
-            {ImageTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER, Float.valueOf(.5f)}}){
+            {ImageTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER, .5f}}){
                 protected void deltaConfigure(SVGConverter c){
                     c.setPixelUnitToMillimeter(.5f);
                 }
@@ -545,8 +545,8 @@ abstract class AbstractConfigTest extend
     protected String makeSourceList(List v){
         int n = v.size();
         StringBuffer sb = new StringBuffer( n * 8 );
-        for (int i=0; i<n; i++){
-            sb.append( v.get(i).toString() );
+        for (Object aV : v) {
+            sb.append(aV.toString());
         }
 
         return sb.toString();
@@ -690,25 +690,23 @@ abstract class AbstractConfigTest extend
             return report;
         }
 
-        Iterator iter = expectedConfig.hints.keySet().iterator();
-        while (iter.hasNext()){
-            Object hintKey = iter.next();
+        for (Object hintKey : expectedConfig.hints.keySet()) {
             Object expectedHintValue = expectedConfig.hints.get(hintKey);
 
             Object computedHintValue = computedConfig.hints.get(hintKey);
 
-            if (!expectedHintValue.equals(computedHintValue)){
+            if (!expectedHintValue.equals(computedHintValue)) {
                 TestReport report = reportError(ERROR_UNEXPECTED_TRANSCODING_HINT);
                 report.addDescriptionEntry(ENTRY_KEY_EXPECTED_HINT_KEY,
-                                           hintKey.toString());
+                        hintKey.toString());
                 report.addDescriptionEntry(ENTRY_KEY_EXPECTED_HINT_VALUE,
-                                           expectedHintValue.toString());
+                        expectedHintValue.toString());
                 report.addDescriptionEntry(ENTRY_KEY_COMPUTED_HINT_VALUE,
-                                           "" + computedHintValue);
+                        "" + computedHintValue);
                 report.addDescriptionEntry(ENTRY_KEY_EXPECTED_HINTS,
-                                           makeHintsString(expectedConfig.hints));
+                        makeHintsString(expectedConfig.hints));
                 report.addDescriptionEntry(ENTRY_KEY_COMPUTED_HINTS,
-                                           makeHintsString(computedConfig.hints));
+                        makeHintsString(computedConfig.hints));
 
                 return report;
             }
@@ -840,8 +838,8 @@ class HintsConfigTest extends AbstractCo
         // Add hints from constructor argument
         //
         int n = hintsMap.length;
-        for (int i=0; i<n; i++){
-            hints.put(hintsMap[i][0], hintsMap[i][1]);
+        for (Object[] aHintsMap : hintsMap) {
+            hints.put(aHintsMap[0], aHintsMap[1]);
         }
         config.hints = hints;
 
@@ -883,9 +881,9 @@ class SourcesConfigTest extends Abstract
 
         List sources = new ArrayList();
         List dest = new ArrayList();
-        for (int i=0; i<expectedSources.length; i++){
-            sources.add(new SVGConverterFileSource(new File(expectedSources[i] + SVG_EXTENSION)));
-            dest.add(new File(expectedSources[i] + DST_TYPE.getExtension()));
+        for (Object expectedSource : expectedSources) {
+            sources.add(new SVGConverterFileSource(new File(expectedSource + SVG_EXTENSION)));
+            dest.add(new File(expectedSource + DST_TYPE.getExtension()));
         }
         config.sources = sources;
         config.dest = dest;
@@ -929,12 +927,12 @@ class DestConfigTest extends AbstractCon
 
         List sources = new ArrayList();
         List dest = new ArrayList();
-        for (int i=0; i<sourcesStrings.length; i++){
-            sources.add(new SVGConverterFileSource(new File(sourcesStrings[i])));
+        for (String sourcesString : sourcesStrings) {
+            sources.add(new SVGConverterFileSource(new File(sourcesString)));
         }
 
-        for (int i=0; i<expectedDest.length; i++){
-            dest.add(new File(expectedDest[i]));
+        for (String anExpectedDest : expectedDest) {
+            dest.add(new File(anExpectedDest));
         }
 
         config.sources = sources;

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/EcmaLoadTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/EcmaLoadTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/EcmaLoadTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/EcmaLoadTest.java Fri Aug  4 14:41:11 2017
@@ -55,10 +55,10 @@ public class EcmaLoadTest extends Defaul
         //
         for (int i=0; i<scriptSource.length; i++) {
             for (int j=0; j<scriptOrigin[i].length; j++) {
-                for (int k=0; k<secure.length; k++) {
-                    ScriptSelfTest t= buildTest(scripts, scriptSource[i],
-                                                scriptOrigin[i][j],
-                                                secure[k]);
+                for (boolean aSecure : secure) {
+                    ScriptSelfTest t = buildTest(scripts, scriptSource[i],
+                            scriptOrigin[i][j],
+                            aSecure);
                     addTest(t);
                 }
             }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/EcmaNoLoadTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/EcmaNoLoadTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/EcmaNoLoadTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/EcmaNoLoadTest.java Fri Aug  4 14:41:11 2017
@@ -45,15 +45,15 @@ public class EcmaNoLoadTest extends Defa
         // should not be loaded, no matter their origin or the
         // other security settings.
         //
-        for (int i=0; i<scriptSource.length; i++) {
-            for (int j=0; j<secure.length; j++) {
-                for (int k=0; k<scriptOrigin.length; k++) {
+        for (String aScriptSource : scriptSource) {
+            for (boolean aSecure : secure) {
+                for (String aScriptOrigin : scriptOrigin) {
                     SVGOnLoadExceptionTest t = buildTest(scripts,
-                                                         scriptSource[i],
-                                                         scriptOrigin[k],
-                                                         secure[j],
-                                                         false,
-                                                         false);
+                            aScriptSource,
+                            aScriptOrigin,
+                            aSecure,
+                            false,
+                            false);
                     addTest(t);
                 }
             }
@@ -90,12 +90,12 @@ public class EcmaNoLoadTest extends Defa
                 max = j+1;
             }
             for (int i=0; i<max; i++) {
-                for (int k=0; k<secure.length; k++) {
-                    SVGOnLoadExceptionTest t= buildTest(scripts, scriptSource[i],
-                                                        scriptOrigin[j],
-                                                        secure[k],
-                                                        false,
-                                                        false);
+                for (boolean aSecure : secure) {
+                    SVGOnLoadExceptionTest t = buildTest(scripts, scriptSource[i],
+                            scriptOrigin[j],
+                            aSecure,
+                            false,
+                            false);
                     addTest(t);
                 }
             }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/ExternalResourcesTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/ExternalResourcesTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/ExternalResourcesTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/ExternalResourcesTest.java Fri Aug  4 14:41:11 2017
@@ -176,7 +176,7 @@ public class ExternalResourcesTest exten
     }
 
     public void setSecure(Boolean secure) {
-        this.secure = secure.booleanValue();
+        this.secure = secure;
     }
 
     /**
@@ -315,20 +315,19 @@ public class ExternalResourcesTest exten
             ids[i] = st.nextToken().trim();
         }
 
-        for (int i=0; i<ids.length; i++) {
-            String id = ids[i];
+        for (String id : ids) {
             userAgent = buildUserAgent();
             builder = new GVTBuilder();
             ctx = new BridgeContext(userAgent);
             ctx.setDynamic(true);
 
-            Document cloneDoc = (Document)doc.cloneNode(true);
+            Document cloneDoc = (Document) doc.cloneNode(true);
             Element insertionPoint = cloneDoc.getElementById(INSERTION_POINT_ID);
 
             if (insertionPoint == null) {
                 report.setErrorCode(ERROR_NO_INSERTION_POINT_IN_DOCUMENT);
                 report.addDescriptionEntry(ENTRY_KEY_INSERTION_POINT_ID,
-                                           INSERTION_POINT_ID);
+                        INSERTION_POINT_ID);
                 report.setPassed(false);
                 return report;
             }
@@ -338,7 +337,7 @@ public class ExternalResourcesTest exten
             if (target == null) {
                 report.setErrorCode(ERROR_TARGET_ID_NOT_FOUND);
                 report.addDescriptionEntry(ENTRY_KEY_TARGET_ID,
-                                           id);
+                        id);
                 report.setPassed(false);
                 return report;
             }
@@ -349,7 +348,7 @@ public class ExternalResourcesTest exten
                 GraphicsNode gn = builder.build(ctx, cloneDoc);
                 gn.getBounds();
                 th = userAgent.getDisplayError();
-            } catch (BridgeException e){
+            } catch (BridgeException e) {
                 th = e;
             } catch (SecurityException e) {
                 th = e;
@@ -363,12 +362,12 @@ public class ExternalResourcesTest exten
                 if (!secure)
                     failures.add(id);
             } else if (th instanceof BridgeException) {
-                BridgeException be = (BridgeException)th;
-                if (!secure  ||
-                    (secure && !ERR_URI_UNSECURE.equals(be.getCode()))) {
+                BridgeException be = (BridgeException) th;
+                if (!secure ||
+                        (secure && !ERR_URI_UNSECURE.equals(be.getCode()))) {
                     report.setErrorCode(ERROR_WHILE_PROCESSING_SVG_DOCUMENT);
                     report.addDescriptionEntry(ENTRY_KEY_ERROR_DESCRIPTION,
-                                               be.getMessage());
+                            be.getMessage());
                     report.setPassed(false);
                     return report;
                 }
@@ -376,7 +375,7 @@ public class ExternalResourcesTest exten
                 // Some unknown exception was displayed...
                 report.setErrorCode(ERROR_WHILE_PROCESSING_SVG_DOCUMENT);
                 report.addDescriptionEntry(ENTRY_KEY_ERROR_DESCRIPTION,
-                                           th.getMessage());
+                        th.getMessage());
                 report.setPassed(false);
                 return report;
             }
@@ -389,15 +388,15 @@ public class ExternalResourcesTest exten
 
         if (secure) {
             report.setErrorCode(ERROR_UNTHROWN_SECURITY_EXCEPTIONS);
-            for (int i=0; i<failures.size(); i++) {
+            for (Object failure : failures) {
                 report.addDescriptionEntry(ENTRY_KEY_EXPECTED_EXCEPTION_ON,
-                                           failures.get(i));
+                        failure);
             }
         } else {
             report.setErrorCode(ERROR_THROWN_SECURITY_EXCEPTIONS);
-            for (int i=0; i<failures.size(); i++) {
+            for (Object failure : failures) {
                 report.addDescriptionEntry(ENTRY_KEY_UNEXPECTED_EXCEPTION_ON,
-                                           failures.get(i));
+                        failure);
             }
         }
 

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/JarLoadTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/JarLoadTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/JarLoadTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/JarLoadTest.java Fri Aug  4 14:41:11 2017
@@ -49,10 +49,10 @@ public class JarLoadTest extends Default
         //
         for (int i=0; i<scriptSource.length; i++) {
             for (int j=0; j<=i; j++) {
-                for (int k=0; k<secure.length; k++) {
-                    ScriptSelfTest t= buildTest(scripts, scriptSource[i],
-                                                scriptOrigin[j],
-                                                secure[k]);
+                for (boolean aSecure : secure) {
+                    ScriptSelfTest t = buildTest(scripts, scriptSource[i],
+                            scriptOrigin[j],
+                            aSecure);
                     addTest(t);
                 }
             }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/JarNoLoadTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/JarNoLoadTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/JarNoLoadTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/bridge/JarNoLoadTest.java Fri Aug  4 14:41:11 2017
@@ -44,13 +44,13 @@ public class JarNoLoadTest extends Defau
         // should not be loaded, no matter their origin or the
         // other security settings.
         //
-        for (int i=0; i<scriptSource.length; i++) {
-            for (int j=0; j<secure.length; j++) {
-                for (int k=0; k<scriptOrigin.length; k++) {
+        for (String aScriptSource : scriptSource) {
+            for (boolean aSecure : secure) {
+                for (String aScriptOrigin : scriptOrigin) {
                     SVGOnLoadExceptionTest t = buildTest(scripts,
-                                                         scriptSource[i],
-                                                         scriptOrigin[k],
-                                                         secure[j]);
+                            aScriptSource,
+                            aScriptOrigin,
+                            aSecure);
                     addTest(t);
                 }
             }
@@ -65,10 +65,10 @@ public class JarNoLoadTest extends Defau
         scripts = "application/java-archive";
         for (int j=0; j<scriptOrigin.length; j++) {
             for (int i=0; i<j; i++) {
-                for (int k=0; k<secure.length; k++) {
-                    SVGOnLoadExceptionTest t= buildTest(scripts, scriptSource[i],
-                                                        scriptOrigin[j],
-                                                        secure[k]);
+                for (boolean aSecure : secure) {
+                    SVGOnLoadExceptionTest t = buildTest(scripts, scriptSource[i],
+                            scriptOrigin[j],
+                            aSecure);
                     addTest(t);
                 }
             }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java Fri Aug  4 14:41:11 2017
@@ -151,7 +151,7 @@ public class PropertyManagerTest extends
         }
 
         // test if the property is inherited or not
-        if (isInherited.booleanValue() != manager.isInheritedProperty()) {
+        if (isInherited != manager.isInheritedProperty()) {
             report.setErrorCode(ERROR_IS_INHERITED);
             report.setPassed(false);
             report.addDescriptionEntry(ERROR_IS_INHERITED, "");
@@ -177,15 +177,15 @@ public class PropertyManagerTest extends
         // test all possible identifiers
         if (identValues != null) {
             try {
-                for (int i=0; i < identValues.length; ++i) {
-                    LexicalUnit lu = cssParser.parsePropertyValue(identValues[i]);
+                for (String identValue : identValues) {
+                    LexicalUnit lu = cssParser.parsePropertyValue(identValue);
                     Value v = manager.createValue(lu, null);
                     String s = v.getCssText();
-                    if (!identValues[i].equalsIgnoreCase(s)) {
+                    if (!identValue.equalsIgnoreCase(s)) {
                         report.setErrorCode(ERROR_INVALID_VALUE);
                         report.setPassed(false);
                         report.addDescriptionEntry(ERROR_INVALID_VALUE,
-                                                   identValues[i]+ '/' +s);
+                                identValue + '/' + s);
                     }
                 }
             } catch (Exception ex) {

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/gvt/TextSelectionTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/gvt/TextSelectionTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/gvt/TextSelectionTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/gvt/TextSelectionTest.java Fri Aug  4 14:41:11 2017
@@ -126,8 +126,8 @@ public class TextSelectionTest extends J
     public TextSelectionTest(String file,   String textID,
                              Integer start, Integer end) {
         this.textID    = textID;
-        this.start = start.intValue();
-        this.end   = end.intValue();
+        this.start = start;
+        this.end   = end;
         super.setFile(file);
     }
 

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/script/rhino/ScriptSelfTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/script/rhino/ScriptSelfTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/script/rhino/ScriptSelfTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/script/rhino/ScriptSelfTest.java Fri Aug  4 14:41:11 2017
@@ -50,7 +50,7 @@ public class ScriptSelfTest extends Self
     }
 
     public void setSecure(Boolean secure){
-        this.secure = secure.booleanValue();
+        this.secure = secure;
     }
 
     public Boolean getSecure(){
@@ -58,7 +58,7 @@ public class ScriptSelfTest extends Self
     }
 
     public void setConstrain(Boolean constrain){
-        this.constrain = constrain.booleanValue();
+        this.constrain = constrain;
     }
 
     public Boolean getConstrain(){

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/AttributedCharacterIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/AttributedCharacterIterator.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/AttributedCharacterIterator.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/AttributedCharacterIterator.java Fri Aug  4 14:41:11 2017
@@ -46,7 +46,7 @@ public class AttributedCharacterIterator
         //
         Font font = new Font(fontName, Font.PLAIN, fontSize);
         styledText.addAttribute(TextAttribute.FAMILY, font.getFamily());
-        styledText.addAttribute(TextAttribute.SIZE, Float.valueOf(font.getSize()));
+        styledText.addAttribute(TextAttribute.SIZE, (float) font.getSize());
         styledText.addAttribute(TextAttribute.FOREGROUND, Color.black);
 
         //

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/BStroke.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/BStroke.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/BStroke.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/BStroke.java Fri Aug  4 14:41:11 2017
@@ -108,8 +108,8 @@ public class BStroke implements Painter
         // Varying width
         g.setPaint(Color.black);
         g.drawString("Varying width", 10, 10);
-        for(int i=0; i<strokesWidth.length; i++){
-            g.setStroke(strokesWidth[i]);
+        for (BasicStroke aStrokesWidth : strokesWidth) {
+            g.setStroke(aStrokesWidth);
             g.drawLine(10, 30, 10, 80);
             g.translate(20, 0);
         }
@@ -118,8 +118,8 @@ public class BStroke implements Painter
         g.setTransform(defaultTransform);
         g.translate(0, 120);
         g.drawString("Varying end caps", 10, 10);
-        for(int i=0; i<strokesCap.length; i++){
-            g.setStroke(strokesCap[i]);
+        for (BasicStroke aStrokesCap : strokesCap) {
+            g.setStroke(aStrokesCap);
             g.drawLine(15, 30, 15, 80);
             g.translate(30, 0);
         }
@@ -133,8 +133,8 @@ public class BStroke implements Painter
         g.translate(0, 240);
         g.drawString("Varying line joins", 10, 10);
         g.translate(20, 20);
-        for(int i=0; i<strokesJoin.length; i++){
-            g.setStroke(strokesJoin[i]);
+        for (BasicStroke aStrokesJoin : strokesJoin) {
+            g.setStroke(aStrokesJoin);
             g.draw(needle);
             g.translate(35, 0);
         }
@@ -149,8 +149,8 @@ public class BStroke implements Painter
         miterShape.lineTo(0, 30); // 45 degree elbow.
         g.drawString("Varying miter limit", 10, 10);
         g.translate(10, 30);
-        for(int i=0; i<strokesMiter.length; i++){
-            g.setStroke(strokesMiter[i]);
+        for (BasicStroke aStrokesMiter : strokesMiter) {
+            g.setStroke(aStrokesMiter);
             g.draw(miterShape);
             g.translate(40, 0);
         }
@@ -160,8 +160,8 @@ public class BStroke implements Painter
         g.translate(150, 0);
         g.drawString("Varying dash patterns", 10, 10);
         g.translate(20, 0);
-        for(int i=0; i<strokesDash.length; i++){
-            g.setStroke(strokesDash[i]);
+        for (BasicStroke aStrokesDash : strokesDash) {
+            g.setStroke(aStrokesDash);
             g.drawLine(10, 20, 10, 80);
             g.translate(20, 0);
         }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/DoubleStringPerformanceTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/DoubleStringPerformanceTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/DoubleStringPerformanceTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/DoubleStringPerformanceTest.java Fri Aug  4 14:41:11 2017
@@ -49,8 +49,8 @@ public class DoubleStringPerformanceTest
 
         int maxLength = 0;
         for (int i=0; i<1000; i++) {
-            for (int j=0; j<testValues.length; j++) {
-                maxLength = Math.max((gc.doubleString(testValues[j])).length(), maxLength);
+            for (double testValue : testValues) {
+                maxLength = Math.max((gc.doubleString(testValue)).length(), maxLength);
             }
         }
     }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/Font1.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/Font1.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/Font1.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/Font1.java Fri Aug  4 14:41:11 2017
@@ -57,14 +57,14 @@ public class Font1 implements Painter {
         g.setPaint(fontColor);
         g.translate(0, 20);
         int[] fontSizes = { 6, 8, 10, 12, 18, 36, 48 };
-        for(int i=0; i<fontSizes.length; i++){
-            java.awt.Font font = new java.awt.Font(defaultFont.getFamily(),
-                                 java.awt.Font.PLAIN,
-                                 fontSizes[i]);
+        for (int fontSize : fontSizes) {
+            Font font = new Font(defaultFont.getFamily(),
+                    Font.PLAIN,
+                    fontSize);
             g.setFont(font);
             g.drawString("aA", 10, 40);
             double width = font.createGlyphVector(frc, "aA").getVisualBounds().getWidth();
-            g.translate(width*1.2, 0);
+            g.translate(width * 1.2, 0);
         }
 
         g.setTransform(defaultTransform);
@@ -110,12 +110,12 @@ public class Font1 implements Painter {
         g.drawString("Font Families", 10, 30);
         g.setPaint(fontColor);
 
-        for(int i=0; i<fontFamilies.length; i++){
-            java.awt.Font font = new java.awt.Font(fontFamilies[i], java.awt.Font.PLAIN, 18);
+        for (String fontFamily : fontFamilies) {
+            Font font = new Font(fontFamily, Font.PLAIN, 18);
             g.setFont(font);
-            double height = font.createGlyphVector(frc, fontFamilies[i]).getVisualBounds().getHeight();
-            g.translate(0, height*1.4);
-            g.drawString(fontFamilies[i], 10, 40);
+            double height = font.createGlyphVector(frc, fontFamily).getVisualBounds().getHeight();
+            g.translate(0, height * 1.4);
+            g.drawString(fontFamily, 10, 40);
         }
 
         //
@@ -133,11 +133,10 @@ public class Font1 implements Painter {
         g.drawString("Logical Fonts", 10, 0);
         g.setPaint(fontColor);
 
-        for(int i=0; i<logicalFonts.length; i++){
-            Font font = logicalFonts[i];
+        for (Font font : logicalFonts) {
             g.setFont(font);
             double height = font.createGlyphVector(frc, font.getName()).getVisualBounds().getHeight();
-            g.translate(0, height*1.4);
+            g.translate(0, height * 1.4);
             g.drawString(font.getName(), 10, 0);
         }
     }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/Font2.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/Font2.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/Font2.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/Font2.java Fri Aug  4 14:41:11 2017
@@ -60,14 +60,14 @@ public class Font2 implements Painter {
         g.setPaint(fontColor);
         g.translate(0, 20);
         int[] fontSizes = { 6, 8, 10, 12, 18, 36, 48 };
-        for(int i=0; i<fontSizes.length; i++){
+        for (int fontSize : fontSizes) {
             Font font = new Font(defaultFont.getFamily(),
-                                 Font.PLAIN,
-                                 fontSizes[i]);
+                    Font.PLAIN,
+                    fontSize);
             g.setFont(font);
             g.drawString("aA", 10, 40);
             double width = font.createGlyphVector(frc, "aA").getVisualBounds().getWidth();
-            g.translate(width*1.2, 0);
+            g.translate(width * 1.2, 0);
         }
 
         g.setTransform(defaultTransform);
@@ -113,12 +113,12 @@ public class Font2 implements Painter {
         g.drawString("Font Families", 10, 30);
         g.setPaint(fontColor);
 
-        for(int i=0; i<fontFamilies.length; i++){
-            Font font = new Font(fontFamilies[i], Font.PLAIN, 18);
+        for (String fontFamily : fontFamilies) {
+            Font font = new Font(fontFamily, Font.PLAIN, 18);
             g.setFont(font);
-            double height = font.createGlyphVector(frc, fontFamilies[i]).getVisualBounds().getHeight();
-            g.translate(0, height*1.4);
-            g.drawString(fontFamilies[i], 10, 40);
+            double height = font.createGlyphVector(frc, fontFamily).getVisualBounds().getHeight();
+            g.translate(0, height * 1.4);
+            g.drawString(fontFamily, 10, 40);
         }
 
         //
@@ -136,12 +136,11 @@ public class Font2 implements Painter {
           g.drawString("Logical Fonts", 10, 0);
           g.setPaint(fontColor);
 
-          for(int i=0; i<logicalFonts.length; i++){
-              Font font = logicalFonts[i];
-              g.setFont(font);
-              double height = font.createGlyphVector(frc, font.getName()).getVisualBounds().getHeight();
-              g.translate(0, height*1.4);
-              g.drawString(font.getName(), 10, 0);
-          }
+        for (Font font : logicalFonts) {
+            g.setFont(font);
+            double height = font.createGlyphVector(frc, font.getName()).getVisualBounds().getHeight();
+            g.translate(0, height * 1.4);
+            g.drawString(font.getName(), 10, 0);
+        }
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/SVGAccuracyTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/SVGAccuracyTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/SVGAccuracyTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/SVGAccuracyTest.java Fri Aug  4 14:41:11 2017
@@ -274,8 +274,8 @@ public class SVGAccuracyTest extends Abs
             }
 
             report.setErrorCode(ERROR_GENERATED_SVG_INACCURATE);
-            report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_LINE_NUMBER,null), Integer.valueOf(ln));
-            report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_COLUMN_NUMBER,null), Integer.valueOf(cn));
+            report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_LINE_NUMBER,null), ln);
+            report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_COLUMN_NUMBER,null), cn);
             report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_COLUMN_EXPECTED_VALUE,null), expectedChar);
             report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_COLUMN_FOUND_VALUE,null), foundChar);
             report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_REFERENCE_LINE,null), refLine);

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/SVGGeneratorTests.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/SVGGeneratorTests.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/SVGGeneratorTests.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/svggen/SVGGeneratorTests.java Fri Aug  4 14:41:11 2017
@@ -153,8 +153,8 @@ public class SVGGeneratorTests extends D
         String candidateReference = GENERATOR_REFERENCE_BASE + RENDERING_DIR + "/" + RENDERING_CANDIDATE_REF_DIR + "/" + cl + PNG_EXTENSION;
 
         SVGRenderingAccuracyTest test = new SVGRenderingAccuracyTest(testSource, testReference);
-        for (int i = 0; i < variationURLs.length; i++) {
-            test.addVariationURL(variationURLs[i]);
+        for (String variationURL : variationURLs) {
+            test.addVariationURL(variationURL);
         }
         test.setSaveVariation(new File(saveVariation));
         test.setCandidateReference(new File(candidateReference));

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/swing/JSVGMemoryLeakTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/swing/JSVGMemoryLeakTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/swing/JSVGMemoryLeakTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/swing/JSVGMemoryLeakTest.java Fri Aug  4 14:41:11 2017
@@ -150,14 +150,14 @@ public class JSVGMemoryLeakTest extends
         UpdateManager um = getTheCanvas().getUpdateManager();
         BridgeContext bc = um.getBridgeContext();
         BridgeContext[] ctxs = bc.getChildContexts();
-        for (int i = 0; i < ctxs.length; i++) {
-            bc = ctxs[i];
+        for (BridgeContext ctx : ctxs) {
+            bc = ctx;
             if (bc == null) {
                 continue;
             }
             String url = ((SVGOMDocument) bc.getDocument()).getURL();
             if (url.indexOf(uriSubstring) != -1) {
-                registerObjectDesc(ctxs[i], desc);
+                registerObjectDesc(ctx, desc);
             }
         }
     }
@@ -195,10 +195,10 @@ public class JSVGMemoryLeakTest extends
         registerObjectDesc(um, "updateManager");
         registerObjectDesc(bc, "bridgeContext");
         BridgeContext[] subCtxs = bc.getChildContexts();
-        for (int i = 0; i < subCtxs.length; i++) {
-            if (subCtxs[i] != null) {
-                SVGOMDocument doc = (SVGOMDocument) subCtxs[i].getDocument();
-                registerObjectDesc(subCtxs[i], "BridgeContext_" + doc.getURL());
+        for (BridgeContext subCtx : subCtxs) {
+            if (subCtx != null) {
+                SVGOMDocument doc = (SVGOMDocument) subCtx.getDocument();
+                registerObjectDesc(subCtx, "BridgeContext_" + doc.getURL());
             }
         }
     }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/AOITest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/AOITest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/AOITest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/AOITest.java Fri Aug  4 14:41:11 2017
@@ -69,9 +69,9 @@ public class AOITest extends AbstractIma
              x, 
              y, 
              width, 
-             height, 
-             Float.valueOf(-1), 
-             Float.valueOf(-1));
+             height,
+                (float) -1,
+                (float) -1);
     }
 
     /**
@@ -96,10 +96,10 @@ public class AOITest extends AbstractIma
                    Float imgHeight) {
         this.inputURI = inputURI;
         this.refImageURI = refImageURI;
-        this.aoi = new Rectangle2D.Float(x.floatValue(),
-                                         y.floatValue(),
-                                         width.floatValue(),
-                                         height.floatValue());
+        this.aoi = new Rectangle2D.Float(x,
+                y,
+                width,
+                height);
         this.imgWidth = imgWidth;
         this.imgHeight = imgHeight;
     }
@@ -117,10 +117,10 @@ public class AOITest extends AbstractIma
     protected Map createTranscodingHints() {
         Map hints = new HashMap(11);
         hints.put(ImageTranscoder.KEY_AOI, aoi);
-        if (imgWidth.floatValue() > 0) {
+        if (imgWidth > 0) {
             hints.put(ImageTranscoder.KEY_WIDTH, imgWidth);
         }
-        if (imgHeight.floatValue() > 0) {
+        if (imgHeight > 0) {
             hints.put(ImageTranscoder.KEY_HEIGHT, imgHeight);
         }
         return hints;

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DimensionTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DimensionTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DimensionTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DimensionTest.java Fri Aug  4 14:41:11 2017
@@ -74,10 +74,10 @@ public class DimensionTest extends Abstr
      */
     protected Map createTranscodingHints() {
         Map hints = new HashMap(7);
-        if (width.floatValue() > 0) {
+        if (width > 0) {
             hints.put(ImageTranscoder.KEY_WIDTH, width);
         }
-        if (height.floatValue() > 0) {
+        if (height > 0) {
             hints.put(ImageTranscoder.KEY_HEIGHT, height);
         }
         return hints;

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/MaxDimensionTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/MaxDimensionTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/MaxDimensionTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/MaxDimensionTest.java Fri Aug  4 14:41:11 2017
@@ -38,13 +38,13 @@ public class MaxDimensionTest extends Ab
     /** The URI of the reference image. */
     protected String refImageURI;
     /** The maximum width of the image. */
-    protected Float maxWidth = Float.valueOf(Float.NaN);
+    protected Float maxWidth = Float.NaN;
     /** The maximum height of the image. */
-    protected Float maxHeight = Float.valueOf(Float.NaN);
+    protected Float maxHeight = Float.NaN;
     /** The width of the image. */
-    protected Float width = Float.valueOf(Float.NaN);
+    protected Float width = Float.NaN;
     /** The height of the image. */
-    protected Float height = Float.valueOf(Float.NaN);
+    protected Float height = Float.NaN;
 
 
     //-- Constructors --------------------------------------------------------
@@ -98,16 +98,16 @@ public class MaxDimensionTest extends Ab
      */
     protected Map createTranscodingHints() {
         Map hints = new HashMap(7);
-        if (!width.isNaN() && width.floatValue() > 0) {
+        if (!width.isNaN() && width > 0) {
             hints.put(ImageTranscoder.KEY_WIDTH, width);
         }
-        if (!height.isNaN() && height.floatValue() > 0) {
+        if (!height.isNaN() && height > 0) {
             hints.put(ImageTranscoder.KEY_HEIGHT, height);
         }
-        if (maxWidth.floatValue() > 0) {
+        if (maxWidth > 0) {
             hints.put(ImageTranscoder.KEY_MAX_WIDTH, maxWidth);
         }
-        if (maxHeight.floatValue() > 0) {
+        if (maxHeight > 0) {
             hints.put(ImageTranscoder.KEY_MAX_HEIGHT, maxHeight);
         }
         return hints;

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/wmf/WMFAccuracyTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/wmf/WMFAccuracyTest.java?rev=1804130&r1=1804129&r2=1804130&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/wmf/WMFAccuracyTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/wmf/WMFAccuracyTest.java Fri Aug  4 14:41:11 2017
@@ -316,9 +316,9 @@ public class WMFAccuracyTest extends Abs
 
             report.setErrorCode(ERROR_GENERATED_SVG_INACCURATE);
             report.addDescriptionEntry(fmtMsg(ENTRY_KEY_LINE_NUMBER),
-                                       Integer.valueOf(line));
+                    line);
             report.addDescriptionEntry(fmtMsg(ENTRY_KEY_COLUMN_NUMBER),
-                                       Integer.valueOf(cn));
+                    cn);
             report.addDescriptionEntry(fmtMsg(ENTRY_KEY_COLUMN_EXPECTED_VALUE),
                                        expectedChar);
             report.addDescriptionEntry(fmtMsg(ENTRY_KEY_COLUMN_FOUND_VALUE),