Author: markt
Date: Sun Sep  5 20:43:38 2010
New Revision: 992891

URL: http://svn.apache.org/viewvc?rev=992891&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49883
Return a name for use in log messages rather than throwing an 
UnsupportedOperationException

Modified:
    tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java?rev=992891&r1=992890&r2=992891&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java Sun Sep  5 
20:43:38 2010
@@ -48,6 +48,10 @@ public class CombinedRealm extends Realm
      */
     protected List<Realm> realms = new LinkedList<Realm>();
 
+    /**
+     * Descriptive information about this Realm implementation.
+     */
+    protected static final String name = "CombinedRealm";
 
     /**
      * Add a realm to the list of realms that will be used to authenticate
@@ -263,13 +267,7 @@ public class CombinedRealm extends Realm
 
     @Override
     protected String getName() {
-        // This method should never be called
-        // Stack trace will show where this was called from
-        UnsupportedOperationException uoe =
-            new UnsupportedOperationException(
-                    sm.getString("combinedRealm.getName"));
-        log.error(sm.getString("combinedRealm.unexpectedMethod"), uoe);
-        throw uoe;
+        return name;
     }
 
     @Override

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=992891&r1=992890&r2=992891&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Sep  5 20:43:38 2010
@@ -118,6 +118,11 @@
         <bug>49876</bug>: Fix the generics warnings in the copied Apache 
Jakarta
         BCEL code. Based on a patch by Gábor. (markt) 
       </fix>
+      <fix>
+        <bug>49883</bug>: Ensure that the CombinedRealm returns a name for use
+        in log messages rather than throwing an
+        <code>UnsupportedOperationException</code>. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to