Author: tilman Date: Fri Jan 23 21:43:54 2015 New Revision: 1654398 URL: http://svn.apache.org/r1654398 Log: PDFBOX-2576: make fields final; remove unused import; fix javadoc; remove unused assignments
Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/afm/FontMetrics.java Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/afm/FontMetrics.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/afm/FontMetrics.java?rev=1654398&r1=1654397&r2=1654398&view=diff ============================================================================== --- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/afm/FontMetrics.java (original) +++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/afm/FontMetrics.java Fri Jan 23 21:43:54 2015 @@ -16,8 +16,6 @@ */ package org.apache.fontbox.afm; -import java.io.IOException; - import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -57,7 +55,7 @@ public class FontMetrics private float xHeight; private float ascender; private float descender; - private List<String> comments = new ArrayList<String>(); + private final List<String> comments = new ArrayList<String>(); private float underlinePosition; private float underlineThickness; @@ -68,7 +66,7 @@ public class FontMetrics private float standardVerticalWidth; private List<CharMetric> charMetrics = new ArrayList<CharMetric>(); - private Map<String,CharMetric> charMetricsMap = new HashMap<String,CharMetric>(); + private final Map<String,CharMetric> charMetricsMap = new HashMap<String,CharMetric>(); private List<TrackKern> trackKern = new ArrayList<TrackKern>(); private List<Composite> composites = new ArrayList<Composite>(); private List<KernPair> kernPairs = new ArrayList<KernPair>(); @@ -91,7 +89,7 @@ public class FontMetrics */ public float getCharacterWidth( String name ) { - float result = 0; + float result; CharMetric metric = charMetricsMap.get( name ); if( metric == null ) { @@ -114,7 +112,7 @@ public class FontMetrics */ public float getCharacterHeight( String name ) { - float result = 0; + float result; CharMetric metric = charMetricsMap.get( name ); if( metric == null ) { @@ -141,8 +139,6 @@ public class FontMetrics * This will get the average width of a character. * * @return The width of the character. - * - * @throws IOException If this AFM file does not handle the character. */ public float getAverageCharacterWidth() {