]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2298: Java 5 doesn't support String.isEmpty
authorGlenn Adams <gadams@apache.org>
Mon, 16 Sep 2013 15:35:23 +0000 (15:35 +0000)
committerGlenn Adams <gadams@apache.org>
Mon, 16 Sep 2013 15:35:23 +0000 (15:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1523706 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryElement.java
src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryEntryElement.java
src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryExtension.java

index 5a60f20caba28266a4b45d09e03df8638f028996..0920f3a78d226171dced74bf788c8e0e77795361 100644 (file)
@@ -66,7 +66,7 @@ public class PDFDictionaryElement extends AbstractPDFDictionaryElement {
             String key = attlist.getValue(ATT_KEY);
             if (key == null) {
                 missingPropertyError(ATT_KEY);
-            } else if (key.isEmpty()) {
+            } else if (key.length() == 0) {
                 invalidPropertyValueError(ATT_KEY, key, null);
             } else {
                 extension.setKey(key);
index d8ef1f04ed163ad0481ff51bd4813e5d502a1d2a..bcdb90c2c034d878391eb1cf362d773ebe90f189 100644 (file)
@@ -55,7 +55,7 @@ public class PDFDictionaryEntryElement extends AbstractPDFDictionaryElement {
         String key = attlist.getValue("key");
         if (key == null) {
             missingPropertyError("key");
-        } else if (key.isEmpty()) {
+        } else if (key.length() == 0) {
             invalidPropertyValueError("key", key, null);
         } else {
             extension.setKey(key);
@@ -86,7 +86,7 @@ public class PDFDictionaryEntryElement extends AbstractPDFDictionaryElement {
                 invalidPropertyValueError("<value>", value, null);
             }
         } else if (extension.getType() == PDFDictionaryEntryType.Name) {
-            if (value.isEmpty()) {
+            if (value.length() == 0) {
                 invalidPropertyValueError("<value>", value, null);
             }
         } else if (extension.getType() == PDFDictionaryEntryType.Number) {
index 2b851e0bf277a42266488ec7c086cd0da32b9830..d4b11cdb4dca34252c24c94a0bc12fde0cb0d0df 100644 (file)
@@ -82,7 +82,7 @@ public class PDFDictionaryExtension extends PDFDictionaryEntryExtension {
             return false;
         }
         String pageNumbers = getProperty(PROPERTY_PAGE_NUMBERS);
-        if ((pageNumbers == null) || pageNumbers.isEmpty()) {
+        if ((pageNumbers == null) || (pageNumbers.length() == 0)) {
             return false;
         } else if (pageNumbers.equals("*")) {
             return true;