You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2026/09/07 11:03:53 UTC

svn commit: r1937965 - pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml

Author: tilman
Date: Mon Sep  7 11:03:52 2026
New Revision: 1937965

Log:
PDFBOX-6257: make check case insensitive

Modified:
   pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml/PdfaExtensionHelper.java

Modified: pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml/PdfaExtensionHelper.java
==============================================================================
--- pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml/PdfaExtensionHelper.java	Mon Sep  7 11:03:49 2026	(r1937964)
+++ pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml/PdfaExtensionHelper.java	Mon Sep  7 11:03:52 2026	(r1937965)
@@ -50,11 +50,9 @@ import org.w3c.dom.NamedNodeMap;
 public final class PdfaExtensionHelper
 {
 
-    public static final String CLOSED_CHOICE = "closed Choice of ";
-    public static final String CLOSED_CHOICE_U = "Closed Choice of ";
+    private static final String CLOSED_CHOICE = "closed choice of ";
 
-    public static final String OPEN_CHOICE = "open Choice of ";
-    public static final String OPEN_CHOICE_U = "Open Choice of ";
+    private static final String OPEN_CHOICE = "open choice of ";
 
     private PdfaExtensionHelper()
     {
@@ -297,11 +295,11 @@ public final class PdfaExtensionHelper
             return TypeMapping.createPropertyType(Types.LangAlt, Cardinality.Simple);
         }
         // else all other cases
-        if (valueType.startsWith(CLOSED_CHOICE) || valueType.startsWith(CLOSED_CHOICE_U))
+        if (valueType.toLowerCase().startsWith(CLOSED_CHOICE))
         {
             valueType = valueType.substring(CLOSED_CHOICE.length());
         }
-        else if (valueType.startsWith(OPEN_CHOICE) || valueType.startsWith(OPEN_CHOICE_U))
+        else if (valueType.toLowerCase().startsWith(OPEN_CHOICE))
         {
             valueType = valueType.substring(OPEN_CHOICE.length());
         }