aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-06-30 12:51:41 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-06-30 12:51:41 +0200
commit7830437391cf5fe927605e82492d79fdb872059e (patch)
tree914f4dd9e7fa9b1e55678f1a2a400855dccc1baf /id/server/idserverlib
parentf57b189815b6f26710071fe18bf858fdff4a63d1 (diff)
downloadmoa-id-spss-7830437391cf5fe927605e82492d79fdb872059e.tar.gz
moa-id-spss-7830437391cf5fe927605e82492d79fdb872059e.tar.bz2
moa-id-spss-7830437391cf5fe927605e82492d79fdb872059e.zip
Log an error if authblock transformation is not found
Diffstat (limited to 'id/server/idserverlib')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
index e6e77911a..9554e3ca5 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
@@ -29,7 +29,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.net.URI;
-import java.net.URL;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
@@ -242,13 +241,19 @@ public class BuildFromLegacyConfig {
for (int i=0; i<transformsInfos.length; i++) {
TransformsInfoType transforminfotype = new TransformsInfoType();
-
- String fileURL = FileUtils.makeAbsoluteURL(transformsInfoFileNames[i], rootConfigFileDir);
- Path fileName_ = new File(new URI(fileURL)).toPath().getFileName();
- transforminfotype.setFilename(fileName_.toString());
- transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
- auth_transformInfos.add(transforminfotype);
+ if (transformsInfoFileNames[i] != null &&
+ transformsInfos[i] != null) {
+ String fileURL = FileUtils.makeAbsoluteURL(transformsInfoFileNames[i], rootConfigFileDir);
+ Path fileName_ = new File(new URI(fileURL)).toPath().getFileName();
+ transforminfotype.setFilename(fileName_.toString());
+
+ transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
+ auth_transformInfos.add(transforminfotype);
+
+ } else
+ Logger.warn("AuthBlock Transformation " + transformsInfoFileNames[i]
+ + "not found.");
}
}