pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1863877 - in /pdfbox/branches/issue45: fontbox/src/main/java/org/apache/fontbox/cff/ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/ pdfbox/src/main/java/org/apache/pdfbox/util/
Date Sat, 27 Jul 2019 16:47:25 GMT
Author: tilman
Date: Sat Jul 27 16:47:25 2019
New Revision: 1863877

URL: http://svn.apache.org/viewvc?rev=1863877&view=rev
Log:
PDFBOX-4071: SonarQube fix

Modified:
    pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/cff/DataInput.java
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java

Modified: pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/cff/DataInput.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/cff/DataInput.java?rev=1863877&r1=1863876&r2=1863877&view=diff
==============================================================================
--- pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/cff/DataInput.java (original)
+++ pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/cff/DataInput.java Sat
Jul 27 16:47:25 2019
@@ -207,8 +207,7 @@ public class DataInput
     {
         try
         {
-            int value = inputBuffer[bufferPosition + offset] & 0xff;
-            return value;
+            return inputBuffer[bufferPosition + offset] & 0xff;
         }
         catch (RuntimeException re)
         {

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java?rev=1863877&r1=1863876&r2=1863877&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java
(original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java
Sat Jul 27 16:47:25 2019
@@ -90,8 +90,7 @@ public class PDBoxStyle implements COSOb
             colorValues.add( COSInteger.ZERO );
             dictionary.setItem(COSName.C, colorValues);
         }
-        PDColor color = new PDColor(colorValues.toFloatArray(), PDDeviceRGB.INSTANCE);
-        return color;
+        return new PDColor(colorValues.toFloatArray(), PDDeviceRGB.INSTANCE);
     }
 
     /**

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java?rev=1863877&r1=1863876&r2=1863877&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java (original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java Sat Jul
27 16:47:25 2019
@@ -719,14 +719,13 @@ public final class Matrix implements Clo
     @Override
     public String toString()
     {
-        String sb = "" + "[" +
-                single[0] + "," +
-                single[1] + "," +
-                single[3] + "," +
-                single[4] + "," +
-                single[6] + "," +
-                single[7] + "]";
-        return sb;
+        return "[" +
+            single[0] + "," +
+            single[1] + "," +
+            single[3] + "," +
+            single[4] + "," +
+            single[6] + "," +
+            single[7] + "]";
     }
 
     @Override



Mime
View raw message