diff options
author | emusic <emina.music@egiz.gv.at> | 2019-11-08 14:13:45 +0100 |
---|---|---|
committer | emusic <emina.music@egiz.gv.at> | 2019-11-08 14:13:45 +0100 |
commit | 79f8912b36d37a25867c52f86bcff13ff75e40a2 (patch) | |
tree | 40c2efdd0ded4750f0727b53f06a5f6eb01dd5b3 /pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils | |
parent | 867b8ec9c1ab329fa5f84d294d39c80a92d2b9d2 (diff) | |
download | pdf-as-4-79f8912b36d37a25867c52f86bcff13ff75e40a2.tar.gz pdf-as-4-79f8912b36d37a25867c52f86bcff13ff75e40a2.tar.bz2 pdf-as-4-79f8912b36d37a25867c52f86bcff13ff75e40a2.zip |
Encoding of special characters
Diffstat (limited to 'pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils')
-rw-r--r-- | pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/OgnlUtils.java | 3 | ||||
-rw-r--r-- | pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/StringUtils.java | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/OgnlUtils.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/OgnlUtils.java index d5bae58e..50a34c57 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/OgnlUtils.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/OgnlUtils.java @@ -30,6 +30,8 @@ import ognl.OgnlException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.nio.charset.Charset; + /** * Created with IntelliJ IDEA. * User: afitzek @@ -52,6 +54,7 @@ public class OgnlUtils { valueString = valueString.substring(0, valueString.length() - 1); } return valueString; + } catch (OgnlException e) { logger.warn("OGNL resolver failed!", e); } diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/StringUtils.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/StringUtils.java index dbea3c70..7156a97b 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/StringUtils.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/StringUtils.java @@ -23,13 +23,13 @@ ******************************************************************************/ package at.gv.egiz.pdfas.common.utils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Formatter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * Created with IntelliJ IDEA. User: afitzek Date: 8/28/13 Time: 12:42 PM To * change this template use File | Settings | File Templates. @@ -62,7 +62,7 @@ public class StringUtils { public static String convertStringToPDFFormat(String value) throws UnsupportedEncodingException { - + if(value == null) { logger.warn("Trying to convert null string!"); return value; |