[Git][java-team/libsambox-java][upstream] New upstream version 2.2.6

Markus Koschany gitlab at salsa.debian.org
Mon Nov 23 23:04:25 GMT 2020



Markus Koschany pushed to branch upstream at Debian Java Maintainers / libsambox-java


Commits:
0a9d3c44 by Markus Koschany at 2020-11-23T23:43:12+01:00
New upstream version 2.2.6
- - - - -


5 changed files:

- pom.xml
- src/main/java/org/sejda/sambox/cos/COSName.java
- src/main/java/org/sejda/sambox/input/LazyIndirectObjectsProvider.java
- src/main/java/org/sejda/sambox/output/IndirectObjectsWriter.java
- src/main/java/org/sejda/sambox/pdmodel/font/PDCIDFontType2Embedder.java


Changes:

=====================================
pom.xml
=====================================
@@ -5,7 +5,7 @@
 	<artifactId>sambox</artifactId>
 	<packaging>jar</packaging>
 	<name>sambox</name>
-	<version>2.2.4</version>
+	<version>2.2.6</version>
 
 	<description>An Apache PDFBox fork intended to be used as PDF processor for Sejda and PDFsam related projects</description>
 	<url>http://www.sejda.org</url>
@@ -33,7 +33,7 @@
 		<connection>scm:git:git at github.com:torakiki/sambox.git</connection>
 		<developerConnection>scm:git:git at github.com:torakiki/sambox.git</developerConnection>
 		<url>scm:git:git at github.com:torakiki/sambox.git</url>
-		<tag>v2.2.4</tag>
+		<tag>v2.2.6</tag>
 	</scm>
 
 	<developers>


=====================================
src/main/java/org/sejda/sambox/cos/COSName.java
=====================================
@@ -130,7 +130,7 @@ public final class COSName extends COSBase implements Comparable<COSName>
     public static final COSName CMAPNAME = newCommonInstance("CMapName");
     public static final COSName CMYK = newCommonInstance("CMYK");
     public static final COSName CO = newCommonInstance("CO");
-    public static final COSName COLOR = new COSName("Color");
+    public static final COSName COLOR = newCommonInstance("Color");
     public static final COSName COLOR_BURN = newCommonInstance("ColorBurn");
     public static final COSName COLOR_DODGE = newCommonInstance("ColorDodge");
     public static final COSName COLORANTS = newCommonInstance("Colorants");
@@ -192,7 +192,7 @@ public final class COSName extends COSBase implements Comparable<COSName>
     public static final COSName DOC_OPEN = newCommonInstance("DocOpen");
     public static final COSName DOC_TIME_STAMP = newCommonInstance("DocTimeStamp");
     public static final COSName DOCMDP = newCommonInstance("DocMDP");
-    public static final COSName DOCUMENT = new COSName("Document");
+    public static final COSName DOCUMENT = newCommonInstance("Document");
     public static final COSName DOMAIN = newCommonInstance("Domain");
     public static final COSName DOS = newCommonInstance("DOS");
     public static final COSName DP = newCommonInstance("DP");
@@ -274,7 +274,7 @@ public final class COSName extends COSBase implements Comparable<COSName>
     public static final COSName HIDE_MENUBAR = newCommonInstance("HideMenubar");
     public static final COSName HIDE_TOOLBAR = newCommonInstance("HideToolbar");
     public static final COSName HIDE_WINDOWUI = newCommonInstance("HideWindowUI");
-    public static final COSName HUE = new COSName("Hue");
+    public static final COSName HUE = newCommonInstance("Hue");
     // I
     public static final COSName I = newCommonInstance("I");
     public static final COSName IC = newCommonInstance("IC");
@@ -349,7 +349,7 @@ public final class COSName extends COSBase implements Comparable<COSName>
     public static final COSName MCID = newCommonInstance("MCID");
     public static final COSName MDP = newCommonInstance("MDP");
     public static final COSName MEDIA_BOX = newCommonInstance("MediaBox");
-    public static final COSName MEASURE = new COSName("Measure");
+    public static final COSName MEASURE = newCommonInstance("Measure");
     public static final COSName METADATA = newCommonInstance("Metadata");
     public static final COSName MISSING_WIDTH = newCommonInstance("MissingWidth");
     public static final COSName MK = newCommonInstance("MK");
@@ -362,7 +362,7 @@ public final class COSName extends COSBase implements Comparable<COSName>
     public static final COSName NAME = newCommonInstance("Name");
     public static final COSName NAMES = newCommonInstance("Names");
     public static final COSName NEED_APPEARANCES = newCommonInstance("NeedAppearances");
