geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r193096 - /geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/RealmPrincipal.java
Date Thu, 23 Jun 2005 07:10:14 GMT
Author: djencks
Date: Thu Jun 23 00:10:13 2005
New Revision: 193096

URL: http://svn.apache.org/viewcvs?rev=193096&view=rev
Log:
hack to work around some secret spec misinterpretations

Modified:
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/RealmPrincipal.java

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/RealmPrincipal.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/RealmPrincipal.java?rev=193096&r1=193095&r2=193096&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/RealmPrincipal.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/RealmPrincipal.java
Thu Jun 23 00:10:13 2005
@@ -70,7 +70,21 @@
      * @return a string representation of this principal.
      */
     public String toString() {
-        return getName();
+        //TODO hack to workaround bogus assumptions in some secret code.
+//        return getName();
+        if (name == null) {
+
+            StringBuffer buffer = new StringBuffer("");
+            buffer.append(loginDomain);
+            buffer.append(":[");
+            buffer.append(principal.getClass().getName());
+            buffer.append(':');
+            buffer.append(principal.getName());
+            buffer.append("]");
+
+            name = buffer.toString();
+        }
+        return name;
     }
 
     /**
@@ -88,19 +102,21 @@
      * @return the name of this principal.
      */
     public String getName() {
-        if (name == null) {
-
-            StringBuffer buffer = new StringBuffer("");
-            buffer.append(loginDomain);
-            buffer.append(":[");
-            buffer.append(principal.getClass().getName());
-            buffer.append(':');
-            buffer.append(principal.getName());
-            buffer.append("]");
-
-            name = buffer.toString();
-        }
-        return name;
+        //TODO hack to workaround bogus assumptions in some secret code.
+//        if (name == null) {
+//
+//            StringBuffer buffer = new StringBuffer("");
+//            buffer.append(loginDomain);
+//            buffer.append(":[");
+//            buffer.append(principal.getClass().getName());
+//            buffer.append(':');
+//            buffer.append(principal.getName());
+//            buffer.append("]");
+//
+//            name = buffer.toString();
+//        }
+//        return name;
+        return principal.getName();
     }
 
     /**



Mime
View raw message