summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java5
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java1
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java2
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/spring/PKIProfileFactoryBean.java13
-rw-r--r--pom.xml2
-rw-r--r--utils/src/main/java/at/gv/egiz/bku/utils/ConfigurationUtil.java13
6 files changed, 25 insertions, 11 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
index 6f1f2840..afefb13e 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
@@ -70,6 +70,7 @@ import at.gv.egiz.bku.slcommands.impl.ErrorResultImpl;
import at.gv.egiz.bku.slexceptions.SLBindingException;
import at.gv.egiz.bku.slexceptions.SLException;
import at.gv.egiz.bku.spring.ConfigurationFactoryBean;
+import at.gv.egiz.bku.utils.ConfigurationUtil;
import at.gv.egiz.bku.utils.StreamUtil;
import at.gv.egiz.bku.utils.urldereferencer.StreamData;
import at.gv.egiz.bku.utils.urldereferencer.URIResolverAdapter;
@@ -154,8 +155,8 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement
}
public List<String> getDataURLWhitelist() {
- return configuration
- .getList(DATAURL_WHITELIST);
+ return ConfigurationUtil.getStringListFromObjectList(
+ configuration.getList(DATAURL_WHITELIST));
}
public boolean hasDataURLWhitelist() {
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java
index 91a25002..d61de040 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java
@@ -42,7 +42,6 @@ public class XWWWFormUrlInputDecoder implements InputDecoder {
*/
protected XWWWFormUrlInputIterator iterator;
- @SuppressWarnings("unchecked")
@Override
public void setContentType(String contentType) {
ParameterParser pp = new ParameterParser();
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java b/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
index 413c116f..ce318876 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
@@ -118,7 +118,7 @@ public class ConfigurationFactoryBean implements FactoryBean, ResourceLoaderAwar
protected Configuration getVersionConfiguration() throws IOException {
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, Object> map = new HashMap<String, Object>();
map.put(MOCCA_IMPLEMENTATIONNAME_PROPERTY, "MOCCA");
// implementation version
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/spring/PKIProfileFactoryBean.java b/bkucommon/src/main/java/at/gv/egiz/bku/spring/PKIProfileFactoryBean.java
index ee6583f7..e56bb861 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/spring/PKIProfileFactoryBean.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/spring/PKIProfileFactoryBean.java
@@ -44,11 +44,15 @@ import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Properties;
import org.apache.commons.configuration.CompositeConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.FileConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.ResourceLoaderAware;
import org.springframework.core.io.Resource;
@@ -56,10 +60,7 @@ import org.springframework.core.io.ResourceLoader;
import at.gv.egiz.bku.conf.IAIKLogAdapterFactory;
import at.gv.egiz.bku.conf.MoccaConfigurationFacade;
-import java.util.ArrayList;
-import java.util.List;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import at.gv.egiz.bku.utils.ConfigurationUtil;
public class PKIProfileFactoryBean implements FactoryBean, ResourceLoaderAware {
@@ -92,9 +93,9 @@ public class PKIProfileFactoryBean implements FactoryBean, ResourceLoaderAware {
return getURL(SSL_CA_DIRECTORY);
}
- @SuppressWarnings("unchecked")
public List<String> getRevocationServiceOrder() throws Exception {
- return configuration.getList(SSL_REVOCATION_SERVICE_ORDER);
+ return ConfigurationUtil.getStringListFromObjectList(
+ configuration.getList(SSL_REVOCATION_SERVICE_ORDER));
}
private URL getURL(String key) throws MalformedURLException {
diff --git a/pom.xml b/pom.xml
index fb28b3cd..bb3d6053 100644
--- a/pom.xml
+++ b/pom.xml
@@ -409,7 +409,7 @@
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>1.6</version>
+ <version>1.9</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/utils/src/main/java/at/gv/egiz/bku/utils/ConfigurationUtil.java b/utils/src/main/java/at/gv/egiz/bku/utils/ConfigurationUtil.java
new file mode 100644
index 00000000..54ad4e6b
--- /dev/null
+++ b/utils/src/main/java/at/gv/egiz/bku/utils/ConfigurationUtil.java
@@ -0,0 +1,13 @@
+package at.gv.egiz.bku.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ConfigurationUtil {
+ public static List<String> getStringListFromObjectList(List<Object> olist) {
+ List<String> slist = new ArrayList<String>();
+ for (Object entry : olist)
+ slist.add(entry == null ? null : entry.toString());
+ return slist;
+ }
+}