pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1863879 - in /pdfbox/trunk: fontbox/src/main/java/org/apache/fontbox/cff/DataInput.java pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java
Date Sat, 27 Jul 2019 16:47:38 GMT
Author: tilman
Date: Sat Jul 27 16:47:38 2019
New Revision: 1863879

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

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

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java?rev=1863879&r1=1863878&r2=1863879&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/prepress/PDBoxStyle.java
Sat Jul 27 16:47:38 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/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java?rev=1863879&r1=1863878&r2=1863879&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java Sat Jul 27 16:47:38
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