diff options
author | Glenn Adams <gadams@apache.org> | 2013-09-16 15:35:23 +0000 |
---|---|---|
committer | Glenn Adams <gadams@apache.org> | 2013-09-16 15:35:23 +0000 |
commit | e39326ac56573b9cc97830e365c7dbf403172f41 (patch) | |
tree | 19e9835cfdffe03d263d990b330117e7bc508114 /src | |
parent | 54eec84366117b4705a71810f1d1c87529c32ba5 (diff) | |
download | xmlgraphics-fop-e39326ac56573b9cc97830e365c7dbf403172f41.tar.gz xmlgraphics-fop-e39326ac56573b9cc97830e365c7dbf403172f41.zip |
FOP-2298: Java 5 doesn't support String.isEmpty
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1523706 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
3 files changed, 4 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryElement.java b/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryElement.java index 5a60f20ca..0920f3a78 100644 --- a/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryElement.java +++ b/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryElement.java @@ -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); diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryEntryElement.java b/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryEntryElement.java index d8ef1f04e..bcdb90c2c 100644 --- a/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryEntryElement.java +++ b/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryEntryElement.java @@ -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) { diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryExtension.java b/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryExtension.java index 2b851e0bf..d4b11cdb4 100644 --- a/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryExtension.java +++ b/src/java/org/apache/fop/render/pdf/extensions/PDFDictionaryExtension.java @@ -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; |