cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmen...@apache.org
Subject svn commit: r584610 - in /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne: access/DataDomain.java conf/DriverDataSourceFactory.java
Date Sun, 14 Oct 2007 21:27:59 GMT
Author: kmenard
Date: Sun Oct 14 14:27:59 2007
New Revision: 584610

URL: http://svn.apache.org/viewvc?rev=584610&view=rev
Log:
NPE protection.

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/DriverDataSourceFactory.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java?rev=584610&r1=584609&r2=584610&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
Sun Oct 14 14:27:59 2007
@@ -252,6 +252,7 @@
         }
 
         if (queryCacheFactory != null
+                && dataContextFactory != null
                 && !Util.isEmptyString(dataContextFactory.toString())) {
             queryCacheFactory = (QueryCacheFactory) createInstance(queryCacheFactory
                     .toString(), QueryCacheFactory.class);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/DriverDataSourceFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/DriverDataSourceFactory.java?rev=584610&r1=584609&r2=584610&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/DriverDataSourceFactory.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conf/DriverDataSourceFactory.java
Sun Oct 14 14:27:59 2007
@@ -251,13 +251,17 @@
             }
             finally {
                 try {
-                    bufferedReader.close();
+                    if (bufferedReader != null) {
+                        bufferedReader.close();
+                    }
                 }
                 catch (Exception exception) {
                 }
 
                 try {
-                    inputStreamReader.close();
+                    if (inputStreamReader != null) {
+                        inputStreamReader.close();
+                    }
                 }
                 catch (Exception exception) {
                 }



Mime
View raw message