aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-12-14 18:08:52 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-12-14 18:08:52 +0000
commita68a8a4122e62f22a44c79f904aef68a500bf9ca (patch)
tree1f1125cc713063a8e4cc2f8d3e7539208f38b8b1 /src/main/java/at
parentd9d1dba18452e55a0801284570411bc4b1be279d (diff)
downloadpdf-as-3-a68a8a4122e62f22a44c79f904aef68a500bf9ca.tar.gz
pdf-as-3-a68a8a4122e62f22a44c79f904aef68a500bf9ca.tar.bz2
pdf-as-3-a68a8a4122e62f22a44c79f904aef68a500bf9ca.zip
minor improvements for SettingsReader
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@518 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java b/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java
index 676ef5c..c85513c 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java
@@ -633,10 +633,9 @@ public class SettingsReader implements Serializable
* @return
*/
public InputStream getInternalResource(String relativePath) {
- // kill starting "." in resource path
- if (relativePath != null && relativePath.length() > 0 && relativePath.startsWith(".")) {
- relativePath = relativePath.substring(1);
- }
+ // kill starting "." and "./" in resource path
+ relativePath = StringUtils.removeStart(relativePath, ".");
+ relativePath = StringUtils.removeStart(relativePath, "/");
String streamURI = INTERNAL_RESOURCE_PATH + relativePath;
logger_.trace("Trying to get stream from \"" + streamURI + "\".");
InputStream stream = this.getClass().getResourceAsStream(streamURI);