aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-05-18 13:39:45 +0200
committerChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-05-18 13:39:45 +0200
commit9e5fefab3ea53859e31af25c5fd3e68a23fe9883 (patch)
treea7d1dee0a19f38c720244736f09a86a49536fee2
parent3d88ece5e3ed76f9a023681d5cd2d5a19a863c6f (diff)
downloadmoa-id-spss-9e5fefab3ea53859e31af25c5fd3e68a23fe9883.tar.gz
moa-id-spss-9e5fefab3ea53859e31af25c5fd3e68a23fe9883.tar.bz2
moa-id-spss-9e5fefab3ea53859e31af25c5fd3e68a23fe9883.zip
changed constants to final static hash map
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java11
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/Constants.java13
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringController.java (renamed from id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java)0
3 files changed, 12 insertions, 12 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
index d1cf3338a..926131b59 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
@@ -109,12 +109,6 @@ public class MOAIDAuthInitializer {
// Initializes SSLSocketFactory store
SSLUtils.initialize();
- // Initializes Namespace Map
- Constants.nSMap.put(Constants.SAML_PREFIX, Constants.SAML_NS_URI);
- Constants.nSMap.put(Constants.ECDSA_PREFIX,
- "http://www.w3.org/2001/04/xmldsig-more#");
- Constants.nSMap.put(Constants.DSIG_PREFIX, Constants.DSIG_NS_URI);
-
//seed the random number generator
Random.seedRandom();
Logger.debug("Random-number generator is seeded.");
@@ -157,11 +151,6 @@ public class MOAIDAuthInitializer {
}
-
- // Starts the session cleaner thread to remove unpicked authentication data
- AuthenticationSessionCleaner sessioncleaner = rootContext.getBean("AuthenticationSessionCleaner", AuthenticationSessionCleaner.class);
- AuthenticationSessionCleaner.start(sessioncleaner);
-
MOAGarbageCollector.start();
}
}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/Constants.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/Constants.java
index 5a5f4edac..260b2ecb1 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/Constants.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/Constants.java
@@ -24,7 +24,10 @@
package at.gv.egovernment.moa.util;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.Map;
+
/**
* Contains various constants used throughout the system.
@@ -509,6 +512,14 @@ public interface Constants {
/**
* A map used to map namespace prefixes to namespace URIs
*/
- public static HashMap<String, String> nSMap = new HashMap<String, String>(5);
+ public static final Map<String, String> nSMap = Collections.unmodifiableMap(new HashMap<String, String>(){
+ private static final long serialVersionUID = 3845384324295136490L;
+ {
+ put(Constants.SAML_PREFIX, Constants.SAML_NS_URI);
+ put(Constants.ECDSA_PREFIX, "http://www.w3.org/2001/04/xmldsig-more#");
+ put(Constants.DSIG_PREFIX, Constants.DSIG_NS_URI);
+ }
+ });
+
}
diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringController.java
index 70448ef09..70448ef09 100644
--- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java
+++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringController.java