Hello,

I get a NullPointerException in org.apache.catalina.session.JDBCStore. 
(Tomcat 4.0.4 and 4.1.9)
I think it can be solved with the following patch.
Is there a possibility for this to be committed?


--- JDBCStore-old.java  Wed Sep  4 02:13:53 2002
+++ JDBCStore.java      Wed Sep  4 02:18:12 2002
@@ -759,37 +759,43 @@
              }

              try {
-                preparedSizeSql.close();
+                if (preparedSizeSql != null)
+                    preparedSizeSql.close();
              } catch (SQLException e) {
                  ;
              }

              try {
-                preparedKeysSql.close();
+                if (preparedKeysSql != null)
+                    preparedKeysSql.close();
              } catch (SQLException e) {
                  ;
              }

              try {
-                preparedSaveSql.close();
+                if (preparedSaveSql != null)
+                    preparedSaveSql.close();
              } catch (SQLException e) {
                  ;
              }

              try {
-                preparedClearSql.close();
+                if (preparedClearSql != null)
+                    preparedClearSql.close();
              } catch (SQLException e) {
                  ;
              }

              try {
-                preparedRemoveSql.close();
+                if (preparedRemoveSql != null)
+                    preparedRemoveSql.close();
              } catch (SQLException e) {
                  ;
              }

              try {
-                preparedLoadSql.close();
+                if (preparedLoadSql != null)
+                    preparedLoadSql.close();
              } catch (SQLException e) {
                  ;
              }


-- 
  Ronald Klop
  Amsterdam, The Netherlands


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

Reply via email to