aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib')
-rw-r--r--pdf-as-lib/build.gradle2
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java11
2 files changed, 7 insertions, 6 deletions
diff --git a/pdf-as-lib/build.gradle b/pdf-as-lib/build.gradle
index 2e000ef9..35f82172 100644
--- a/pdf-as-lib/build.gradle
+++ b/pdf-as-lib/build.gradle
@@ -67,7 +67,7 @@ dependencies {
compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.4.0-b180830.0438'
- compile 'org.apache.commons:commons-collections4:4.0'
+ compile 'org.apache.commons:commons-collections4:4.4'
compile group: 'ognl', name: 'ognl', version: '3.0.8'
compile files('libs/iaik_eccelerate_cms.jar')
compile files('libs/iaik_eccelerate.jar')
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
index 5919ee5d..500b9e24 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
@@ -32,6 +32,7 @@ import at.gv.egiz.pdfas.common.settings.ISettings;
import at.gv.egiz.pdfas.lib.api.IConfigurationConstants;
import at.gv.egiz.pdfas.lib.impl.configuration.PlaceholderWebConfiguration;
import at.gv.egiz.pdfas.lib.impl.status.OperationStatus;
+import org.apache.commons.lang3.StringUtils;
public class PlaceholderFilter implements IConfigurationConstants,
PlaceholderExtractorConstants {
@@ -45,18 +46,18 @@ public class PlaceholderFilter implements IConfigurationConstants,
if (status.getPlaceholderConfiguration().isGlobalPlaceholderEnabled()) {
PlaceholderExtractor extractor = status.getBackend().getPlaceholderExtractor();
- if(signatureLocation!=null) {
+ if(StringUtils.isNotEmpty(signatureLocation)) {
placeholderID = signatureLocation;
} else {
placeholderID = PlaceholderWebConfiguration.getValue(PLACEHOLDER_WEB_ID);
- if(placeholderID == null) {
+ if(StringUtils.isEmpty(placeholderID)) {
placeholderID = settings.getValue(PLACEHOLDER_ID);
}
}
String placeholderModeString = settings.getValue(PLACEHOLDER_MODE);
int placeholderMode = PLACEHOLDER_MATCH_MODE_MODERATE;
- if (placeholderModeString != null) {
+ if (StringUtils.isNotEmpty(placeholderModeString)) {
try {
placeholderMode = Integer.parseInt(placeholderModeString);
if (placeholderMode < PLACEHOLDER_MODE_MIN
@@ -78,11 +79,11 @@ public class PlaceholderFilter implements IConfigurationConstants,
int placeholderMode = PLACEHOLDER_MATCH_MODE_SORTED;
placeholderID = status.getPlaceholderConfiguration().getProfilePlaceholderID(status.getRequestedSignature().getSignatureProfileID());
- if(placeholderID != null) {
+ if(StringUtils.isNotEmpty(placeholderID)) {
placeholderMode = PLACEHOLDER_MATCH_MODE_MODERATE;
}
String placeholderModeString = settings.getValue(PLACEHOLDER_MODE);
- if (placeholderModeString != null) {
+ if (StringUtils.isNotEmpty(placeholderModeString)) {
try {
placeholderMode = Integer.parseInt(placeholderModeString);
if (placeholderMode < PLACEHOLDER_MODE_MIN