Hi,

while fiddling around with the JDBCRealm I encountered a
NullPointerException. This happend when I specified a wrong
authentication database. However, instead of a reasonable error
message I got that NullPointerException.

It turned out to be a small bug in the StringManager. Here's a 
patch:


--- src/share/org/apache/tomcat/util/res/StringManager.java     2001/10/21 19:26:14    
 1.1.1.1
+++ src/share/org/apache/tomcat/util/res/StringManager.java     2001/11/01 22:05:53
@@ -175,6 +175,8 @@
     public String getString(String key, Object[] args) {
         String iString = null;
         String value = getString(key);
+        if (value == null)
+            value = "null";
 
         // this check for the runtime exception is some pre 1.1.6
         // VM's don't do an automatic toString() on the passed in


Best regards
Rainer Klute

                             RAINER KLUTE IT-CONSULTING
  Dipl.-Inform.
  Rainer Klute               E-Mail:  [EMAIL PROTECTED]
  Körner Grund 24            Telefon: +49 172 2324824
D-44143 Dortmund             Telefax: +49 231 5349423

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

Reply via email to