aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov
diff options
context:
space:
mode:
authorferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-12-14 17:40:28 +0000
committerferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-12-14 17:40:28 +0000
commit19798d07fc4277b4b2f9edeed6e361bbbbeadddd (patch)
tree1d6df279a3e51d8790e21fc8c24773667916f60c /src/main/java/at/knowcenter/wag/egov
parente7014c0cf999d04a2f8cc0d9423dc55a1afacf3d (diff)
downloadpdf-as-3-19798d07fc4277b4b2f9edeed6e361bbbbeadddd.tar.gz
pdf-as-3-19798d07fc4277b4b2f9edeed6e361bbbbeadddd.tar.bz2
pdf-as-3-19798d07fc4277b4b2f9edeed6e361bbbbeadddd.zip
prevent jar resources with ./
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@509 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java4
1 files changed, 4 insertions, 0 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 2da0d61..eabff4d 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
@@ -631,6 +631,10 @@ 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);
+ }
String streamURI = INTERNAL_RESOURCE_PATH + relativePath;
logger_.trace("Trying to get stream from \"" + streamURI + "\".");
InputStream stream = this.getClass().getResourceAsStream(streamURI);