git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1758773 13f79535-47bb-0310-9956-ffa450edef68tags/fop-2_2
@@ -235,7 +235,7 @@ public class <xsl:value-of select="class-name"/> extends Base14Font { | |||
boundingBoxes[0x<xsl:value-of select="$char-num"/>] = new Rectangle(<xsl:value-of select="@llx"/>, <xsl:value-of select="@lly"/>, <xsl:value-of select="@urx - @llx"/>, <xsl:value-of select="@ury - @lly"/>);</xsl:if></xsl:template> | |||
<xsl:template match="kerning"> | |||
first = new Integer(<xsl:value-of select="@kpx1"/>); | |||
first = <xsl:value-of select="@kpx1"/>; | |||
pairs = (Map)kerning.get(first); | |||
if (pairs == null) { | |||
pairs = new java.util.HashMap(); | |||
@@ -244,8 +244,8 @@ public class <xsl:value-of select="class-name"/> extends Base14Font { | |||
<xsl:apply-templates select="pair"/></xsl:template> | |||
<xsl:template match="pair"> | |||
second = new Integer(<xsl:value-of select="@kpx2"/>); | |||
pairs.put(second, new Integer(<xsl:value-of select="@kern"/>)); | |||
second = <xsl:value-of select="@kpx2"/>; | |||
pairs.put(second, <xsl:value-of select="@kern"/>); | |||
</xsl:template> | |||
</xsl:stylesheet> |
@@ -39,7 +39,7 @@ public class AFPResourceLevelDefaults { | |||
} | |||
private static void registerResourceTypeName(String name, byte type) { | |||
RESOURCE_TYPE_NAMES.put(name.toLowerCase(), new Byte(type)); | |||
RESOURCE_TYPE_NAMES.put(name.toLowerCase(), type); | |||
} | |||
private static byte getResourceType(String resourceTypeName) { | |||
@@ -77,7 +77,7 @@ public class AFPResourceLevelDefaults { | |||
* @param level the resource level | |||
*/ | |||
public void setDefaultResourceLevel(byte type, AFPResourceLevel level) { | |||
this.defaultResourceLevels.put(new Byte(type), level); | |||
this.defaultResourceLevels.put(type, level); | |||
} | |||
/** | |||
@@ -86,7 +86,7 @@ public class AFPResourceLevelDefaults { | |||
* @return the default resource level | |||
*/ | |||
public AFPResourceLevel getDefaultResourceLevel(byte type) { | |||
AFPResourceLevel result = (AFPResourceLevel)this.defaultResourceLevels.get(new Byte(type)); | |||
AFPResourceLevel result = (AFPResourceLevel)this.defaultResourceLevels.get(type); | |||
if (result == null) { | |||
result = AFPResourceInfo.DEFAULT_LEVEL; | |||
} |
@@ -62,7 +62,7 @@ public class RasterFont extends AFPFont { | |||
*/ | |||
public void addCharacterSet(int size, CharacterSet characterSet) { | |||
//TODO: replace with Integer.valueOf() once we switch to Java 5 | |||
this.charSets.put(new Integer(size), characterSet); | |||
this.charSets.put(size, characterSet); | |||
this.charSet = characterSet; | |||
} | |||
@@ -74,7 +74,7 @@ public class RasterFont extends AFPFont { | |||
*/ | |||
public CharacterSet getCharacterSet(int sizeInMpt) { | |||
Integer requestedSize = Integer.valueOf(sizeInMpt); | |||
Integer requestedSize = sizeInMpt; | |||
CharacterSet csm = charSets.get(requestedSize); | |||
double sizeInPt = sizeInMpt / 1000.0; | |||
@@ -101,9 +101,9 @@ public class RasterFont extends AFPFont { | |||
Integer fontSize; | |||
if (!smallerSizes.isEmpty() | |||
&& (sizeInMpt - smallerSize) <= (largerSize - sizeInMpt)) { | |||
fontSize = Integer.valueOf(smallerSize); | |||
fontSize = smallerSize; | |||
} else { | |||
fontSize = Integer.valueOf(largerSize); | |||
fontSize = largerSize; | |||
} | |||
csm = charSets.get(fontSize); | |||
@@ -1085,7 +1085,7 @@ public class AreaTreeParser { | |||
if (value != null) { | |||
Class cl = Trait.getTraitClass(trait); | |||
if (cl == Integer.class) { | |||
area.addTrait(trait, new Integer(value)); | |||
area.addTrait(trait, Integer.valueOf(value)); | |||
} else if (cl == Boolean.class) { | |||
area.addTrait(trait, Boolean.valueOf(value)); | |||
} else if (cl == String.class) { |
@@ -48,7 +48,7 @@ public final class Trait implements Serializable { | |||
} | |||
/** Id reference line, not resolved. (not sure if this is needed.) */ | |||
//public static final Integer ID_LINK = new Integer(0); | |||
//public static final Integer ID_LINK = Integer.valueOf(0); | |||
/** | |||
* Internal link trait. | |||
@@ -84,10 +84,10 @@ public final class Trait implements Serializable { | |||
public static final Integer LINETHROUGH = 12; | |||
/** Shadow offset. */ | |||
//public static final Integer OFFSET = new Integer(13); | |||
//public static final Integer OFFSET = Integer.valueOf(13); | |||
/** The shadow for text. */ | |||
//public static final Integer SHADOW = new Integer(14); | |||
//public static final Integer SHADOW = Integer.valueOf(14); | |||
/** The border start. */ | |||
public static final Integer BORDER_START = 15; | |||
@@ -120,10 +120,10 @@ public final class Trait implements Serializable { | |||
public static final Integer SPACE_END = 24; | |||
/** break before */ | |||
//public static final Integer BREAK_BEFORE = new Integer(25); | |||
//public static final Integer BREAK_BEFORE = Integer.valueOf(25); | |||
/** break after */ | |||
//public static final Integer BREAK_AFTER = new Integer(26); | |||
//public static final Integer BREAK_AFTER = Integer.valueOf(26); | |||
/** The start-indent trait. */ | |||
public static final Integer START_INDENT = 27; |
@@ -602,11 +602,11 @@ public class CommandLineOptions { | |||
for (int j = 0; j < parts.length; j++) { | |||
String s = parts[j]; | |||
if (s.matches("\\d+")) { | |||
renderingOptions.put(PrintRenderer.START_PAGE, new Integer(s)); | |||
renderingOptions.put(PrintRenderer.START_PAGE, Integer.valueOf(s)); | |||
} else if (s.matches("\\d+-\\d+")) { | |||
String[] startend = s.split("-"); | |||
renderingOptions.put(PrintRenderer.START_PAGE, new Integer(startend[0])); | |||
renderingOptions.put(PrintRenderer.END_PAGE, new Integer(startend[1])); | |||
renderingOptions.put(PrintRenderer.START_PAGE, Integer.valueOf(startend[0])); | |||
renderingOptions.put(PrintRenderer.END_PAGE, Integer.valueOf(startend[1])); | |||
} else { | |||
PagesMode mode = PagesMode.byName(s); | |||
renderingOptions.put(PrintRenderer.PAGES_MODE, mode); | |||
@@ -623,7 +623,7 @@ public class CommandLineOptions { | |||
|| (isOption(args[i + 1]))) { | |||
throw new FOPException("you must specify the number of copies"); | |||
} else { | |||
renderingOptions.put(PrintRenderer.COPIES, new Integer(args[i + 1])); | |||
renderingOptions.put(PrintRenderer.COPIES, Integer.valueOf(args[i + 1])); | |||
return 1; | |||
} | |||
} |
@@ -159,10 +159,10 @@ public final class GlyphClassTable extends GlyphMappingTable implements GlyphCla | |||
/** {@inheritDoc} */ | |||
public List getEntries() { | |||
List entries = new java.util.ArrayList(); | |||
entries.add(Integer.valueOf(firstGlyph)); | |||
entries.add(firstGlyph); | |||
if (gca != null) { | |||
for (int i = 0, n = gca.length; i < n; i++) { | |||
entries.add(Integer.valueOf(gca [ i ])); | |||
entries.add(gca[i]); | |||
} | |||
} | |||
return entries; |
@@ -147,7 +147,7 @@ public final class GlyphCoverageTable extends GlyphMappingTable implements Glyph | |||
List entries = new java.util.ArrayList(); | |||
if (map != null) { | |||
for (int i = 0, n = map.length; i < n; i++) { | |||
entries.add(Integer.valueOf(map [ i ])); | |||
entries.add(map[i]); | |||
} | |||
} | |||
return entries; |
@@ -535,8 +535,8 @@ public class GlyphPositioningTable extends GlyphTable { | |||
List entries = new ArrayList(5); | |||
entries.add(cdt1); | |||
entries.add(cdt2); | |||
entries.add(Integer.valueOf(nc1)); | |||
entries.add(Integer.valueOf(nc2)); | |||
entries.add(nc1); | |||
entries.add(nc2); | |||
entries.add(pvm); | |||
return entries; | |||
} else { | |||
@@ -796,7 +796,7 @@ public class GlyphPositioningTable extends GlyphTable { | |||
if ((bct != null) && (maa != null) && (nmc > 0) && (bam != null)) { | |||
List entries = new ArrayList(4); | |||
entries.add(bct); | |||
entries.add(Integer.valueOf(nmc)); | |||
entries.add(nmc); | |||
entries.add(maa); | |||
entries.add(bam); | |||
return entries; | |||
@@ -942,8 +942,8 @@ public class GlyphPositioningTable extends GlyphTable { | |||
if (lam != null) { | |||
List entries = new ArrayList(5); | |||
entries.add(lct); | |||
entries.add(Integer.valueOf(nmc)); | |||
entries.add(Integer.valueOf(mxc)); | |||
entries.add(nmc); | |||
entries.add(mxc); | |||
entries.add(maa); | |||
entries.add(lam); | |||
return entries; | |||
@@ -1086,7 +1086,7 @@ public class GlyphPositioningTable extends GlyphTable { | |||
if ((mct2 != null) && (maa != null) && (nmc > 0) && (mam != null)) { | |||
List entries = new ArrayList(4); | |||
entries.add(mct2); | |||
entries.add(Integer.valueOf(nmc)); | |||
entries.add(nmc); | |||
entries.add(maa); | |||
entries.add(mam); | |||
return entries; | |||
@@ -1293,7 +1293,7 @@ public class GlyphPositioningTable extends GlyphTable { | |||
if (rsa != null) { | |||
List entries = new ArrayList(3); | |||
entries.add(cdt); | |||
entries.add(Integer.valueOf(ngc)); | |||
entries.add(ngc); | |||
entries.add(rsa); | |||
return entries; | |||
} else { | |||
@@ -1608,7 +1608,7 @@ public class GlyphPositioningTable extends GlyphTable { | |||
entries.add(icdt); | |||
entries.add(bcdt); | |||
entries.add(lcdt); | |||
entries.add(Integer.valueOf(ngc)); | |||
entries.add(ngc); | |||
entries.add(rsa); | |||
return entries; | |||
} else { |
@@ -287,7 +287,7 @@ public class GlyphSubstitutionTable extends GlyphTable { | |||
/** {@inheritDoc} */ | |||
public List getEntries() { | |||
List entries = new ArrayList(1); | |||
entries.add(Integer.valueOf(delta)); | |||
entries.add(delta); | |||
return entries; | |||
} | |||
/** {@inheritDoc} */ | |||
@@ -325,7 +325,7 @@ public class GlyphSubstitutionTable extends GlyphTable { | |||
public List getEntries() { | |||
List entries = new ArrayList(glyphs.length); | |||
for (int i = 0, n = glyphs.length; i < n; i++) { | |||
entries.add(Integer.valueOf(glyphs[i])); | |||
entries.add(glyphs[i]); | |||
} | |||
return entries; | |||
} | |||
@@ -822,7 +822,7 @@ public class GlyphSubstitutionTable extends GlyphTable { | |||
if (rsa != null) { | |||
List entries = new ArrayList(3); | |||
entries.add(cdt); | |||
entries.add(Integer.valueOf(ngc)); | |||
entries.add(ngc); | |||
entries.add(rsa); | |||
return entries; | |||
} else { | |||
@@ -1138,7 +1138,7 @@ public class GlyphSubstitutionTable extends GlyphTable { | |||
entries.add(icdt); | |||
entries.add(bcdt); | |||
entries.add(lcdt); | |||
entries.add(Integer.valueOf(ngc)); | |||
entries.add(ngc); | |||
entries.add(rsa); | |||
return entries; | |||
} else { |
@@ -557,7 +557,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
for (int i = 0, n = ng; i < n; i++) { | |||
int g = in.readTTFUShort(); | |||
ga[i] = g; | |||
entries.add(Integer.valueOf(g)); | |||
entries.add(g); | |||
} | |||
// dump info if debugging | |||
if (log.isDebugEnabled()) { | |||
@@ -613,7 +613,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
in.skip(2); | |||
// read start glyph | |||
int sg = in.readTTFUShort(); | |||
entries.add(Integer.valueOf(sg)); | |||
entries.add(sg); | |||
// read glyph count | |||
int ng = in.readTTFUShort(); | |||
// read glyph classes | |||
@@ -621,7 +621,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
for (int i = 0, n = ng; i < n; i++) { | |||
int gc = in.readTTFUShort(); | |||
ca[i] = gc; | |||
entries.add(Integer.valueOf(gc)); | |||
entries.add(gc); | |||
} | |||
// dump info if debugging | |||
if (log.isDebugEnabled()) { | |||
@@ -687,7 +687,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
} | |||
// read coverage table | |||
seMapping = readCoverageTable(tableTag + " single substitution coverage", subtableOffset + co); | |||
seEntries.add(Integer.valueOf(dg)); | |||
seEntries.add(dg); | |||
} | |||
private void readSingleSubTableFormat2(int lookupType, int lookupFlags, long subtableOffset, int subtableFormat) throws IOException { | |||
@@ -715,7 +715,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
log.debug(tableTag + " single substitution glyph[" + i + "]: " + gs); | |||
} | |||
gsa[i] = gs; | |||
seEntries.add(Integer.valueOf(gs)); | |||
seEntries.add(gs); | |||
} | |||
} | |||
@@ -1101,7 +1101,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
// store results | |||
seMapping = ct; | |||
seEntries.add(cdt); | |||
seEntries.add(Integer.valueOf(ngc)); | |||
seEntries.add(ngc); | |||
seEntries.add(rsa); | |||
} | |||
@@ -1397,7 +1397,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
seEntries.add(icdt); | |||
seEntries.add(bcdt); | |||
seEntries.add(lcdt); | |||
seEntries.add(Integer.valueOf(ngc)); | |||
seEntries.add(ngc); | |||
seEntries.add(rsa); | |||
} | |||
@@ -1999,8 +1999,8 @@ public final class OTFAdvancedTypographicTableReader { | |||
seMapping = ct; | |||
seEntries.add(cdt1); | |||
seEntries.add(cdt2); | |||
seEntries.add(Integer.valueOf(nc1)); | |||
seEntries.add(Integer.valueOf(nc2)); | |||
seEntries.add(nc1); | |||
seEntries.add(nc2); | |||
seEntries.add(pvm); | |||
} | |||
@@ -2225,7 +2225,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
// store results | |||
seMapping = mct; | |||
seEntries.add(bct); | |||
seEntries.add(Integer.valueOf(nmc)); | |||
seEntries.add(nmc); | |||
seEntries.add(maa); | |||
seEntries.add(bam); | |||
} | |||
@@ -2359,8 +2359,8 @@ public final class OTFAdvancedTypographicTableReader { | |||
// store results | |||
seMapping = mct; | |||
seEntries.add(lct); | |||
seEntries.add(Integer.valueOf(nmc)); | |||
seEntries.add(Integer.valueOf(mxc)); | |||
seEntries.add(nmc); | |||
seEntries.add(mxc); | |||
seEntries.add(maa); | |||
seEntries.add(lam); | |||
} | |||
@@ -2466,7 +2466,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
// store results | |||
seMapping = mct1; | |||
seEntries.add(mct2); | |||
seEntries.add(Integer.valueOf(nmc)); | |||
seEntries.add(nmc); | |||
seEntries.add(maa); | |||
seEntries.add(mam); | |||
} | |||
@@ -2660,7 +2660,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
// store results | |||
seMapping = ct; | |||
seEntries.add(cdt); | |||
seEntries.add(Integer.valueOf(ngc)); | |||
seEntries.add(ngc); | |||
seEntries.add(rsa); | |||
} | |||
@@ -2956,7 +2956,7 @@ public final class OTFAdvancedTypographicTableReader { | |||
seEntries.add(icdt); | |||
seEntries.add(bcdt); | |||
seEntries.add(lcdt); | |||
seEntries.add(Integer.valueOf(ngc)); | |||
seEntries.add(ngc); | |||
seEntries.add(rsa); | |||
} | |||
@@ -3755,12 +3755,12 @@ public final class OTFAdvancedTypographicTableReader { | |||
if (seEntries != null) { | |||
if ((tableType == GlyphTable.GLYPH_TABLE_TYPE_DEFINITION) || (seEntries.size() > 0)) { | |||
if (seSubtables != null) { | |||
Integer tt = Integer.valueOf(tableType); | |||
Integer lt = Integer.valueOf(lookupType); | |||
Integer ln = Integer.valueOf(lookupSequence); | |||
Integer lf = Integer.valueOf(lookupFlags); | |||
Integer sn = Integer.valueOf(subtableSequence); | |||
Integer sf = Integer.valueOf(subtableFormat); | |||
Integer tt = tableType; | |||
Integer lt = lookupType; | |||
Integer ln = lookupSequence; | |||
Integer lf = lookupFlags; | |||
Integer sn = subtableSequence; | |||
Integer sf = subtableFormat; | |||
seSubtables.add(new Object[] { tt, lt, ln, lf, sn, sf, seMapping, seEntries }); | |||
} | |||
} |
@@ -708,7 +708,7 @@ public final class CharScript { | |||
public static int[] scriptsOf(CharSequence cs) { | |||
Set s = new HashSet(); | |||
for (int i = 0, n = cs.length(); i < n; i++) { | |||
s.add(Integer.valueOf(scriptOf(cs.charAt(i)))); | |||
s.add(scriptOf(cs.charAt(i))); | |||
} | |||
int[] sa = new int [ s.size() ]; | |||
int ns = 0; | |||
@@ -729,12 +729,12 @@ public final class CharScript { | |||
for (int i = 0, n = cs.length(); i < n; i++) { | |||
int c = cs.charAt(i); | |||
int s = scriptOf(c); | |||
Integer k = Integer.valueOf(s); | |||
Integer k = s; | |||
Integer v = (Integer) m.get(k); | |||
if (v != null) { | |||
m.put(k, Integer.valueOf(v.intValue() + 1)); | |||
m.put(k, v.intValue() + 1); | |||
} else { | |||
m.put(k, Integer.valueOf(0)); | |||
m.put(k, 0); | |||
} | |||
} | |||
int sMax = -1; | |||
@@ -818,7 +818,7 @@ public final class CharScript { | |||
Map<Integer, String> m = getScriptTagsMap(); | |||
if (m != null) { | |||
String tag; | |||
if ((tag = m.get(Integer.valueOf(code))) != null) { | |||
if ((tag = m.get(code)) != null) { | |||
return tag; | |||
} else { | |||
return ""; | |||
@@ -855,8 +855,8 @@ public final class CharScript { | |||
assert tag.length() != 0; | |||
assert code >= 0; | |||
assert code < 2000; | |||
tm.put(Integer.valueOf(code), tag); | |||
cm.put(tag, Integer.valueOf(code)); | |||
tm.put(code, tag); | |||
cm.put(tag, code); | |||
} | |||
private static void makeScriptMaps() { |
@@ -45,7 +45,7 @@ public abstract class CharIterator implements Iterator, Cloneable { | |||
* {@inheritDoc} | |||
*/ | |||
public Object next() throws NoSuchElementException { | |||
return new Character(nextChar()); | |||
return nextChar(); | |||
} | |||
/** |
@@ -87,7 +87,7 @@ public class NumericProperty extends Property implements Numeric, Length { | |||
/** {@inheritDoc} */ | |||
public Number getNumber() { | |||
return new Double(value); | |||
return value; | |||
} | |||
/** {@inheritDoc} */ |
@@ -256,11 +256,11 @@ public final class PropertyParser extends PropertyTokenizer { | |||
break; | |||
case TOK_FLOAT: | |||
prop = NumberProperty.getInstance(new Double(currentTokenValue)); | |||
prop = NumberProperty.getInstance(Double.valueOf(currentTokenValue)); | |||
break; | |||
case TOK_INTEGER: | |||
prop = NumberProperty.getInstance(new Integer(currentTokenValue)); | |||
prop = NumberProperty.getInstance(Integer.valueOf(currentTokenValue)); | |||
break; | |||
case TOK_PERCENT: |
@@ -76,7 +76,7 @@ public final class CharacterProperty extends Property { | |||
* @return this.character cast as an Object | |||
*/ | |||
public Object getObject() { | |||
return new Character(character); | |||
return character; | |||
} | |||
/** |
@@ -121,12 +121,12 @@ public final class NumberProperty extends Property implements Numeric { | |||
//if possible | |||
if (num == Math.floor(num)) { | |||
if (num < Integer.MAX_VALUE) { | |||
this.number = new Integer((int)num); | |||
this.number = (int) num; | |||
} else { | |||
this.number = new Long((long)num); | |||
this.number = (long) num; | |||
} | |||
} else { | |||
this.number = new Double(num); | |||
this.number = num; | |||
} | |||
} | |||
@@ -135,7 +135,7 @@ public final class NumberProperty extends Property implements Numeric { | |||
* @param num integer numeric value for property | |||
*/ | |||
private NumberProperty(int num) { | |||
this.number = new Integer(num); | |||
this.number = num; | |||
} | |||
/** |
@@ -116,7 +116,7 @@ public final class PropertyCache<T> { | |||
return null; | |||
} | |||
Integer hashCode = Integer.valueOf(obj.hashCode()); | |||
Integer hashCode = obj.hashCode(); | |||
WeakReference<T> weakRef = map.get(hashCode); | |||
if (weakRef == null) { |
@@ -91,7 +91,7 @@ public class CIDFull implements CIDSet { | |||
int nextBitSet = 0; | |||
for (int j = 0; j < glyphIndices.cardinality(); j++) { | |||
nextBitSet = glyphIndices.nextSetBit(nextBitSet); | |||
glyphs.put(Integer.valueOf(nextBitSet), Integer.valueOf(nextBitSet)); | |||
glyphs.put(nextBitSet, nextBitSet); | |||
nextBitSet++; | |||
} | |||
return Collections.unmodifiableMap(glyphs); |
@@ -433,7 +433,7 @@ public final class FontCache implements Serializable { | |||
public void registerFailedFont(String embedUrl, long lastModified) { | |||
synchronized (changeLock) { | |||
if (!getFailedFontMap().containsKey(embedUrl)) { | |||
getFailedFontMap().put(embedUrl, new Long(lastModified)); | |||
getFailedFontMap().put(embedUrl, lastModified); | |||
changed = true; | |||
} | |||
} |
@@ -143,7 +143,7 @@ public class FontInfo { | |||
} | |||
} | |||
this.triplets.put(triplet, internalFontKey); | |||
this.tripletPriorities.put(triplet, Integer.valueOf(newPriority)); | |||
this.tripletPriorities.put(triplet, newPriority); | |||
} | |||
/** | |||
@@ -304,7 +304,7 @@ public class FontInfo { | |||
sizes = new HashMap<Integer, Font>(); | |||
getFontInstanceCache().put(triplet, sizes); | |||
} | |||
Integer size = Integer.valueOf(fontSize); | |||
Integer size = fontSize; | |||
Font font = sizes.get(size); | |||
if (font == null) { | |||
String fontKey = getInternalFontKey(triplet); |
@@ -54,7 +54,7 @@ public class SimpleSingleByteEncoding implements SingleByteEncoding { | |||
/** {@inheritDoc} */ | |||
public char mapChar(char c) { | |||
Character nc = charMap.get(Character.valueOf(c)); | |||
Character nc = charMap.get(c); | |||
if (nc != null) { | |||
return nc.charValue(); | |||
} | |||
@@ -119,7 +119,7 @@ public class SimpleSingleByteEncoding implements SingleByteEncoding { | |||
} | |||
char newSlot = (char)(getLastChar() + 1); | |||
this.mapping.add(ch); | |||
this.charMap.put(Character.valueOf(ch.getSingleUnicodeValue()), Character.valueOf(newSlot)); | |||
this.charMap.put(ch.getSingleUnicodeValue(), newSlot); | |||
return newSlot; | |||
} | |||
@@ -122,7 +122,7 @@ public class SingleByteFont extends CustomFont { | |||
int codePoint = i % 256; | |||
NamedCharacter nc = encoding.getCharacterForIndex(codePoint); | |||
UnencodedCharacter uc | |||
= this.unencodedCharacters.get(Character.valueOf(nc.getSingleUnicodeValue())); | |||
= this.unencodedCharacters.get(nc.getSingleUnicodeValue()); | |||
return size * uc.getWidth(); | |||
} | |||
return 0; | |||
@@ -147,7 +147,7 @@ public class SingleByteFont extends CustomFont { | |||
SimpleSingleByteEncoding encoding = getAdditionalEncoding(encodingIndex); | |||
int codePoint = glyphIndex % 256; | |||
NamedCharacter nc = encoding.getCharacterForIndex(codePoint); | |||
UnencodedCharacter uc = this.unencodedCharacters.get(Character.valueOf(nc.getSingleUnicodeValue())); | |||
UnencodedCharacter uc = this.unencodedCharacters.get(nc.getSingleUnicodeValue()); | |||
bbox = uc.getBBox(); | |||
} | |||
return bbox == null ? null : new Rectangle(bbox.x * size, bbox.y * size, bbox.width * size, bbox.height * size); | |||
@@ -255,7 +255,7 @@ public class SingleByteFont extends CustomFont { | |||
private char mapUnencodedChar(char ch) { | |||
if (this.unencodedCharacters != null) { | |||
UnencodedCharacter unencoded = this.unencodedCharacters.get(Character.valueOf(ch)); | |||
UnencodedCharacter unencoded = this.unencodedCharacters.get(ch); | |||
if (unencoded != null) { | |||
if (this.additionalEncodings == null) { | |||
this.additionalEncodings = new ArrayList<SimpleSingleByteEncoding>(); | |||
@@ -384,7 +384,7 @@ public class SingleByteFont extends CustomFont { | |||
} | |||
if (ch.hasSingleUnicodeValue()) { | |||
UnencodedCharacter uc = new UnencodedCharacter(ch, width, bbox); | |||
this.unencodedCharacters.put(Character.valueOf(ch.getSingleUnicodeValue()), uc); | |||
this.unencodedCharacters.put(ch.getSingleUnicodeValue(), uc); | |||
} else { | |||
//Cannot deal with unicode sequences, so ignore this character | |||
} | |||
@@ -452,7 +452,7 @@ public class SingleByteFont extends CustomFont { | |||
for (int i = 0, c = arr.length; i < c; i++) { | |||
NamedCharacter nc = enc.getCharacterForIndex(enc.getFirstChar() + i); | |||
UnencodedCharacter uc = this.unencodedCharacters.get( | |||
Character.valueOf(nc.getSingleUnicodeValue())); | |||
nc.getSingleUnicodeValue()); | |||
arr[i] = uc.getWidth(); | |||
} | |||
return arr; |
@@ -125,7 +125,7 @@ public abstract class Typeface implements FontMetrics { | |||
*/ | |||
protected void warnMissingGlyph(char c) { | |||
// Give up, character is not available | |||
Character ch = new Character(c); | |||
Character ch = c; | |||
if (warnedChars == null) { | |||
warnedChars = new HashSet<Character>(); | |||
} |
@@ -233,22 +233,22 @@ public class PFMReader extends AbstractFontReader { | |||
el = doc.createElement("cap-height"); | |||
root.appendChild(el); | |||
Integer value = new Integer(pfm.getCapHeight()); | |||
Integer value = pfm.getCapHeight(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
el = doc.createElement("x-height"); | |||
root.appendChild(el); | |||
value = new Integer(pfm.getXHeight()); | |||
value = pfm.getXHeight(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
el = doc.createElement("ascender"); | |||
root.appendChild(el); | |||
value = new Integer(pfm.getLowerCaseAscent()); | |||
value = pfm.getLowerCaseAscent(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
el = doc.createElement("descender"); | |||
root.appendChild(el); | |||
value = new Integer(pfm.getLowerCaseDescent()); | |||
value = pfm.getLowerCaseDescent(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
Element bbox = doc.createElement("bbox"); | |||
@@ -258,33 +258,33 @@ public class PFMReader extends AbstractFontReader { | |||
for (int i = 0; i < names.length; i++) { | |||
el = doc.createElement(names[i]); | |||
bbox.appendChild(el); | |||
value = new Integer(bb[i]); | |||
value = bb[i]; | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
} | |||
el = doc.createElement("flags"); | |||
root.appendChild(el); | |||
value = new Integer(pfm.getFlags()); | |||
value = pfm.getFlags(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
el = doc.createElement("stemv"); | |||
root.appendChild(el); | |||
value = new Integer(pfm.getStemV()); | |||
value = pfm.getStemV(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
el = doc.createElement("italicangle"); | |||
root.appendChild(el); | |||
value = new Integer(pfm.getItalicAngle()); | |||
value = pfm.getItalicAngle(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
el = doc.createElement("first-char"); | |||
root.appendChild(el); | |||
value = new Integer(pfm.getFirstChar()); | |||
value = (int) pfm.getFirstChar(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
el = doc.createElement("last-char"); | |||
root.appendChild(el); | |||
value = new Integer(pfm.getLastChar()); | |||
value = (int) pfm.getLastChar(); | |||
el.appendChild(doc.createTextNode(value.toString())); | |||
Element widths = doc.createElement("widths"); |
@@ -275,8 +275,8 @@ public abstract class OpenFont { | |||
UnicodeMapping(OpenFont font, int glyphIndex, int unicodeIndex) { | |||
this.unicodeIndex = unicodeIndex; | |||
this.glyphIndex = glyphIndex; | |||
font.glyphToUnicodeMap.put(new Integer(glyphIndex), new Integer(unicodeIndex)); | |||
font.unicodeToGlyphMap.put(new Integer(unicodeIndex), new Integer(glyphIndex)); | |||
font.glyphToUnicodeMap.put(glyphIndex, unicodeIndex); | |||
font.unicodeToGlyphMap.put(unicodeIndex, glyphIndex); | |||
} | |||
/** | |||
@@ -535,7 +535,7 @@ public abstract class OpenFont { | |||
& 0xffff; | |||
//mtxTab[glyphIdx].setName(mtxTab[glyphIdx].getName() + " - "+(char)j); | |||
unicodeMappings.add(new UnicodeMapping(this, glyphIdx, j)); | |||
mtxTab[glyphIdx].getUnicodeIndex().add(new Integer(j)); | |||
mtxTab[glyphIdx].getUnicodeIndex().add(j); | |||
if (encodingID == 0 && j >= 0xF020 && j <= 0xF0FF) { | |||
//Experimental: Mapping 0xF020-0xF0FF to 0x0020-0x00FF | |||
@@ -545,12 +545,12 @@ public abstract class OpenFont { | |||
if (!eightBitGlyphs.get(mapped)) { | |||
//Only map if Unicode code point hasn't been mapped before | |||
unicodeMappings.add(new UnicodeMapping(this, glyphIdx, mapped)); | |||
mtxTab[glyphIdx].getUnicodeIndex().add(new Integer(mapped)); | |||
mtxTab[glyphIdx].getUnicodeIndex().add(mapped); | |||
} | |||
} | |||
// Also add winAnsiWidth | |||
List<Integer> v = ansiIndex.get(new Integer(j)); | |||
List<Integer> v = ansiIndex.get(j); | |||
if (v != null) { | |||
for (Integer aIdx : v) { | |||
ansiWidth[aIdx.intValue()] | |||
@@ -576,7 +576,7 @@ public abstract class OpenFont { | |||
glyphIdx = (j + cmapDeltas[i]) & 0xffff; | |||
if (glyphIdx < mtxTab.length) { | |||
mtxTab[glyphIdx].getUnicodeIndex().add(new Integer(j)); | |||
mtxTab[glyphIdx].getUnicodeIndex().add(j); | |||
} else { | |||
log.debug("Glyph " + glyphIdx | |||
+ " out of range: " | |||
@@ -585,7 +585,7 @@ public abstract class OpenFont { | |||
unicodeMappings.add(new UnicodeMapping(this, glyphIdx, j)); | |||
if (glyphIdx < mtxTab.length) { | |||
mtxTab[glyphIdx].getUnicodeIndex().add(new Integer(j)); | |||
mtxTab[glyphIdx].getUnicodeIndex().add(j); | |||
} else { | |||
log.debug("Glyph " + glyphIdx | |||
+ " out of range: " | |||
@@ -593,7 +593,7 @@ public abstract class OpenFont { | |||
} | |||
// Also add winAnsiWidth | |||
List<Integer> v = ansiIndex.get(new Integer(j)); | |||
List<Integer> v = ansiIndex.get(j); | |||
if (v != null) { | |||
for (Integer aIdx : v) { | |||
ansiWidth[aIdx.intValue()] = mtxTab[glyphIdx].getWx(); | |||
@@ -685,8 +685,8 @@ public abstract class OpenFont { | |||
// same char (eg bullet) is repeated more than one place | |||
ansiIndex = new HashMap<Integer, List<Integer>>(); | |||
for (int i = 32; i < Glyphs.WINANSI_ENCODING.length; i++) { | |||
Integer ansi = new Integer(i); | |||
Integer uni = new Integer(Glyphs.WINANSI_ENCODING[i]); | |||
Integer ansi = i; | |||
Integer uni = (int) Glyphs.WINANSI_ENCODING[i]; | |||
List<Integer> v = ansiIndex.get(uni); | |||
if (v == null) { | |||
@@ -1614,7 +1614,7 @@ public abstract class OpenFont { | |||
if (adjTab == null) { | |||
adjTab = new HashMap<Integer, Integer>(); | |||
} | |||
adjTab.put(u2, new Integer(convertTTFUnit2PDFUnit(kpx))); | |||
adjTab.put(u2, convertTTFUnit2PDFUnit(kpx)); | |||
kerningTab.put(iObj, adjTab); | |||
} | |||
} | |||
@@ -1852,7 +1852,7 @@ public abstract class OpenFont { | |||
List<Integer> ret = new ArrayList<Integer>(); | |||
for (int i = 32; i < Glyphs.WINANSI_ENCODING.length; i++) { | |||
if (unicode == Glyphs.WINANSI_ENCODING[i]) { | |||
ret.add(new Integer(i)); | |||
ret.add(i); | |||
} | |||
} | |||
return ret.toArray(new Integer[ret.size()]); | |||
@@ -1898,7 +1898,7 @@ public abstract class OpenFont { | |||
* @return unicode code point | |||
*/ | |||
private Integer glyphToUnicode(int glyphIndex) { | |||
return glyphToUnicodeMap.get(new Integer(glyphIndex)); | |||
return glyphToUnicodeMap.get(glyphIndex); | |||
} | |||
/** | |||
@@ -1909,7 +1909,7 @@ public abstract class OpenFont { | |||
*/ | |||
private Integer unicodeToGlyph(int unicodeIndex) throws IOException { | |||
final Integer result | |||
= unicodeToGlyphMap.get(new Integer(unicodeIndex)); | |||
= unicodeToGlyphMap.get(unicodeIndex); | |||
if (result == null) { | |||
throw new IOException( | |||
"Glyph index not found for unicode value " + unicodeIndex); |
@@ -430,7 +430,7 @@ public class AFMFile { | |||
continue; | |||
} | |||
if (container == null) { | |||
Integer k1 = Integer.valueOf(chm1.getCharCode()); | |||
Integer k1 = chm1.getCharCode(); | |||
container = m.get(k1); | |||
if (container == null) { | |||
container = new java.util.HashMap<Integer, Integer>(); | |||
@@ -438,8 +438,8 @@ public class AFMFile { | |||
} | |||
} | |||
Dimension2D dim = entryTo.getValue(); | |||
container.put(Integer.valueOf(chm2.getCharCode()), | |||
Integer.valueOf((int)Math.round(dim.getWidth()))); | |||
container.put(chm2.getCharCode(), | |||
(int) Math.round(dim.getWidth())); | |||
} | |||
} | |||
return m; |
@@ -148,8 +148,8 @@ public class AFMParser { | |||
VALUE_PARSERS.put(KPY, new NotImplementedYet(KPY)); | |||
PARSE_MODE_CHANGES = new HashMap<String, Integer>(); | |||
PARSE_MODE_CHANGES.put(START_CHAR_METRICS, new Integer(PARSE_CHAR_METRICS)); | |||
PARSE_MODE_CHANGES.put(END_CHAR_METRICS, new Integer(PARSE_NORMAL)); | |||
PARSE_MODE_CHANGES.put(START_CHAR_METRICS, PARSE_CHAR_METRICS); | |||
PARSE_MODE_CHANGES.put(END_CHAR_METRICS, PARSE_NORMAL); | |||
} | |||
/** | |||
@@ -278,9 +278,9 @@ public class AFMParser { | |||
protected Number getNumberValue(String line, int startpos) { | |||
try { | |||
return new Integer(getIntegerValue(line, startpos)); | |||
return getIntegerValue(line, startpos); | |||
} catch (NumberFormatException nfe) { | |||
return new Double(getDoubleValue(line, startpos)); | |||
return getDoubleValue(line, startpos); | |||
} | |||
} | |||
@@ -384,7 +384,7 @@ public class AFMParser { | |||
public void parse(String line, int startpos, Stack<Object> stack) throws IOException { | |||
int value = getIntegerValue(line, startpos); | |||
setValue(getContextObject(stack), int.class, new Integer(value)); | |||
setValue(getContextObject(stack), int.class, value); | |||
} | |||
} | |||
@@ -395,7 +395,7 @@ public class AFMParser { | |||
public void parse(String line, int startpos, Stack<Object> stack) throws IOException { | |||
double value = getDoubleValue(line, startpos); | |||
setValue(getContextObject(stack), double.class, new Double(value)); | |||
setValue(getContextObject(stack), double.class, value); | |||
} | |||
} | |||
@@ -429,7 +429,7 @@ public class AFMParser { | |||
public void parse(String line, int startpos, Stack<Object> stack) throws IOException { | |||
double value = getDoubleValue(line, startpos); | |||
setValue(getContextObject(stack), double.class, new Double(value)); | |||
setValue(getContextObject(stack), double.class, value); | |||
} | |||
} | |||
@@ -235,12 +235,12 @@ public class PFMFile { | |||
log.trace("glyphs: " + glyph1 + ", " + glyph2); | |||
} | |||
Map<Integer, Integer> adjTab = kerningTab.get(Integer.valueOf(g1)); | |||
Map<Integer, Integer> adjTab = kerningTab.get(g1); | |||
if (adjTab == null) { | |||
adjTab = new HashMap<Integer, Integer>(); | |||
} | |||
adjTab.put(Integer.valueOf(g2), Integer.valueOf(adj)); | |||
kerningTab.put(Integer.valueOf(g1), adjTab); | |||
adjTab.put(g2, adj); | |||
kerningTab.put(g1, adjTab); | |||
} | |||
} | |||
@@ -558,8 +558,8 @@ public final class TraitSetter { | |||
*/ | |||
public static void addBreaks(Area area, int breakBefore, int breakAfter) { | |||
/* Currently disabled as these traits are never used by the renderers | |||
area.addTrait(Trait.BREAK_AFTER, new Integer(breakAfter)); | |||
area.addTrait(Trait.BREAK_BEFORE, new Integer(breakBefore)); | |||
area.addTrait(Trait.BREAK_AFTER, Integer.valueOf(breakAfter)); | |||
area.addTrait(Trait.BREAK_BEFORE, Integer.valueOf(breakBefore)); | |||
*/ | |||
} | |||
@@ -1510,7 +1510,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager | |||
lineArea.addTrait(Trait.START_INDENT, lbp.startIndent); | |||
} | |||
if (lbp.endIndent != 0) { | |||
lineArea.addTrait(Trait.END_INDENT, new Integer(lbp.endIndent)); | |||
lineArea.addTrait(Trait.END_INDENT, lbp.endIndent); | |||
} | |||
lineArea.setBPD(lbp.lineHeight); | |||
lineArea.setIPD(lbp.lineWidth); |
@@ -525,7 +525,7 @@ class RowPainter { | |||
* below. | |||
*/ | |||
for (int i = rowOffsets.size(); i <= rowIndex - firstRowIndex; i++) { | |||
rowOffsets.add(new Integer(offset)); | |||
rowOffsets.add(offset); | |||
} | |||
} | |||
@@ -199,7 +199,7 @@ public abstract class AbstractPDFStream extends PDFObject { | |||
OutputStream filteredOutput = getFilterList().applyFilters(cout); | |||
outputRawStreamData(filteredOutput); | |||
filteredOutput.close(); | |||
refLength.setNumber(Integer.valueOf(cout.getCount())); | |||
refLength.setNumber(cout.getCount()); | |||
bytesWritten += cout.getCount(); | |||
//Stream trailer |
@@ -62,7 +62,7 @@ public class PDFArray extends PDFObject { | |||
super(parent); | |||
for (int i = 0, c = values.length; i < c; i++) { | |||
this.values.add(Integer.valueOf(values[i])); | |||
this.values.add(values[i]); | |||
} | |||
} | |||
@@ -76,7 +76,7 @@ public class PDFArray extends PDFObject { | |||
super(parent); | |||
for (int i = 0, c = values.length; i < c; i++) { | |||
this.values.add(new Double(values[i])); | |||
this.values.add(values[i]); | |||
} | |||
} | |||
@@ -156,7 +156,7 @@ public class PDFArray extends PDFObject { | |||
* @param value the new value | |||
*/ | |||
public void set(int index, double value) { | |||
this.values.set(index, new Double(value)); | |||
this.values.set(index, value); | |||
} | |||
/** | |||
@@ -187,7 +187,7 @@ public class PDFArray extends PDFObject { | |||
* @param value the value | |||
*/ | |||
public void add(double value) { | |||
this.values.add(new Double(value)); | |||
this.values.add(value); | |||
} | |||
/** |
@@ -106,7 +106,7 @@ public class PDFCIDFont extends PDFObject { | |||
this.basefont = basefont; | |||
this.cidtype = cidtype; | |||
this.dw = new Integer(dw); | |||
this.dw = dw; | |||
this.w = w; | |||
this.dw2 = null; | |||
this.w2 = null; | |||
@@ -122,7 +122,7 @@ public class PDFCIDFont extends PDFObject { | |||
* @param dw the default width | |||
*/ | |||
public void setDW(int dw) { | |||
this.dw = new Integer(dw); | |||
this.dw = dw; | |||
} | |||
/** |
@@ -46,7 +46,7 @@ public class PDFCIDFontDescriptor extends PDFFontDescriptor { | |||
super(basefont, fontBBox[3], fontBBox[1], capHeight, flags, | |||
new PDFRectangle(fontBBox), italicAngle, stemV); | |||
put("MissingWidth", new Integer(500)); | |||
put("MissingWidth", Integer.valueOf(500)); | |||
if (lang != null) { | |||
put("Lang", lang); | |||
} |
@@ -131,19 +131,19 @@ public class PDFColor extends PDFPathPaint { | |||
List theColorVector = new ArrayList(); | |||
if (this.colorSpace.getColorSpace() == PDFDeviceColorSpace.DEVICE_RGB) { | |||
// RGB | |||
theColorVector.add(new Double(this.red)); | |||
theColorVector.add(new Double(this.green)); | |||
theColorVector.add(new Double(this.blue)); | |||
theColorVector.add(this.red); | |||
theColorVector.add(this.green); | |||
theColorVector.add(this.blue); | |||
} else if (this.colorSpace.getColorSpace() | |||
== PDFDeviceColorSpace.DEVICE_CMYK) { | |||
// CMYK | |||
theColorVector.add(new Double(this.cyan)); | |||
theColorVector.add(new Double(this.magenta)); | |||
theColorVector.add(new Double(this.yellow)); | |||
theColorVector.add(new Double(this.black)); | |||
theColorVector.add(this.cyan); | |||
theColorVector.add(this.magenta); | |||
theColorVector.add(this.yellow); | |||
theColorVector.add(this.black); | |||
} else { | |||
// GRAY | |||
theColorVector.add(new Double(this.black)); | |||
theColorVector.add(this.black); | |||
} | |||
return (theColorVector); | |||
} |
@@ -87,7 +87,7 @@ public class PDFDictionary extends PDFObject { | |||
if (!entries.containsKey(name)) { | |||
this.order.add(name); | |||
} | |||
this.entries.put(name, Integer.valueOf(value)); | |||
this.entries.put(name, value); | |||
} | |||
/** |
@@ -55,7 +55,7 @@ public class PDFEmbeddedFile extends PDFStream { | |||
super.populateStreamDict(lengthEntry); | |||
try { | |||
PDFDictionary dict = (PDFDictionary)get("Params"); | |||
dict.put("Size", new Integer(data.getSize())); | |||
dict.put("Size", Integer.valueOf(data.getSize())); | |||
} catch (IOException ioe) { | |||
//ignore and just skip this entry as it's optional | |||
} |
@@ -1398,8 +1398,8 @@ public class PDFFactory { | |||
public PDFSeparationColorSpace makeSeparationColorSpace(PDFResourceContext res, | |||
NamedColorSpace ncs) { | |||
String colorName = ncs.getColorName(); | |||
final Double zero = new Double(0d); | |||
final Double one = new Double(1d); | |||
final Double zero = 0d; | |||
final Double one = 1d; | |||
List domain = Arrays.asList(new Double[] {zero, one}); | |||
List range = Arrays.asList(new Double[] {zero, one, zero, one, zero, one}); | |||
float[] cZero = new float[] {1f, 1f, 1f}; |
@@ -52,8 +52,8 @@ public abstract class PDFFontNonBase14 extends PDFFont { | |||
*/ | |||
public void setWidthMetrics(int firstChar, int lastChar, | |||
PDFArray widths) { | |||
put("FirstChar", new Integer(firstChar)); | |||
put("LastChar", new Integer(lastChar)); | |||
put("FirstChar", Integer.valueOf(firstChar)); | |||
put("LastChar", Integer.valueOf(lastChar)); | |||
put("Widths", widths); | |||
} | |||
@@ -50,7 +50,7 @@ public class PDFFormXObject extends PDFXObject { | |||
put("Type", new PDFName("XObject")); | |||
put("Subtype", new PDFName("Form")); | |||
put("FormType", new Integer(1)); | |||
put("FormType", 1); | |||
setMatrix(new AffineTransform()); | |||
if (resources != null) { | |||
put("Resources", resources); |
@@ -90,18 +90,18 @@ public class PDFGState extends PDFObject { | |||
DEFAULT = new PDFGState(); | |||
Map vals = DEFAULT.values; | |||
/*vals.put(LW, new Float(1.0)); | |||
vals.put(LC, new Integer(0)); | |||
vals.put(LJ, new Integer(0)); | |||
vals.put(LC, Integer.valueOf(0)); | |||
vals.put(LJ, Integer.valueOf(0)); | |||
vals.put(ML, new Float(10.0)); | |||
vals.put(D, "0 []"); | |||
vals.put(RI, "RelativeColorimetric"); | |||
vals.put(OP, Boolean.FALSE); | |||
vals.put(op, Boolean.FALSE); | |||
vals.put(OPM, new Integer(1)); | |||
vals.put(OPM, Integer.valueOf(1)); | |||
vals.put(Font, "");*/ | |||
vals.put(GSTATE_ALPHA_STROKE, new Float(1.0)); | |||
vals.put(GSTATE_ALPHA_NONSTROKE, new Float(1.0)); | |||
vals.put(GSTATE_ALPHA_STROKE, 1.0f); | |||
vals.put(GSTATE_ALPHA_NONSTROKE, 1.0f); | |||
} | |||
private Map values = new java.util.HashMap(); | |||
@@ -126,9 +126,9 @@ public class PDFGState extends PDFObject { | |||
*/ | |||
public void setAlpha(float val, boolean fill) { | |||
if (fill) { | |||
values.put(GSTATE_ALPHA_NONSTROKE, new Float(val)); | |||
values.put(GSTATE_ALPHA_NONSTROKE, val); | |||
} else { | |||
values.put(GSTATE_ALPHA_STROKE, new Float(val)); | |||
values.put(GSTATE_ALPHA_STROKE, val); | |||
} | |||
} | |||
@@ -96,9 +96,9 @@ public class PDFImageXObject extends PDFXObject { | |||
private void populateDictionaryFromImage() { | |||
put("Subtype", new PDFName("Image")); | |||
put("Width", new Integer(pdfimage.getWidth())); | |||
put("Height", new Integer(pdfimage.getHeight())); | |||
put("BitsPerComponent", new Integer(pdfimage.getBitsPerComponent())); | |||
put("Width", pdfimage.getWidth()); | |||
put("Height", pdfimage.getHeight()); | |||
put("BitsPerComponent", pdfimage.getBitsPerComponent()); | |||
PDFICCStream pdfICCStream = pdfimage.getICCStream(); | |||
if (pdfICCStream != null) { | |||
@@ -114,8 +114,8 @@ public class PDFImageXObject extends PDFXObject { | |||
* this will invert the values - too bad if it's not | |||
* a PhotoShop image... | |||
*/ | |||
final Float zero = new Float(0.0f); | |||
final Float one = new Float(1.0f); | |||
final Float zero = 0.0f; | |||
final Float one = 1.0f; | |||
PDFArray decode = new PDFArray(this); | |||
for (int i = 0, c = pdfimage.getColorSpace().getNumComponents(); i < c; i++) { | |||
decode.add(one); | |||
@@ -128,15 +128,15 @@ public class PDFImageXObject extends PDFXObject { | |||
PDFColor transp = pdfimage.getTransparentColor(); | |||
PDFArray mask = new PDFArray(this); | |||
if (pdfimage.getColorSpace().isGrayColorSpace()) { | |||
mask.add(new Integer(transp.red255())); | |||
mask.add(new Integer(transp.red255())); | |||
mask.add(Integer.valueOf(transp.red255())); | |||
mask.add(Integer.valueOf(transp.red255())); | |||
} else { | |||
mask.add(new Integer(transp.red255())); | |||
mask.add(new Integer(transp.red255())); | |||
mask.add(new Integer(transp.green255())); | |||
mask.add(new Integer(transp.green255())); | |||
mask.add(new Integer(transp.blue255())); | |||
mask.add(new Integer(transp.blue255())); | |||
mask.add(Integer.valueOf(transp.red255())); | |||
mask.add(Integer.valueOf(transp.red255())); | |||
mask.add(Integer.valueOf(transp.green255())); | |||
mask.add(Integer.valueOf(transp.green255())); | |||
mask.add(Integer.valueOf(transp.blue255())); | |||
mask.add(Integer.valueOf(transp.blue255())); | |||
} | |||
put("Mask", mask); | |||
} |
@@ -77,7 +77,7 @@ public class PDFLink extends PDFObject { | |||
* @param structParent key in the structure parent tree | |||
*/ | |||
public void setStructParent(int structParent) { | |||
this.structParent = new Integer(structParent); | |||
this.structParent = structParent; | |||
} | |||
/** |
@@ -30,7 +30,7 @@ public class PDFNumber extends PDFObject { | |||
private Number number; | |||
public PDFNumber() { | |||
this.number = Integer.valueOf(0); | |||
this.number = 0; | |||
} | |||
public PDFNumber(Number number) { |
@@ -142,7 +142,7 @@ public class PDFPage extends PDFResourceContext { | |||
* @param tr the transition dictionary | |||
*/ | |||
public void setTransition(int dur, TransitionDictionary tr) { | |||
put("Dur", new Integer(dur)); | |||
put("Dur", Integer.valueOf(dur)); | |||
put("Trans", tr); | |||
} | |||
@@ -239,9 +239,9 @@ public class PDFPattern extends PDFPathPaint { | |||
} | |||
p.append("] \n"); | |||
} | |||
p.append("/XStep " + PDFNumber.doubleOut(new Double(this.xStep)) | |||
p.append("/XStep " + PDFNumber.doubleOut(Double.valueOf(this.xStep)) | |||
+ " \n"); | |||
p.append("/YStep " + PDFNumber.doubleOut(new Double(this.yStep)) | |||
p.append("/YStep " + PDFNumber.doubleOut(Double.valueOf(this.yStep)) | |||
+ " \n"); | |||
if (this.matrix != null) { |
@@ -63,9 +63,9 @@ public class PDFT1Stream extends AbstractPDFFontStream { | |||
/** {@inheritDoc} */ | |||
protected void populateStreamDict(Object lengthEntry) { | |||
super.populateStreamDict(lengthEntry); | |||
put("Length1", new Integer(pfb.getLength1())); | |||
put("Length2", new Integer(pfb.getLength2())); | |||
put("Length3", new Integer(pfb.getLength3())); | |||
put("Length1", pfb.getLength1()); | |||
put("Length2", pfb.getLength2()); | |||
put("Length3", pfb.getLength3()); | |||
} | |||
/** |
@@ -143,13 +143,13 @@ public abstract class PrintRenderer extends AbstractRenderer { | |||
context.setUserAgent(userAgent); | |||
context.setProperty(RendererContextConstants.WIDTH, | |||
new Integer(width)); | |||
width); | |||
context.setProperty(RendererContextConstants.HEIGHT, | |||
new Integer(height)); | |||
height); | |||
context.setProperty(RendererContextConstants.XPOS, | |||
new Integer(x)); | |||
x); | |||
context.setProperty(RendererContextConstants.YPOS, | |||
new Integer(y)); | |||
y); | |||
context.setProperty(RendererContextConstants.PAGE_VIEWPORT, | |||
getCurrentPageViewport()); | |||
if (foreignAttributes != null) { |
@@ -865,7 +865,7 @@ public class AFPPainter extends AbstractIFPainter<AFPDocumentHandler> { | |||
hints.put(ImageHandlerUtil.CONVERSION_MODE, ImageHandlerUtil.CONVERSION_MODE_BITMAP); | |||
hints.put("TARGET_RESOLUTION", | |||
Integer.valueOf(context.getPaintingState().getResolution())); | |||
context.getPaintingState().getResolution()); | |||
try { |
@@ -51,7 +51,7 @@ public class Command extends AbstractAction { | |||
super(name); | |||
putValue(SHORT_DESCRIPTION, name); | |||
if (mnemonic > 0) { | |||
putValue(MNEMONIC_KEY, new Integer(mnemonic)); | |||
putValue(MNEMONIC_KEY, mnemonic); | |||
} | |||
} | |||
@@ -47,10 +47,10 @@ public final class GradientMaker { | |||
Point2D startPoint = gp.getStartPoint(); | |||
Point2D endPoint = gp.getEndPoint(); | |||
List<Double> coords = new java.util.ArrayList<Double>(4); | |||
coords.add(Double.valueOf(startPoint.getX())); | |||
coords.add(Double.valueOf(startPoint.getY())); | |||
coords.add(Double.valueOf(endPoint.getX())); | |||
coords.add(Double.valueOf(endPoint.getY())); | |||
coords.add(startPoint.getX()); | |||
coords.add(startPoint.getY()); | |||
coords.add(endPoint.getX()); | |||
coords.add(endPoint.getY()); | |||
return makeGradient(gp, coords, baseTransform, transform); | |||
} | |||
@@ -70,12 +70,12 @@ public final class GradientMaker { | |||
dy *= scale; | |||
} | |||
List<Double> coords = new java.util.ArrayList<Double>(6); | |||
coords.add(Double.valueOf(center.getX() + dx)); | |||
coords.add(Double.valueOf(center.getY() + dy)); | |||
coords.add(Double.valueOf(0)); | |||
coords.add(Double.valueOf(center.getX())); | |||
coords.add(Double.valueOf(center.getY())); | |||
coords.add(Double.valueOf(radius)); | |||
coords.add(center.getX() + dx); | |||
coords.add(center.getY() + dy); | |||
coords.add(0d); | |||
coords.add(center.getX()); | |||
coords.add(center.getY()); | |||
coords.add(radius); | |||
return makeGradient(gradient, coords, baseTransform, transform); | |||
} | |||
@@ -101,7 +101,7 @@ public final class GradientMaker { | |||
double[] m = new double[6]; | |||
gradientTransform.getMatrix(m); | |||
for (double d : m) { | |||
matrix.add(Double.valueOf(d)); | |||
matrix.add(d); | |||
} | |||
return matrix; | |||
} |
@@ -567,7 +567,7 @@ public class IFRenderer extends AbstractPathOrientedRenderer { | |||
log.trace("renderPage() " + page); | |||
} | |||
try { | |||
pageIndices.put(page.getKey(), new Integer(page.getPageIndex())); | |||
pageIndices.put(page.getKey(), page.getPageIndex()); | |||
Rectangle viewArea = page.getViewArea(); | |||
Dimension dim = new Dimension(viewArea.width, viewArea.height); | |||
@@ -1048,8 +1048,8 @@ public class IFRenderer extends AbstractPathOrientedRenderer { | |||
FontTriplet triplet = (FontTriplet)text.getTrait(Trait.FONT); | |||
try { | |||
painter.setFont(triplet.getName(), triplet.getStyle(), new Integer(triplet.getWeight()), | |||
"normal", new Integer(size), ct); | |||
painter.setFont(triplet.getName(), triplet.getStyle(), triplet.getWeight(), | |||
"normal", size, ct); | |||
} catch (IFException e) { | |||
handleIFException(e); | |||
} |
@@ -296,7 +296,7 @@ public class Java2DFontMetrics { | |||
if ((style & Font.ITALIC) != 0) { | |||
atts.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); | |||
} | |||
atts.put(TextAttribute.SIZE, new Float(size)); //size in pt | |||
atts.put(TextAttribute.SIZE, size); //size in pt | |||
return new Font(atts); | |||
} | |||
@@ -308,7 +308,7 @@ public abstract class AbstractImageAdapter implements PDFImage { | |||
icm.getBlues(blues); | |||
for (int i = 0; i < icm.getMapSize(); i++) { | |||
if ((alphas[i] & 0xFF) == 0) { | |||
return Integer.valueOf(i); | |||
return i; | |||
} | |||
} | |||
return null; |
@@ -253,7 +253,7 @@ public class PDFDocumentHandler extends AbstractBinaryWritingIFDocumentHandler { | |||
pdfUtil.generatePageLabel(index, name); | |||
currentPageRef = new PageReference(currentPage, size); | |||
this.pageReferences.put(Integer.valueOf(index), currentPageRef); | |||
this.pageReferences.put(index, currentPageRef); | |||
this.generator = new PDFContentGenerator(this.pdfDoc, this.outputStream, | |||
this.currentPage); | |||
@@ -335,7 +335,7 @@ public class PDFDocumentHandler extends AbstractBinaryWritingIFDocumentHandler { | |||
} | |||
PageReference getPageReference(int pageIndex) { | |||
return this.pageReferences.get(Integer.valueOf(pageIndex)); | |||
return this.pageReferences.get(pageIndex); | |||
} | |||
static final class PageReference { |
@@ -124,9 +124,9 @@ public class PDFCollectionEntryElement extends AbstractPDFExtensionElement { | |||
try { | |||
double d = Double.parseDouble(value); | |||
if (Math.abs(Math.floor(d) - d) < 1E-10) { | |||
extension.setValue(Long.valueOf((long) d)); | |||
extension.setValue((long) d); | |||
} else { | |||
extension.setValue(Double.valueOf(d)); | |||
extension.setValue(d); | |||
} | |||
} catch (NumberFormatException e) { | |||
invalidPropertyValueError("<value>", value, null); |
@@ -70,12 +70,12 @@ public class PDFObjectExtension { | |||
} else if (value instanceof String) { | |||
double d = Double.parseDouble((String) value); | |||
if (Math.abs(Math.floor(d) - d) < 1E-10) { | |||
return Long.valueOf((long) d); | |||
return (long) d; | |||
} else { | |||
return Double.valueOf(d); | |||
return d; | |||
} | |||
} else { | |||
return Integer.valueOf(0); | |||
return 0; | |||
} | |||
} | |||
@@ -50,17 +50,17 @@ public class ImageEncoderCCITTFax implements ImageEncoder { | |||
/** {@inheritDoc} */ | |||
public String getImplicitFilter() { | |||
PSDictionary dict = new PSDictionary(); | |||
dict.put("/Columns", new Integer(ccitt.getSize().getWidthPx())); | |||
dict.put("/Columns", ccitt.getSize().getWidthPx()); | |||
int compression = ccitt.getCompression(); | |||
switch (compression) { | |||
case TIFFImage.COMP_FAX_G3_1D : | |||
dict.put("/K", new Integer(0)); | |||
dict.put("/K", 0); | |||
break; | |||
case TIFFImage.COMP_FAX_G3_2D : | |||
dict.put("/K", new Integer(1)); | |||
dict.put("/K", 1); | |||
break; | |||
case TIFFImage.COMP_FAX_G4_2D : | |||
dict.put("/K", new Integer(-1)); | |||
dict.put("/K", -1); | |||
break; | |||
default: | |||
throw new IllegalStateException( |
@@ -211,7 +211,7 @@ public class PSDocumentHandler extends AbstractBinaryWritingIFDocumentHandler { | |||
gen.writeln(DSCConstants.PS_ADOBE_30); | |||
gen.writeDSCComment(DSCConstants.CREATOR, new String[] {getUserAgent().getProducer()}); | |||
gen.writeDSCComment(DSCConstants.CREATION_DATE, new Object[] {new java.util.Date()}); | |||
gen.writeDSCComment(DSCConstants.LANGUAGE_LEVEL, new Integer(gen.getPSLevel())); | |||
gen.writeDSCComment(DSCConstants.LANGUAGE_LEVEL, gen.getPSLevel()); | |||
gen.writeDSCComment(DSCConstants.PAGES, new Object[] {DSCConstants.ATEND}); | |||
gen.writeDSCComment(DSCConstants.BBOX, DSCConstants.ATEND); | |||
gen.writeDSCComment(DSCConstants.HIRES_BBOX, DSCConstants.ATEND); | |||
@@ -259,7 +259,7 @@ public class PSDocumentHandler extends AbstractBinaryWritingIFDocumentHandler { | |||
//Write trailer | |||
gen.writeDSCComment(DSCConstants.TRAILER); | |||
writeExtensions(COMMENT_DOCUMENT_TRAILER); | |||
gen.writeDSCComment(DSCConstants.PAGES, new Integer(this.currentPageNumber)); | |||
gen.writeDSCComment(DSCConstants.PAGES, this.currentPageNumber); | |||
new DSCCommentBoundingBox(this.documentBoundingBox).generate(gen); | |||
new DSCCommentHiResBoundingBox(this.documentBoundingBox).generate(gen); | |||
gen.getResourceTracker().writeResources(false, gen); | |||
@@ -332,7 +332,7 @@ public class PSDocumentHandler extends AbstractBinaryWritingIFDocumentHandler { | |||
gen.getResourceTracker().notifyResourceUsageOnPage(PSProcSets.STD_PROCSET); | |||
gen.writeDSCComment(DSCConstants.PAGE, new Object[] | |||
{name, | |||
new Integer(this.currentPageNumber)}); | |||
Integer.valueOf(this.currentPageNumber)}); | |||
double pageWidth = size.width / 1000.0; | |||
double pageHeight = size.height / 1000.0; | |||
@@ -340,11 +340,11 @@ public class PSDocumentHandler extends AbstractBinaryWritingIFDocumentHandler { | |||
List pageSizes = new java.util.ArrayList(); | |||
if (this.psUtil.isAutoRotateLandscape() && (pageHeight < pageWidth)) { | |||
rotate = true; | |||
pageSizes.add(new Long(Math.round(pageHeight))); | |||
pageSizes.add(new Long(Math.round(pageWidth))); | |||
pageSizes.add(Math.round(pageHeight)); | |||
pageSizes.add(Math.round(pageWidth)); | |||
} else { | |||
pageSizes.add(new Long(Math.round(pageWidth))); | |||
pageSizes.add(new Long(Math.round(pageHeight))); | |||
pageSizes.add(Math.round(pageWidth)); | |||
pageSizes.add(Math.round(pageHeight)); | |||
} | |||
pageDeviceDictionary.put("/PageSize", pageSizes); | |||
this.currentPageDefinition = new PageDefinition( | |||
@@ -378,25 +378,25 @@ public class PSDocumentHandler extends AbstractBinaryWritingIFDocumentHandler { | |||
} | |||
}*/ | |||
final Integer zero = new Integer(0); | |||
final Integer zero = 0; | |||
Rectangle2D pageBoundingBox = new Rectangle2D.Double(); | |||
if (rotate) { | |||
pageBoundingBox.setRect(0, 0, pageHeight, pageWidth); | |||
gen.writeDSCComment(DSCConstants.PAGE_BBOX, new Object[] { | |||
zero, zero, new Long(Math.round(pageHeight)), | |||
new Long(Math.round(pageWidth)) }); | |||
zero, zero, Long.valueOf(Math.round(pageHeight)), | |||
Long.valueOf(Math.round(pageWidth)) }); | |||
gen.writeDSCComment(DSCConstants.PAGE_HIRES_BBOX, new Object[] { | |||
zero, zero, new Double(pageHeight), | |||
new Double(pageWidth) }); | |||
zero, zero, Double.valueOf(pageHeight), | |||
Double.valueOf(pageWidth) }); | |||
gen.writeDSCComment(DSCConstants.PAGE_ORIENTATION, "Landscape"); | |||
} else { | |||
pageBoundingBox.setRect(0, 0, pageWidth, pageHeight); | |||
gen.writeDSCComment(DSCConstants.PAGE_BBOX, new Object[] { | |||
zero, zero, new Long(Math.round(pageWidth)), | |||
new Long(Math.round(pageHeight)) }); | |||
zero, zero, Long.valueOf(Math.round(pageWidth)), | |||
Long.valueOf(Math.round(pageHeight)) }); | |||
gen.writeDSCComment(DSCConstants.PAGE_HIRES_BBOX, new Object[] { | |||
zero, zero, new Double(pageWidth), | |||
new Double(pageHeight) }); | |||
zero, zero, Double.valueOf(pageWidth), | |||
Double.valueOf(pageHeight) }); | |||
if (psUtil.isAutoRotateLandscape()) { | |||
gen.writeDSCComment(DSCConstants.PAGE_ORIENTATION, | |||
"Portrait"); |
@@ -49,10 +49,10 @@ final class FoUnitsConverter { | |||
/** conversion factors keyed by xsl:fo units names */ | |||
private static final Map TWIP_FACTORS = new HashMap(); | |||
static { | |||
TWIP_FACTORS.put(FixedLength.MM, new Float(MM_TO_TWIPS)); | |||
TWIP_FACTORS.put(FixedLength.CM, new Float(CM_TO_TWIPS)); | |||
TWIP_FACTORS.put(FixedLength.POINT, new Float(POINT_TO_TWIPS)); | |||
TWIP_FACTORS.put(FixedLength.INCH, new Float(IN_TO_TWIPS)); | |||
TWIP_FACTORS.put(FixedLength.MM, MM_TO_TWIPS); | |||
TWIP_FACTORS.put(FixedLength.CM, CM_TO_TWIPS); | |||
TWIP_FACTORS.put(FixedLength.POINT, POINT_TO_TWIPS); | |||
TWIP_FACTORS.put(FixedLength.INCH, IN_TO_TWIPS); | |||
} | |||
/** singleton pattern */ |
@@ -588,10 +588,10 @@ public class RTFHandler extends FOEventHandler { | |||
percentManager.setDimension(tc, iWidth); | |||
//convert to twips | |||
Float width = new Float(FoUnitsConverter.getInstance().convertMptToTwips(iWidth)); | |||
Float width = FoUnitsConverter.getInstance().convertMptToTwips(iWidth); | |||
builderContext.getTableContext().setNextColumnWidth(width); | |||
builderContext.getTableContext().setNextColumnRowSpanning( | |||
new Integer(0), null); | |||
0, null); | |||
builderContext.getTableContext().setNextFirstSpanningCol(false); | |||
} catch (Exception e) { | |||
log.error("startColumn: " + e.getMessage()); | |||
@@ -844,11 +844,11 @@ public class RTFHandler extends FOEventHandler { | |||
cell.setVMerge(RtfTableCell.MERGE_START); | |||
// set the number of rows spanned | |||
tctx.setCurrentColumnRowSpanning(new Integer(numberRowsSpanned), | |||
tctx.setCurrentColumnRowSpanning(numberRowsSpanned, | |||
cell.getRtfAttributes()); | |||
} else { | |||
tctx.setCurrentColumnRowSpanning( | |||
new Integer(numberRowsSpanned), null); | |||
numberRowsSpanned, null); | |||
} | |||
//process number-columns-spanned attribute | |||
@@ -873,11 +873,11 @@ public class RTFHandler extends FOEventHandler { | |||
// set the number of rows spanned | |||
tctx.setCurrentColumnRowSpanning( | |||
new Integer(numberRowsSpanned), | |||
numberRowsSpanned, | |||
cell.getRtfAttributes()); | |||
} else { | |||
tctx.setCurrentColumnRowSpanning( | |||
new Integer(numberRowsSpanned), cell.getRtfAttributes()); | |||
numberRowsSpanned, cell.getRtfAttributes()); | |||
} | |||
} | |||
} |
@@ -129,7 +129,7 @@ public class RtfAttributes implements Cloneable { | |||
* @return this (which now contains the new entry), for chaining calls | |||
*/ | |||
public RtfAttributes set(String name, int value) { | |||
values.put(name, new Integer(value)); | |||
values.put(name, value); | |||
return this; | |||
} | |||
@@ -122,7 +122,7 @@ public final class RtfColorTable { | |||
/** define a named color for getColorNumber(String) */ | |||
private void addNamedColor(String name, int colorNumber) { | |||
namedColors.put(name.toLowerCase(), new Integer(colorNumber)); | |||
namedColors.put(name.toLowerCase(), colorNumber); | |||
} | |||
////////////////////////////////////////////////// | |||
@@ -147,7 +147,7 @@ public final class RtfColorTable { | |||
* @return The number of the color in the table | |||
*/ | |||
public Integer getColorNumber(int red, int green, int blue) { | |||
Integer identifier = new Integer(determineIdentifier(red, green, blue)); | |||
Integer identifier = determineIdentifier(red, green, blue); | |||
Object o = colorIndex.get(identifier); | |||
int retVal; | |||
@@ -166,7 +166,7 @@ public final class RtfColorTable { | |||
retVal = ((Integer) o).intValue() + 1; | |||
} | |||
return new Integer(retVal); | |||
return retVal; | |||
} | |||
/** | |||
@@ -215,7 +215,7 @@ public final class RtfColorTable { | |||
* @param i Identifier of color | |||
*/ | |||
private void addColor(Integer i) { | |||
colorIndex.put(i, new Integer(colorTable.size())); | |||
colorIndex.put(i, colorTable.size()); | |||
colorTable.addElement(i); | |||
} | |||
@@ -519,16 +519,16 @@ public class RtfExternalGraphic extends RtfElement { | |||
} | |||
if (this.cropValues[0] != 0) { | |||
writeOneAttribute("piccropl", new Integer(this.cropValues[0])); | |||
writeOneAttribute("piccropl", this.cropValues[0]); | |||
} | |||
if (this.cropValues[1] != 0) { | |||
writeOneAttribute("piccropt", new Integer(this.cropValues[1])); | |||
writeOneAttribute("piccropt", this.cropValues[1]); | |||
} | |||
if (this.cropValues[2] != 0) { | |||
writeOneAttribute("piccropr", new Integer(this.cropValues[2])); | |||
writeOneAttribute("piccropr", this.cropValues[2]); | |||
} | |||
if (this.cropValues[3] != 0) { | |||
writeOneAttribute("piccropb", new Integer(this.cropValues[3])); | |||
writeOneAttribute("piccropb", this.cropValues[3]); | |||
} | |||
} | |||
@@ -106,7 +106,7 @@ extends RtfContainer { | |||
if (listTable != null) { | |||
return listTable; | |||
} else { | |||
listTable = new RtfListTable(this, writer, new Integer(listNum), attr); | |||
listTable = new RtfListTable(this, writer, listNum, attr); | |||
listTableContainer.addChild(listTable); | |||
} | |||
@@ -174,7 +174,7 @@ public final class RtfFontManager { | |||
* @param family Identifier of font | |||
*/ | |||
private void addFont(String family) { | |||
fontIndex.put(getFontKey(family), new Integer(fontTable.size())); | |||
fontIndex.put(getFontKey(family), fontTable.size()); | |||
fontTable.addElement(family); | |||
} | |||
} |
@@ -51,8 +51,8 @@ public class RtfList extends RtfContainer { | |||
super(parent, w, attr); | |||
//random number generator for ids | |||
listId = new Integer(listIdGenerator.nextInt()); | |||
listTemplateId = new Integer(listIdGenerator.nextInt()); | |||
listId = listIdGenerator.nextInt(); | |||
listTemplateId = listIdGenerator.nextInt(); | |||
//create a new list table entry for the list | |||
listTable = getRtfFile().startListTable(attr); |
@@ -189,7 +189,7 @@ public class RtfListItem extends RtfContainer | |||
getRtfListStyle().writeListPrefix(this); | |||
writeGroupMark(false); | |||
writeOneAttribute(RtfListTable.LIST_NUMBER, new Integer(number)); | |||
writeOneAttribute(RtfListTable.LIST_NUMBER, number); | |||
} | |||
/** |
@@ -44,7 +44,7 @@ public class RtfListStyleBullet extends RtfListStyle { | |||
// bulleted list | |||
item.writeControlWord("pnlvlblt"); | |||
item.writeControlWord("ilvl0"); | |||
item.writeOneAttribute(RtfListTable.LIST_NUMBER, new Integer(item.getNumber())); | |||
item.writeOneAttribute(RtfListTable.LIST_NUMBER, item.getNumber()); | |||
item.writeOneAttribute("pnindent", | |||
item.getParentList().attrib.getValue(RtfListTable.LIST_INDENT)); | |||
item.writeControlWord("pnf1"); |
@@ -46,7 +46,7 @@ public class RtfListStyleNumber extends RtfListStyle { | |||
item.writeControlWord("ilvl0"); | |||
item.writeOneAttribute(RtfListTable.LIST_NUMBER, "0"); | |||
item.writeControlWord("pndec"); | |||
item.writeOneAttribute("pnstart", new Integer(1)); | |||
item.writeOneAttribute("pnstart", 1); | |||
item.writeOneAttribute("pnindent", | |||
item.attrib.getValue(RtfListTable.LIST_INDENT)); | |||
item.writeControlWord("pntxta."); | |||
@@ -79,7 +79,7 @@ public class RtfListStyleNumber extends RtfListStyle { | |||
public void writeLevelGroup(RtfElement element) | |||
throws IOException { | |||
element.writeOneAttributeNS( | |||
RtfListTable.LIST_START_AT, new Integer(1)); | |||
RtfListTable.LIST_START_AT, 1); | |||
element.attrib.set(RtfListTable.LIST_NUMBER_TYPE, 0); | |||
element.writeGroupMark(true); | |||
@@ -92,6 +92,6 @@ public class RtfListStyleNumber extends RtfListStyle { | |||
RtfListTable.LIST_NUM_POSITION, "\\'01;"); | |||
element.writeGroupMark(false); | |||
element.writeOneAttribute(RtfListTable.LIST_FONT_TYPE, new Integer(0)); | |||
element.writeOneAttribute(RtfListTable.LIST_FONT_TYPE, 0); | |||
} | |||
} |
@@ -54,7 +54,7 @@ public class RtfListStyleText extends RtfListStyle { | |||
// bulleted list | |||
item.writeControlWord("pnlvlblt"); | |||
item.writeControlWord("ilvl0"); | |||
item.writeOneAttribute(RtfListTable.LIST_NUMBER, new Integer(item.getNumber())); | |||
item.writeOneAttribute(RtfListTable.LIST_NUMBER, item.getNumber()); | |||
item.writeOneAttribute("pnindent", | |||
item.getParentList().attrib.getValue(RtfListTable.LIST_INDENT)); | |||
item.writeControlWord("pnf1"); |
@@ -155,8 +155,8 @@ public class RtfListTable extends RtfContainer { | |||
writeGroupMark(true); | |||
writeOneAttributeNS(LIST_ID, style.getRtfList().getListId().toString()); | |||
writeOneAttributeNS(LIST_OVR_COUNT, new Integer(0)); | |||
writeOneAttributeNS(LIST_NUMBER, new Integer(z++)); | |||
writeOneAttributeNS(LIST_OVR_COUNT, 0); | |||
writeOneAttributeNS(LIST_NUMBER, z++); | |||
writeGroupMark(false); | |||
writeGroupMark(false); | |||
@@ -191,7 +191,7 @@ public class RtfListTable extends RtfContainer { | |||
writeOneAttributeNS(LIST_JUSTIFICATION, attrib.getValue(LIST_JUSTIFICATION)); | |||
writeOneAttributeNS(LIST_FOLLOWING_CHAR, attrib.getValue(LIST_FOLLOWING_CHAR)); | |||
writeOneAttributeNS(LIST_SPACE, new Integer(0)); | |||
writeOneAttributeNS(LIST_SPACE, 0); | |||
writeOneAttributeNS(LIST_INDENT, attrib.getValue(LIST_INDENT)); | |||
RtfListItem item = (RtfListItem)list.getChildren().get(0); |
@@ -69,7 +69,7 @@ public class RtfSpaceSplitter { | |||
public int split(String key) { | |||
Integer i = (Integer) commonAttributes.getValue(key); | |||
if (i == null) { | |||
i = new Integer(0); | |||
i = 0; | |||
} | |||
commonAttributes.unset(key); |
@@ -41,20 +41,20 @@ public final class RtfStringConverter { | |||
private static final RtfStringConverter INSTANCE = new RtfStringConverter(); | |||
private static final Map SPECIAL_CHARS; | |||
private static final Character DBLQUOTE = new Character('\"'); | |||
private static final Character QUOTE = new Character('\''); | |||
private static final Character SPACE = new Character(' '); | |||
private static final Character DBLQUOTE = '\"'; | |||
private static final Character QUOTE = '\''; | |||
private static final Character SPACE = ' '; | |||
/** List of characters to escape with corresponding replacement strings */ | |||
static { | |||
SPECIAL_CHARS = new HashMap(); | |||
SPECIAL_CHARS.put(new Character('\t'), "tab"); | |||
SPECIAL_CHARS.put(new Character('\n'), "line"); | |||
SPECIAL_CHARS.put(new Character('\''), "rquote"); | |||
SPECIAL_CHARS.put(new Character('\"'), "rdblquote"); | |||
SPECIAL_CHARS.put(new Character('\\'), "\\"); | |||
SPECIAL_CHARS.put(new Character('{'), "{"); | |||
SPECIAL_CHARS.put(new Character('}'), "}"); | |||
SPECIAL_CHARS.put('\t', "tab"); | |||
SPECIAL_CHARS.put('\n', "line"); | |||
SPECIAL_CHARS.put('\'', "rquote"); | |||
SPECIAL_CHARS.put('\"', "rdblquote"); | |||
SPECIAL_CHARS.put('\\', "\\"); | |||
SPECIAL_CHARS.put('{', "{"); | |||
SPECIAL_CHARS.put('}', "}"); | |||
} | |||
/** singleton pattern */ | |||
@@ -96,13 +96,13 @@ public final class RtfStringConverter { | |||
StringBuffer sb = new StringBuffer(Math.max(16, str.length())); | |||
// TODO: could be made more efficient (binary lookup, etc.) | |||
for (int i = 0; i < str.length(); i++) { | |||
final Character c = new Character(str.charAt(i)); | |||
final Character c = str.charAt(i); | |||
Character d; | |||
String replacement; | |||
if (i != 0) { | |||
d = new Character(str.charAt(i - 1)); | |||
d = str.charAt(i - 1); | |||
} else { | |||
d = new Character(SPACE); | |||
d = SPACE; | |||
} | |||
//This section modified by Chris Scott |
@@ -148,7 +148,7 @@ public final class RtfStyleSheetTable { | |||
if (attrs != null) { | |||
attrTable.put(name, attrs); | |||
} | |||
styles.put(name, new Integer(nameTable.size() - 1 + startIndex)); | |||
styles.put(name, nameTable.size() - 1 + startIndex); | |||
} | |||
/** |
@@ -281,7 +281,7 @@ public class RtfTextrun extends RtfContainer { | |||
ListIterator lit = children.listIterator(children.size()); | |||
while (lit.hasPrevious() | |||
&& (lit.previous() instanceof RtfCloseGroupMark)) { | |||
tmp.push(Integer.valueOf(((RtfCloseGroupMark)lit.next()).getBreakType())); | |||
tmp.push(((RtfCloseGroupMark) lit.next()).getBreakType()); | |||
lit.remove(); | |||
deletedCloseGroupCount++; | |||
} |
@@ -114,7 +114,7 @@ public class PercentContext implements PercentBaseContext { | |||
baseWidthSet = true; | |||
} | |||
// width in mpt | |||
lengthMap.put(fobj, new Integer(width)); | |||
lengthMap.put(fobj, width); | |||
} | |||
/** | |||
@@ -123,7 +123,7 @@ public class PercentContext implements PercentBaseContext { | |||
* @param tableUnit the table unit value (in millipoints) | |||
*/ | |||
public void setTableUnit(Table table, int tableUnit) { | |||
tableUnitMap.put(table, new Integer(tableUnit)); | |||
tableUnitMap.put(table, tableUnit); | |||
} | |||
/** | |||
@@ -132,13 +132,13 @@ public class PercentContext implements PercentBaseContext { | |||
private Integer findParent(FONode fobj) { | |||
if (fobj.getRoot() != fobj) { | |||
if (lengthMap.containsKey(fobj)) { | |||
return new Integer(lengthMap.get(fobj).toString()); | |||
return Integer.valueOf(lengthMap.get(fobj).toString()); | |||
} else { | |||
return findParent(fobj.getParent()); | |||
} | |||
} else { | |||
log.error("Base Value for element " + fobj.getName() + " not found"); | |||
return new Integer(-1); | |||
return -1; | |||
} | |||
} | |||
@@ -168,9 +168,9 @@ public class TableContext implements ITableColumnsInfo { | |||
while (colIndex >= colFirstSpanningCol.size()) { | |||
setNextFirstSpanningCol(false); | |||
} | |||
colFirstSpanningCol.set(colIndex, Boolean.valueOf(bFirstSpanningCol)); | |||
colFirstSpanningCol.set(colIndex, bFirstSpanningCol); | |||
} else { | |||
colFirstSpanningCol.add(Boolean.valueOf(bFirstSpanningCol)); | |||
colFirstSpanningCol.add(bFirstSpanningCol); | |||
} | |||
} | |||
@@ -181,7 +181,7 @@ public class TableContext implements ITableColumnsInfo { | |||
*/ | |||
public void setNextFirstSpanningCol( | |||
boolean bFirstSpanningCol) { | |||
colFirstSpanningCol.add(Boolean.valueOf(bFirstSpanningCol)); | |||
colFirstSpanningCol.add(bFirstSpanningCol); | |||
} | |||
/** | |||
@@ -195,14 +195,14 @@ public class TableContext implements ITableColumnsInfo { | |||
Integer i = (Integer)colRowSpanningNumber.get(z); | |||
if (i.intValue() > 0) { | |||
i = new Integer(i.intValue() - 1); | |||
i = i.intValue() - 1; | |||
} | |||
colRowSpanningNumber.set(z, i); | |||
if (i.intValue() == 0) { | |||
colRowSpanningAttrs.set(z, null); | |||
colFirstSpanningCol.set(z, Boolean.valueOf(false)); | |||
colFirstSpanningCol.set(z, false); | |||
} | |||
} | |||
} | |||
@@ -238,7 +238,7 @@ public class TableContext implements ITableColumnsInfo { | |||
log.warn("Column width for column " + (colIndex + 1) + " is not defined, using " | |||
+ INVALID_COLUMN_WIDTH); | |||
while (colIndex >= getNumberOfColumns()) { | |||
setNextColumnWidth(new Float(INVALID_COLUMN_WIDTH)); | |||
setNextColumnWidth(INVALID_COLUMN_WIDTH); | |||
} | |||
} | |||
return ((Float)colWidths.get(colIndex)).floatValue(); |
@@ -98,7 +98,7 @@ public class BorderManager { | |||
public Character getCharacter(int x, int y) { | |||
Character c = null; | |||
if (borderInfo[y][x] != null) { | |||
c = new Character(borderInfo[y][x].convert2Char()); | |||
c = borderInfo[y][x].convert2Char(); | |||
} | |||
return c; | |||
} |
@@ -934,10 +934,10 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand | |||
// } | |||
List<Double> bbox = new java.util.ArrayList<Double>(); | |||
bbox.add(new Double(rect.getX())); | |||
bbox.add(new Double(rect.getHeight() + rect.getY())); | |||
bbox.add(new Double(rect.getWidth() + rect.getX())); | |||
bbox.add(new Double(rect.getY())); | |||
bbox.add(rect.getX()); | |||
bbox.add(rect.getHeight() + rect.getY()); | |||
bbox.add(rect.getWidth() + rect.getX()); | |||
bbox.add(rect.getY()); | |||
AffineTransform transform; | |||
transform = new AffineTransform(getBaseTransform()); | |||
@@ -948,7 +948,7 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand | |||
double [] mat = new double[6]; | |||
transform.getMatrix(mat); | |||
for (int idx = 0; idx < mat.length; idx++) { | |||
theMatrix.add(new Double(mat[idx])); | |||
theMatrix.add(mat[idx]); | |||
} | |||
/** @todo see if pdfDoc and res can be linked here, | |||
@@ -1324,8 +1324,8 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand | |||
} | |||
if (kerningAvailable && (i + 1) < l) { | |||
addKerning(currentStream, (Integer.valueOf(ch)), | |||
(Integer.valueOf(fontState.mapChar(s.charAt(i + 1)))), | |||
addKerning(currentStream, ((int) ch), | |||
((int) fontState.mapChar(s.charAt(i + 1))), | |||
kerning, startText, endText); | |||
} | |||
@@ -1348,10 +1348,10 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand | |||
if (profile == null) { | |||
Map<String, Float> vals = new java.util.HashMap<String, Float>(); | |||
if (fillAlpha != OPAQUE) { | |||
vals.put(PDFGState.GSTATE_ALPHA_NONSTROKE, new Float(fillAlpha / 255f)); | |||
vals.put(PDFGState.GSTATE_ALPHA_NONSTROKE, fillAlpha / 255f); | |||
} | |||
if (strokeAlpha != OPAQUE) { | |||
vals.put(PDFGState.GSTATE_ALPHA_STROKE, new Float(strokeAlpha / 255f)); | |||
vals.put(PDFGState.GSTATE_ALPHA_STROKE, strokeAlpha / 255f); | |||
} | |||
PDFGState gstate = pdfDoc.getFactory().makeGState(vals, paintingState.getGState()); | |||
resourceContext.addGState(gstate); |
@@ -67,7 +67,7 @@ public class BidiAttributedCharacterIterator implements AttributedCharacterItera | |||
currRunLevel = nextRunLevel; | |||
} else if (nextRunLevel != currRunLevel) { | |||
as.addAttribute(GVTAttributedCharacterIterator.TextAttribute.BIDI_LEVEL, | |||
new Integer(currRunLevel), runStart, i); | |||
currRunLevel, runStart, i); | |||
runStart = i; | |||
runEnd = runStart; | |||
currRunLevel = nextRunLevel; | |||
@@ -75,7 +75,7 @@ public class BidiAttributedCharacterIterator implements AttributedCharacterItera | |||
} | |||
if ((currRunLevel >= 0) && (end > runStart)) { | |||
as.addAttribute(GVTAttributedCharacterIterator.TextAttribute.BIDI_LEVEL, | |||
new Integer(currRunLevel), runStart, end); | |||
currRunLevel, runStart, end); | |||
} | |||
return as.getIterator(); | |||
} else { |
@@ -285,8 +285,8 @@ public class TestConverter { | |||
FopFactory fopFactory = FopFactory.newInstance(baseUri); | |||
FOUserAgent userAgent = fopFactory.newFOUserAgent(); | |||
userAgent.getRendererOptions().put("fineDetail", Boolean.valueOf(false)); | |||
userAgent.getRendererOptions().put("consistentOutput", Boolean.valueOf(true)); | |||
userAgent.getRendererOptions().put("fineDetail", false); | |||
userAgent.getRendererOptions().put("consistentOutput", true); | |||
userAgent.setProducer("Testsuite Converter"); | |||
String outname = res; | |||
@@ -312,7 +312,7 @@ public class TestConverter { | |||
File f1 = new File(destdir, outname + ".at.xml"); | |||
File f2 = new File(compare, outname + ".at.xml"); | |||
if (!compareFiles(f1, f2)) { | |||
differ.put(outname + ".at.xml", Boolean.valueOf(pass)); | |||
differ.put(outname + ".at.xml", pass); | |||
} | |||
} | |||
} catch (Exception e) { |
@@ -95,7 +95,7 @@ public final class XMLUtil implements XMLConstants { | |||
if (s == null) { | |||
return null; | |||
} else { | |||
return new Integer(s); | |||
return Integer.valueOf(s); | |||
} | |||
} | |||
@@ -260,7 +260,7 @@ public class TTXFile { | |||
} | |||
public int mapCharToGlyph(int c) { | |||
if (cmap != null) { | |||
Integer g = cmap.get(Integer.valueOf(c)); | |||
Integer g = cmap.get(c); | |||
if (g != null) { | |||
return (int) g; | |||
} else { | |||
@@ -389,7 +389,7 @@ public class TTXFile { | |||
missingRequiredAttribute(en, "glyph"); | |||
} | |||
int gid = mapGlyphId(glyph, en); | |||
alternates.add(Integer.valueOf(gid)); | |||
alternates.add(gid); | |||
} else { | |||
notPermittedInElementContext(en, getParent(), pn); | |||
} | |||
@@ -401,7 +401,7 @@ public class TTXFile { | |||
missingRequiredAttribute(en, "glyph"); | |||
} | |||
int gid = mapGlyphId(glyph, en); | |||
coverageEntries.add(Integer.valueOf(gid)); | |||
coverageEntries.add(gid); | |||
} else { | |||
notPermittedInElementContext(en, getParent(), pn); | |||
} | |||
@@ -817,7 +817,7 @@ public class TTXFile { | |||
missingRequiredAttribute(en, "value"); | |||
} else { | |||
int gid = mapGlyphId(value, en); | |||
coverageEntries.add(Integer.valueOf(gid)); | |||
coverageEntries.add(gid); | |||
} | |||
} else { | |||
notPermittedInElementContext(en, getParent(), pnx); | |||
@@ -1030,7 +1030,7 @@ public class TTXFile { | |||
missingRequiredAttribute(en, "glyph"); | |||
} | |||
int gid = mapGlyphId(glyph, en); | |||
coverageEntries.add(Integer.valueOf(gid)); | |||
coverageEntries.add(gid); | |||
} else { | |||
notPermittedInElementContext(en, getParent(), pn); | |||
} | |||
@@ -1708,7 +1708,7 @@ public class TTXFile { | |||
missingRequiredAttribute(en, "value"); | |||
} else { | |||
int gid = mapGlyphId(value, en); | |||
substitutes.add(Integer.valueOf(gid)); | |||
substitutes.add(gid); | |||
} | |||
} else { | |||
notPermittedInElementContext(en, getParent(), pn); | |||
@@ -1730,8 +1730,8 @@ public class TTXFile { | |||
} else { | |||
ogid = mapGlyphId(out, en); | |||
} | |||
coverageEntries.add(Integer.valueOf(igid)); | |||
subtableEntries.add(Integer.valueOf(ogid)); | |||
coverageEntries.add(igid); | |||
subtableEntries.add(ogid); | |||
} else { | |||
notPermittedInElementContext(en, getParent(), pn); | |||
} | |||
@@ -2594,8 +2594,8 @@ public class TTXFile { | |||
private Map<Integer, Integer> getCMAP() { | |||
Map<Integer, Integer> cmap = new TreeMap(); | |||
for (int[] cme : cmapEntries) { | |||
Integer c = Integer.valueOf(cme[0]); | |||
Integer g = Integer.valueOf(cme[1]); | |||
Integer c = cme[0]; | |||
Integer g = cme[1]; | |||
cmap.put(c, g); | |||
} | |||
return cmap; | |||
@@ -2603,8 +2603,8 @@ public class TTXFile { | |||
private Map<Integer, Integer> getGMAP() { | |||
Map<Integer, Integer> gmap = new TreeMap(); | |||
for (int[] cme : cmapEntries) { | |||
Integer c = Integer.valueOf(cme[0]); | |||
Integer g = Integer.valueOf(cme[1]); | |||
Integer c = cme[0]; | |||
Integer g = cme[1]; | |||
gmap.put(g, c); | |||
} | |||
return gmap; | |||
@@ -2636,21 +2636,21 @@ public class TTXFile { | |||
List entries = new ArrayList<Integer>(); | |||
int s = -1; | |||
int l = -1; | |||
Integer zero = Integer.valueOf(0); | |||
Integer zero = 0; | |||
for (int[] m : cma) { | |||
int g = m[0]; | |||
int c = m[1]; | |||
if (s < 0) { | |||
s = g; | |||
l = g - 1; | |||
entries.add(Integer.valueOf(s)); | |||
entries.add(s); | |||
} | |||
while (g > (l + 1)) { | |||
entries.add(zero); | |||
l++; | |||
} | |||
assert l == (g - 1); | |||
entries.add(Integer.valueOf(c)); | |||
entries.add(c); | |||
l = g; | |||
} | |||
return GlyphClassTable.createClassTable(entries); | |||
@@ -3140,7 +3140,7 @@ public class TTXFile { | |||
} | |||
} | |||
} | |||
return Integer.valueOf(ncMax); | |||
return ncMax; | |||
} | |||
private Anchor[][] extractComponents() { | |||
Anchor[][] cam = new Anchor [ components.size() ][]; | |||
@@ -3206,7 +3206,7 @@ public class TTXFile { | |||
} | |||
} | |||
} | |||
return Integer.valueOf(ncMax); | |||
return ncMax; | |||
} | |||
private Integer computeLigaturesComponentCount(Anchor[][][] lam) { | |||
int nxMax = 0; | |||
@@ -3220,7 +3220,7 @@ public class TTXFile { | |||
} | |||
} | |||
} | |||
return Integer.valueOf(nxMax); | |||
return nxMax; | |||
} | |||
private Anchor[] extractAttachmentAnchors() { | |||
int na = attachmentAnchors.size(); |
@@ -40,13 +40,13 @@ import org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo; | |||
*/ | |||
public class CollapsedConditionalBorderTestCase extends AbstractTableTest { | |||
private final Integer border0pt = new Integer(0); | |||
private final Integer border0pt = 0; | |||
private final Integer border4pt = new Integer(4000); | |||
private final Integer border4pt = 4000; | |||
private final Integer border6pt = new Integer(6000); | |||
private final Integer border6pt = 6000; | |||
private final Integer border8pt = new Integer(8000); | |||
private final Integer border8pt = 8000; | |||
/** | |||
* Resolved borders for tables without headers and footers, generated from the Python |
@@ -55,7 +55,7 @@ public class CIDFullTestCase { | |||
continue; | |||
} | |||
bs.set(j); | |||
glyphs.put(Integer.valueOf(j), Integer.valueOf(j)); | |||
glyphs.put(j, j); | |||
chars[i] = (char) j; | |||
widths[i] = 100; | |||
i++; |
@@ -245,21 +245,21 @@ public class OTFSubSetFileTestCase extends OTFFileTestCase { | |||
if (b0 == 28) { | |||
int b1 = input[curPos + 1] & 0xff; | |||
int b2 = input[curPos + 2] & 0xff; | |||
return new BytesNumber(Integer.valueOf((short) (b1 << 8 | b2)), 3); | |||
return new BytesNumber((int) (short) (b1 << 8 | b2), 3); | |||
} else if (b0 >= 32 && b0 <= 246) { | |||
return new BytesNumber(Integer.valueOf(b0 - 139), 1); | |||
return new BytesNumber(b0 - 139, 1); | |||
} else if (b0 >= 247 && b0 <= 250) { | |||
int b1 = input[curPos + 1] & 0xff; | |||
return new BytesNumber(Integer.valueOf((b0 - 247) * 256 + b1 + 108), 2); | |||
return new BytesNumber((b0 - 247) * 256 + b1 + 108, 2); | |||
} else if (b0 >= 251 && b0 <= 254) { | |||
int b1 = input[curPos + 1] & 0xff; | |||
return new BytesNumber(Integer.valueOf(-(b0 - 251) * 256 - b1 - 108), 2); | |||
return new BytesNumber(-(b0 - 251) * 256 - b1 - 108, 2); | |||
} else if (b0 == 255) { | |||
int b1 = input[curPos + 1] & 0xff; | |||
int b2 = input[curPos + 2] & 0xff; | |||
int b3 = input[curPos + 3] & 0xff; | |||
int b4 = input[curPos + 4] & 0xff; | |||
return new BytesNumber(Integer.valueOf((b1 << 24 | b2 << 16 | b3 << 8 | b4)), 5); | |||
return new BytesNumber((b1 << 24 | b2 << 16 | b3 << 8 | b4), 5); | |||
} else { | |||
throw new IllegalArgumentException(); | |||
} |
@@ -114,10 +114,10 @@ public class TTFFileTestCase { | |||
if (ansiKerning.isEmpty()) { | |||
fail(); | |||
} | |||
Integer k1 = ansiKerning.get(Integer.valueOf('A')).get( | |||
Integer.valueOf('T')); | |||
Integer k1 = ansiKerning.get((int) 'A').get( | |||
(int) 'T'); | |||
assertEquals(dejavuTTFFile.convertTTFUnit2PDFUnit(-112), k1.intValue()); | |||
Integer k2 = ansiKerning.get(Integer.valueOf('Y')).get(Integer.valueOf('u')); | |||
Integer k2 = ansiKerning.get((int) 'Y').get((int) 'u'); | |||
assertEquals(dejavuTTFFile.convertTTFUnit2PDFUnit(-178), k2.intValue()); | |||
// DroidSansMono doens't have kerning (it's mono-spaced) | |||
@@ -297,9 +297,9 @@ public class TTFFileTestCase { | |||
if (kerning.isEmpty()) { | |||
fail(); | |||
} | |||
Integer k1 = kerning.get(Integer.valueOf('A')).get(Integer.valueOf('T')); | |||
Integer k1 = kerning.get((int) 'A').get((int) 'T'); | |||
assertEquals(dejavuTTFFile.convertTTFUnit2PDFUnit(-112), k1.intValue()); | |||
Integer k2 = kerning.get(Integer.valueOf('K')).get(Integer.valueOf('u')); | |||
Integer k2 = kerning.get((int) 'K').get((int) 'u'); | |||
assertEquals(dejavuTTFFile.convertTTFUnit2PDFUnit(-45), k2.intValue()); | |||
// DroidSansMono has no kerning data (mono-spaced) |
@@ -75,7 +75,7 @@ public final class MemoryEater { | |||
Source src = new StreamSource(foFile); | |||
Transformer transformer = replicatorTemplates.newTransformer(); | |||
transformer.setParameter("repeats", new Integer(replicatorRepeats)); | |||
transformer.setParameter("repeats", replicatorRepeats); | |||
OutputStream out = new NullOutputStream(); //write to /dev/nul | |||
try { |
@@ -196,7 +196,7 @@ public class PDFArrayTestCase extends PDFObjectTestCase { | |||
*/ | |||
@Test | |||
public void testAdd() { | |||
intArray.add(new Integer(6)); | |||
intArray.add(Integer.valueOf(6)); | |||
doubleArray.add(6.6); | |||
// Test some arbitrary values | |||
for (int i = 1; i <= 6; i++) { |
@@ -65,7 +65,7 @@ public class PDFDictionaryTestCase extends PDFObjectTestCase { | |||
pdfDictUnderTest.setDocument(doc); | |||
pdfDictUnderTest.put("String", "TestValue"); | |||
pdfDictUnderTest.put("int", 10); | |||
pdfDictUnderTest.put("double", Double.valueOf(3.1)); | |||
pdfDictUnderTest.put("double", 3.1); | |||
pdfDictUnderTest.put("array", testArray); | |||
pdfDictUnderTest.put("number", testNumber); | |||
// null is a valid PDF object |
@@ -212,7 +212,7 @@ public class MinOptMaxTestCase { | |||
assertFalse(number.equals(MinOptMax.getInstance(1, 4, 5))); | |||
assertFalse(number.equals(MinOptMax.getInstance(1, 3, 4))); | |||
assertFalse(number.equals(null)); | |||
assertFalse(number.equals(new Integer(1))); | |||
assertFalse(number.equals(1)); | |||
} | |||
@Test |
@@ -172,15 +172,15 @@ public class AdvancedMessageFormatTestCase { | |||
Map params = new java.util.HashMap(); | |||
params.put("amount", new Integer(0)); | |||
params.put("amount", 0); | |||
msg = format.format(params); | |||
assertEquals("You have nothing.", msg); | |||
params.put("amount", new Integer(7)); | |||
params.put("amount", 7); | |||
msg = format.format(params); | |||
assertEquals("You have 7 bucks.", msg); | |||
params.put("amount", new Integer(140)); | |||
params.put("amount", 140); | |||
msg = format.format(params); | |||
assertEquals("You have more than enough.", msg); | |||
@@ -43,7 +43,7 @@ public class BasicEventTestCase { | |||
Event ev = new Event(this, "123", EventSeverity.INFO, | |||
Event.paramsBuilder() | |||
.param("reason", "I'm tired") | |||
.param("blah", new Integer(23)) | |||
.param("blah", Integer.valueOf(23)) | |||
.build()); | |||
broadcaster.broadcastEvent(ev); | |||
@@ -52,7 +52,7 @@ public class BasicEventTestCase { | |||
assertEquals("123", listener.event.getEventID()); | |||
assertEquals(EventSeverity.INFO, listener.event.getSeverity()); | |||
assertEquals("I'm tired", ev.getParam("reason")); | |||
assertEquals(new Integer(23), ev.getParam("blah")); | |||
assertEquals(Integer.valueOf(23), ev.getParam("blah")); | |||
broadcaster.removeEventListener(listener); | |||
assertFalse(broadcaster.hasEventListeners()); | |||
@@ -79,7 +79,7 @@ public class BasicEventTestCase { | |||
listener.event.getEventID()); | |||
assertEquals(EventSeverity.WARN, listener.event.getSeverity()); | |||
assertEquals("I'm tired", ev.getParam("reason")); | |||
assertEquals(new Integer(23), ev.getParam("blah")); | |||
assertEquals(Integer.valueOf(23), ev.getParam("blah")); | |||
broadcaster.removeEventListener(listener); | |||
assertFalse(broadcaster.hasEventListeners()); |
@@ -138,17 +138,17 @@ public class HyphenationTreeAnalysis extends TernaryTreeAnalysis { | |||
Node n = new Node(nodeIndex); | |||
ns.string.append(n.toNodeString()); | |||
if (n.high != 0) { | |||
ns.high.add(new Integer(pos)); | |||
ns.high.add(Integer.valueOf(pos)); | |||
NodeString highNs = new NodeString(pos); | |||
highNs.low.add(new Integer(pos)); | |||
highNs.low.add(Integer.valueOf(pos)); | |||
int index = strings.indexOf(ns); | |||
strings.add(index, highNs); | |||
addNode(n.high, strings, highNs); | |||
} | |||
if (n.low != 0) { | |||
ns.low.add(new Integer(pos)); | |||
ns.low.add(Integer.valueOf(pos)); | |||
NodeString lowNs = new NodeString(pos); | |||
lowNs.high.add(new Integer(pos)); | |||
lowNs.high.add(Integer.valueOf(pos)); | |||
int index = strings.indexOf(ns); | |||
strings.add(index + 1, lowNs); | |||
addNode(n.low, strings, lowNs); |