You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2015/03/12 22:55:26 UTC
directory-fortress-realm git commit: FC-79 - add common error ids to
realm
Repository: directory-fortress-realm
Updated Branches:
refs/heads/master 074a7272c -> 795b3d0b6
FC-79 - add common error ids to realm
Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/commit/795b3d0b
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/tree/795b3d0b
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/diff/795b3d0b
Branch: refs/heads/master
Commit: 795b3d0b62f033089c40c775029fce50e9f24f68
Parents: 074a727
Author: Shawn McKinney <sm...@apache.org>
Authored: Thu Mar 12 16:55:09 2015 -0500
Committer: Shawn McKinney <sm...@apache.org>
Committed: Thu Mar 12 16:55:09 2015 -0500
----------------------------------------------------------------------
.../org/apache/directory/fortress/realm/GlobalIds.java | 13 +++++++++++++
.../directory/fortress/realm/J2eePolicyMgrImpl.java | 12 ++++--------
2 files changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/blob/795b3d0b/impl/src/main/java/org/apache/directory/fortress/realm/GlobalIds.java
----------------------------------------------------------------------
diff --git a/impl/src/main/java/org/apache/directory/fortress/realm/GlobalIds.java b/impl/src/main/java/org/apache/directory/fortress/realm/GlobalIds.java
new file mode 100644
index 0000000..55edb68
--- /dev/null
+++ b/impl/src/main/java/org/apache/directory/fortress/realm/GlobalIds.java
@@ -0,0 +1,13 @@
+package org.apache.directory.fortress.realm;
+
+/**
+ * Created by smckinn on 3/12/15.
+ */
+public class GlobalIds
+{
+ public static int CONTEXT_SERIALIZATION_FAILED = 201;
+ public static int CONTEXT_DESERIALIZATION_FAILED_IO = 202;
+ public static int CONTEXT_DESERIALIZATION_FAILED_UNSUPPORTED_ENCODING = 203;
+ public static int CONTEXT_DESERIALIZATION_FAILED_CLASS_NOT_FOUND = 204;
+ public static int SESSION_INITIALIZATION_FAILED = 205;
+}
http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/blob/795b3d0b/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
----------------------------------------------------------------------
diff --git a/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java b/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
index e429960..d52a5bf 100644
--- a/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
+++ b/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
@@ -59,10 +59,6 @@ public class J2eePolicyMgrImpl implements J2eePolicyMgr
private static AccessMgr accessMgr;
private static ReviewMgr reviewMgr;
private static final String SESSION = "session";
- private static int CONTEXT_SERIALIZATION_FAILED = 201;
- private static int CONTEXT_DESERIALIZATION_FAILED_IO = 202;
- private static int CONTEXT_DESERIALIZATION_FAILED_UNSUPPORTED_ENCODING = 203;
- private static int CONTEXT_DESERIALIZATION_FAILED_CLASS_NOT_FOUND = 204;
static
{
@@ -558,7 +554,7 @@ public class J2eePolicyMgrImpl implements J2eePolicyMgr
catch ( IOException ioe )
{
String error = "serialize caught IOException: " + ioe;
- throw new SecurityException(CONTEXT_SERIALIZATION_FAILED, error);
+ throw new SecurityException( org.apache.directory.fortress.realm.GlobalIds.CONTEXT_SERIALIZATION_FAILED, error);
}
}
@@ -585,17 +581,17 @@ public class J2eePolicyMgrImpl implements J2eePolicyMgr
}
catch (java.io.UnsupportedEncodingException e)
{
- throw new SecurityException( CONTEXT_DESERIALIZATION_FAILED_UNSUPPORTED_ENCODING, "deserialize caught UnsupportedEncodingException:" + e);
+ throw new SecurityException( org.apache.directory.fortress.realm.GlobalIds.CONTEXT_DESERIALIZATION_FAILED_UNSUPPORTED_ENCODING, "deserialize caught UnsupportedEncodingException:" + e);
}
catch (IOException e)
{
LOG.warn( "deserialize caught IOException:" + e);
- throw new SecurityException( CONTEXT_DESERIALIZATION_FAILED_IO, "deserialize caught IOException:" + e);
+ throw new SecurityException( org.apache.directory.fortress.realm.GlobalIds.CONTEXT_DESERIALIZATION_FAILED_IO, "deserialize caught IOException:" + e);
}
catch (ClassNotFoundException e)
{
LOG.warn( "deserialize caught ClassNotFoundException:" + e);
- throw new SecurityException( CONTEXT_DESERIALIZATION_FAILED_CLASS_NOT_FOUND, "deserialize caught ClassNotFoundException:" + e);
+ throw new SecurityException( org.apache.directory.fortress.realm.GlobalIds.CONTEXT_DESERIALIZATION_FAILED_CLASS_NOT_FOUND, "deserialize caught ClassNotFoundException:" + e);
}
}
}