Minor patch for org.apache.catalina.realm.MemoryRealm

2004-11-04 Thread Brian Gallew
I would like to propose the following (trivial) patch to MemoryRealm.java:

diff -u -r1.7 MemoryRealm.java
--- catalina/src/share/org/apache/catalina/realm/MemoryRealm.java 
 24 Sep 2004 07:25:07 -  1.7
+++ catalina/src/share/org/apache/catalina/realm/MemoryRealm.java 
 4 Nov 2004 19:53:01 -
@@ -244,6 +244,16 @@
 
 
 /**
+ * Return a short name for this Realm implementation.
+ */
+protected HashMap getPrincipals() {
+
+return (principals);
+
+}
+
+
+/**
  * Return the password associated with the given principal's user name.
  */
 protected String getPassword(String username) {

The point of this is that, to extend MemoryRealm in any useful way you
need to be able to access principals.  Alternatively simply switching
principals from private to protected would be sufficient, but use an
accessor seems to be preferred.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Minor patch for org.apache.catalina.realm.MemoryRealm

2004-11-04 Thread Shapira, Yoav

Hi,
Seems OK, except I'd use Map instead of HashMap as the return type.  Can
you please open a bugzilla enhancement item for this so that we don't
forget it?
Thanks,

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Brian Gallew [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 04, 2004 2:56 PM
To: [EMAIL PROTECTED]
Subject: Minor patch for org.apache.catalina.realm.MemoryRealm

I would like to propose the following (trivial) patch to
MemoryRealm.java:

diff -u -r1.7 MemoryRealm.java
--- catalina/src/share/org/apache/catalina/realm/MemoryRealm.java
 24 Sep 2004 07:25:07 -  1.7
+++ catalina/src/share/org/apache/catalina/realm/MemoryRealm.java
 4 Nov 2004 19:53:01 -
@@ -244,6 +244,16 @@


 /**
+ * Return a short name for this Realm implementation.
+ */
+protected HashMap getPrincipals() {
+
+return (principals);
+
+}
+
+
+/**
  * Return the password associated with the given principal's user
name.
  */
 protected String getPassword(String username) {

The point of this is that, to extend MemoryRealm in any useful way you
need to be able to access principals.  Alternatively simply switching
principals from private to protected would be sufficient, but use an
accessor seems to be preferred.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]