pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1715229 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TrueTypeCollection.java
Date Thu, 19 Nov 2015 18:04:37 GMT
Author: tilman
Date: Thu Nov 19 18:04:37 2015
New Revision: 1715229

URL: http://svn.apache.org/viewvc?rev=1715229&view=rev
Log:
PDFBOX-3082: fix Sonar issues

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TrueTypeCollection.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TrueTypeCollection.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TrueTypeCollection.java?rev=1715229&r1=1715228&r2=1715229&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TrueTypeCollection.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TrueTypeCollection.java Thu
Nov 19 18:04:37 2015
@@ -33,7 +33,6 @@ public class TrueTypeCollection implemen
     private final TTFDataStream stream;
     private final int numFonts;
     private final long[] fontOffsets;
-    private final float version;
 
     /**
      * Creates a new TrueTypeCollection from a .ttc file.
@@ -73,7 +72,7 @@ public class TrueTypeCollection implemen
         {
             throw new IOException("Missing TTC header");
         }
-        version = stream.read32Fixed();
+        float version = stream.read32Fixed();
         numFonts = (int)stream.readUnsignedInt();
         fontOffsets = new long[numFonts];
         for (int i = 0; i < numFonts; i++)
@@ -111,15 +110,13 @@ public class TrueTypeCollection implemen
         {
             stream.seek(fontOffsets[idx]);
             OTFParser parser = new OTFParser(false, true);
-            OpenTypeFont otf = parser.parse(new TTCDataStream(stream));
-            return otf;
+            return parser.parse(new TTCDataStream(stream));
         }
         else
         {
             stream.seek(fontOffsets[idx]);
             TTFParser parser = new TTFParser(false, true);
-            TrueTypeFont ttf = parser.parse(new TTCDataStream(stream));
-            return ttf;
+            return parser.parse(new TTCDataStream(stream));
         }
     }
 
@@ -146,9 +143,9 @@ public class TrueTypeCollection implemen
     /**
      * Implement the callback method to call {@link TrueTypeCollection#processAllFonts()}.
      */
-    public static interface TrueTypeFontProcessor
+    public interface TrueTypeFontProcessor
     {
-        public void process(TrueTypeFont ttf) throws IOException;
+        void process(TrueTypeFont ttf) throws IOException;
     }
     
     @Override



Mime
View raw message