-    public static final COSName NEW_WINDOW = new COSName("NewWindow");
+    public static final COSName NEW_WINDOW = newCommonInstance("NewWindow");
     public static final COSName NEXT = newCommonInstance("Next");
     public static final COSName NM = newCommonInstance("NM");
     public static final COSName NON_EFONT_NO_WARN = newCommonInstance("NonEFontNoWarn");
@@ -465,7 +465,7 @@ public final class COSName extends COSBase implements Comparable<COSName>
     // S
     public static final COSName S = newCommonInstance("S");
     public static final COSName SA = newCommonInstance("SA");
-    public static final COSName SATURATION = new COSName("Saturation");
+    public static final COSName SATURATION = newCommonInstance("Saturation");
     public static final COSName SCREEN = newCommonInstance("Screen");
     public static final COSName SE = newCommonInstance("SE");
     public static final COSName SEPARATION = newCommonInstance("Separation");
@@ -552,8 +552,8 @@ public final class COSName extends COSBase implements Comparable<COSName>
     public static final COSName VIEW_AREA = newCommonInstance("ViewArea");
     public static final COSName VIEW_CLIP = newCommonInstance("ViewClip");
     public static final COSName VIEWER_PREFERENCES = newCommonInstance("ViewerPreferences");
-    public static final COSName VOLUME = new COSName("Volume");
-    public static final COSName VP = new COSName("VP");
+    public static final COSName VOLUME = newCommonInstance("Volume");
+    public static final COSName VP = newCommonInstance("VP");
     // W
     public static final COSName W = newCommonInstance("W");
     public static final COSName W2 = newCommonInstance("W2");


=====================================
src/main/java/org/sejda/sambox/input/LazyIndirectObjectsProvider.java
=====================================
@@ -123,7 +123,7 @@ class LazyIndirectObjectsProvider implements IndirectObjectsProvider
         return this;
     }
 
-    private void parseObject(COSObjectKey key)
+    private synchronized void parseObject(COSObjectKey key)
     {
         XrefEntry xrefEntry = xref.get(key);
         if (nonNull(xrefEntry))
@@ -208,14 +208,14 @@ class LazyIndirectObjectsProvider implements IndirectObjectsProvider
             LOG.warn("Missing 'endobj' token for {}", xrefEntry);
         }
 
-        if(found instanceof ExistingIndirectCOSObject)
+        if (found instanceof ExistingIndirectCOSObject)
         {
-            ExistingIndirectCOSObject existingIndirectCOSObject = (ExistingIndirectCOSObject)found;
+            ExistingIndirectCOSObject existingIndirectCOSObject = (ExistingIndirectCOSObject) found;
             // does this point to itself? it would cause a StackOverflowError. Example:
             // 9 0 obj
             // 9 0 R
             // endobj
-            if(existingIndirectCOSObject.id().objectIdentifier.equals(xrefEntry.key()))
+            if (existingIndirectCOSObject.id().objectIdentifier.equals(xrefEntry.key()))
             {
                 LOG.warn("Found indirect object definition pointing to itself, for {}", xrefEntry);
                 found = COSNull.NULL;


=====================================
src/main/java/org/sejda/sambox/output/IndirectObjectsWriter.java
=====================================
@@ -101,7 +101,7 @@ class IndirectObjectsWriter implements Closeable
     protected void onWritten(IndirectCOSObjectReference ref)
     {
         ref.releaseCOSObject();
-        LOG.trace("Released " + ref);
+        LOG.trace("Released {}", ref);
     }
 
     private void doWriteObject(IndirectCOSObjectReference object) throws IOException


=====================================
src/main/java/org/sejda/sambox/pdmodel/font/PDCIDFontType2Embedder.java
=====================================
@@ -95,6 +95,9 @@ final class PDCIDFontType2Embedder extends TrueTypeEmbedder
             // build GID -> Unicode map
             buildToUnicodeCMap(null);
         }
+
+        // ToUnicode CMap
+        buildToUnicodeCMap(null);
     }
 
     /**



View it on GitLab: https://salsa.debian.org/java-team/libsambox-java/-/commit/0a9d3c440a4cff3df4f278374783c6d19ebcc855

-- 
View it on GitLab: https://salsa.debian.org/java-team/libsambox-java/-/commit/0a9d3c440a4cff3df4f278374783c6d19ebcc855
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20201123/87e90a45/attachment.html>


More information about the pkg-java-commits mailing list