diff options
author | rudolf <rudolf@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2003-12-18 19:19:09 +0000 |
---|---|---|
committer | rudolf <rudolf@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2003-12-18 19:19:09 +0000 |
commit | 98bbfa11070a62956d7e2663a82f19fd048d1d5e (patch) | |
tree | d1cfb3bd6fdbb73715900de364fca2e5842e1682 /common/src/at/gv | |
parent | c25c7601e6b1acdd95a167a08883452dbbb75690 (diff) | |
download | moa-id-spss-98bbfa11070a62956d7e2663a82f19fd048d1d5e.tar.gz moa-id-spss-98bbfa11070a62956d7e2663a82f19fd048d1d5e.tar.bz2 moa-id-spss-98bbfa11070a62956d7e2663a82f19fd048d1d5e.zip |
MOAIdentities wird von XMLLoginParameterResolver verwendet
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@77 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'common/src/at/gv')
-rw-r--r-- | common/src/at/gv/egovernment/moa/util/FileUtils.java | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/common/src/at/gv/egovernment/moa/util/FileUtils.java b/common/src/at/gv/egovernment/moa/util/FileUtils.java index bb21f4ca0..ae8d83834 100644 --- a/common/src/at/gv/egovernment/moa/util/FileUtils.java +++ b/common/src/at/gv/egovernment/moa/util/FileUtils.java @@ -1,11 +1,10 @@ package at.gv.egovernment.moa.util; import java.io.BufferedInputStream; +import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.net.URI; -import java.net.URISyntaxException; import java.net.URL; /** @@ -95,17 +94,19 @@ public class FileUtils { */ public static String makeAbsoluteURL(String url, String root) { //if url is relative to rootConfigFileDirName make it absolute - try { - if(null == url) return null; - URI uri = new URI(url); - if (!uri.isAbsolute()) { // make it absolute to the config file - uri = new URI(root + url); - } - return uri.toString(); - } catch (URISyntaxException e) { - //if url string could not be converted to absolute URL return source url - return url; - } + + File keyFile; + String newURL = url; + + if(null == url) return null; + + // check if absolute - if not make it absolute + keyFile = new File(url); + if (!keyFile.isAbsolute()) { + keyFile = new File(root, url); + newURL = keyFile.getPath(); + } + return newURL; } } |