From 4163572db6a360e676d2f15c6955eee1bc2ec22c Mon Sep 17 00:00:00 2001 From: tkellner Date: Mon, 3 Mar 2014 20:08:24 +0000 Subject: Use current commons-configuration git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1301 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java | 5 +++-- .../at/gv/egiz/bku/binding/XWWWFormUrlInputDecoder.java | 1 - .../at/gv/egiz/bku/spring/ConfigurationFactoryBean.java | 2 +- .../java/at/gv/egiz/bku/spring/PKIProfileFactoryBean.java | 13 +++++++------ 4 files changed, 11 insertions(+), 10 deletions(-) (limited to 'bkucommon/src/main') 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 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 map = new HashMap(); + Map map = new HashMap(); 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 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 { -- cgit v1.2.3