git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1804125 13f79535-47bb-0310-9956-ffa450edef68pull/6/head
@@ -3644,7 +3644,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
GlyphMappingTable mapping = (GlyphMappingTable) stp[6]; | |||
List entries = (List) stp[7]; | |||
if (tt == GlyphTable.GLYPH_TABLE_TYPE_DEFINITION) { | |||
int type = GDEFLookupType.getSubtableType(lt.intValue()); | |||
int type = GDEFLookupType.getSubtableType(lt); | |||
String lid = "lu" + ln; | |||
int sequence = sn; | |||
int flags = lf; | |||
@@ -3680,7 +3680,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
GlyphCoverageTable coverage = (GlyphCoverageTable) stp[6]; | |||
List entries = (List) stp[7]; | |||
if (tt == GlyphTable.GLYPH_TABLE_TYPE_SUBSTITUTION) { | |||
int type = GSUBLookupType.getSubtableType(lt.intValue()); | |||
int type = GSUBLookupType.getSubtableType(lt); | |||
String lid = "lu" + ln; | |||
int sequence = sn; | |||
int flags = lf; | |||
@@ -3716,7 +3716,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
GlyphCoverageTable coverage = (GlyphCoverageTable) stp[6]; | |||
List entries = (List) stp[7]; | |||
if (tt == GlyphTable.GLYPH_TABLE_TYPE_POSITIONING) { | |||
int type = GSUBLookupType.getSubtableType(lt.intValue()); | |||
int type = GSUBLookupType.getSubtableType(lt); | |||
String lid = "lu" + ln; | |||
int sequence = sn; | |||
int flags = lf; |
@@ -145,7 +145,7 @@ public final class NumberProperty extends Property implements Numeric { | |||
* @return the canonical NumberProperty | |||
*/ | |||
public static NumberProperty getInstance(Double num) { | |||
return CACHE.fetch(new NumberProperty(num.doubleValue())); | |||
return CACHE.fetch(new NumberProperty(num)); | |||
} | |||
/** | |||
@@ -155,7 +155,7 @@ public final class NumberProperty extends Property implements Numeric { | |||
* @return the canonical NumberProperty | |||
*/ | |||
public static NumberProperty getInstance(Integer num) { | |||
return CACHE.fetch(new NumberProperty(num.intValue())); | |||
return CACHE.fetch(new NumberProperty(num)); | |||
} | |||
/** |
@@ -363,7 +363,7 @@ public class SingleByteFont extends CustomFont { | |||
if (this.unencodedCharacters != null) { | |||
Set<Character> sortedKeys = new TreeSet<Character>(this.unencodedCharacters.keySet()); | |||
for (Character ch : sortedKeys) { | |||
char mapped = mapChar(ch.charValue()); | |||
char mapped = mapChar(ch); | |||
assert mapped != Typeface.NOT_FOUND; | |||
} | |||
} |
@@ -249,7 +249,7 @@ public class PDFPattern extends PDFPathPaint { | |||
p.append("/Matrix [ "); | |||
for (tempInt = 0; tempInt < vectorSize; tempInt++) { | |||
p.append(PDFNumber.doubleOut( | |||
((Double)this.matrix.get(tempInt)).doubleValue(), 8)); | |||
(Double) this.matrix.get(tempInt), 8)); | |||
p.append(" "); | |||
} | |||
p.append("] \n"); | |||
@@ -304,7 +304,7 @@ public class PDFPattern extends PDFPathPaint { | |||
p.append("/Matrix [ "); | |||
for (tempInt = 0; tempInt < vectorSize; tempInt++) { | |||
p.append(PDFNumber.doubleOut( | |||
((Double)this.matrix.get(tempInt)).doubleValue(), 8)); | |||
(Double) this.matrix.get(tempInt), 8)); | |||
p.append(" "); | |||
} | |||
p.append("] \n"); |
@@ -49,7 +49,7 @@ public class GlyphNameFieldPart implements Part { | |||
private String getGlyphName(Object obj) { | |||
if (obj instanceof Character) { | |||
return Glyphs.charToGlyphName(((Character)obj).charValue()); | |||
return Glyphs.charToGlyphName((Character) obj); | |||
} else { | |||
throw new IllegalArgumentException( | |||
"Value for glyph name part must be a Character but was: " |
@@ -53,7 +53,7 @@ public class HexFieldPart implements Part { | |||
} | |||
Object obj = params.get(fieldName); | |||
if (obj instanceof Character) { | |||
sb.append(Integer.toHexString(((Character)obj).charValue())); | |||
sb.append(Integer.toHexString((Character) obj)); | |||
} else if (obj instanceof Number) { | |||
sb.append(Integer.toHexString(((Number)obj).intValue())); | |||
} else { |
@@ -139,8 +139,8 @@ public abstract class AbstractAFPObjectTest<S extends AbstractAFPObject> { | |||
int index = 0; | |||
for (byte[] anExpected : expected) { | |||
for (int j = 0; j < anExpected.length; j++) { | |||
assertTrue("" + index, actual[index] == anExpected[j]); | |||
for (byte anAnExpected : anExpected) { | |||
assertTrue("" + index, actual[index] == anAnExpected); | |||
index++; | |||
} | |||
} |
@@ -65,7 +65,7 @@ public class AFPRendererConfigParserTestCase | |||
public void testLineWidthCorrection() throws Exception { | |||
parseConfig(createRenderer()); | |||
assertEquals(AFPConstants.LINE_WIDTH_CORRECTION, | |||
conf.getLineWidthCorrection().floatValue(), 0.0001f); | |||
conf.getLineWidthCorrection(), 0.0001f); | |||
parseConfig(createRenderer().setLineWidthCorrection(1f)); | |||
assertEquals(Float.valueOf(1f), conf.getLineWidthCorrection()); | |||
} |
@@ -88,11 +88,11 @@ public class ExampleFO2PDF { | |||
// Result processing | |||
FormattingResults foResults = fop.getResults(); | |||
java.util.List pageSequences = foResults.getPageSequences(); | |||
for (java.util.Iterator it = pageSequences.iterator(); it.hasNext();) { | |||
PageSequenceResults pageSequenceResults = (PageSequenceResults)it.next(); | |||
for (Object pageSequence : pageSequences) { | |||
PageSequenceResults pageSequenceResults = (PageSequenceResults) pageSequence; | |||
System.out.println("PageSequence " | |||
+ (String.valueOf(pageSequenceResults.getID()).length() > 0 | |||
? pageSequenceResults.getID() : "<no id>") | |||
? pageSequenceResults.getID() : "<no id>") | |||
+ " generated " + pageSequenceResults.getPageCount() + " pages."); | |||
} | |||
System.out.println("Generated " + foResults.getPageCount() + " pages in total."); |
@@ -142,11 +142,11 @@ public class MultipleFO2PDF { | |||
// Result processing | |||
java.util.List pageSequences = foResults.getPageSequences(); | |||
for (java.util.Iterator it = pageSequences.iterator(); it.hasNext();) { | |||
PageSequenceResults pageSequenceResults = (PageSequenceResults)it.next(); | |||
for (Object pageSequence : pageSequences) { | |||
PageSequenceResults pageSequenceResults = (PageSequenceResults) pageSequence; | |||
System.out.println("PageSequence " | |||
+ (String.valueOf(pageSequenceResults.getID()).length() > 0 | |||
? pageSequenceResults.getID() : "<no id>") | |||
? pageSequenceResults.getID() : "<no id>") | |||
+ " generated " + pageSequenceResults.getPageCount() + " pages."); | |||
} | |||
System.out.println("Generated " + foResults.getPageCount() + " pages in total."); |
@@ -152,8 +152,8 @@ public class ExampleConcat { | |||
//Iterate over all area tree files | |||
AreaTreeParser parser = new AreaTreeParser(); | |||
for (int i = 0; i < files.length; i++) { | |||
Source src = new StreamSource(files[i]); | |||
for (File file : files) { | |||
Source src = new StreamSource(file); | |||
parser.parse(src, treeModel, userAgent); | |||
} | |||
@@ -160,8 +160,8 @@ public class ExampleConcat { | |||
IFConcatenator concatenator = new IFConcatenator(targetHandler, null); | |||
//Iterate over all intermediate files | |||
for (int i = 0; i < files.length; i++) { | |||
Source src = new StreamSource(files[i]); | |||
for (File file : files) { | |||
Source src = new StreamSource(file); | |||
concatenator.appendDocument(src); | |||
} | |||
@@ -20,7 +20,6 @@ | |||
package embedding.model; | |||
//Java | |||
import java.util.Iterator; | |||
import java.io.IOException; | |||
//SAX | |||
@@ -87,9 +86,8 @@ public class ProjectTeamXMLReader extends AbstractObjectReader { | |||
handler.startElement("projectteam"); | |||
handler.element("projectname", projectTeam.getProjectName()); | |||
Iterator i = projectTeam.getMembers().iterator(); | |||
while (i.hasNext()) { | |||
ProjectMember member = (ProjectMember)i.next(); | |||
for (Object o : projectTeam.getMembers()) { | |||
ProjectMember member = (ProjectMember) o; | |||
generateFor(member); | |||
} | |||
handler.endElement("projectteam"); |
@@ -135,7 +135,7 @@ public abstract class AbstractObjectReader implements XMLReader { | |||
* @see org.xml.sax.XMLReader#getFeature(String) | |||
*/ | |||
public boolean getFeature(java.lang.String name) { | |||
return ((Boolean) features.get(name)).booleanValue(); | |||
return (Boolean) features.get(name); | |||
} | |||
/** | |||
@@ -158,7 +158,7 @@ public abstract class AbstractObjectReader implements XMLReader { | |||
* @see org.xml.sax.XMLReader#setFeature(String, boolean) | |||
*/ | |||
public void setFeature(java.lang.String name, boolean value) { | |||
this.features.put(name, new Boolean(value)); | |||
this.features.put(name, value); | |||
} | |||
/** |