cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject cayenne git commit: adding null check for result set returned from statement.
Date Tue, 19 Apr 2016 07:17:36 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 8d7f801e6 -> 18d2521dc


adding null check for result set returned from statement. 

Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/18d2521d
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/18d2521d
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/18d2521d

Branch: refs/heads/master
Commit: 18d2521dc57a32e679b69972393a1aee25fd0872
Parents: 8d7f801
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Tue Apr 19 10:16:30 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Tue Apr 19 10:16:30 2016 +0300

----------------------------------------------------------------------
 .../java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/18d2521d/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java
b/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java
index ac189ab..eb0cc90 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java
@@ -22,6 +22,7 @@ import java.sql.CallableStatement;
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.Objects;
 
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.OperationObserver;
@@ -78,7 +79,7 @@ class MySQLProcedureAction extends ProcedureAction {
 	}
 
 	private void processResultSet(CallableStatement statement, OperationObserver observer) throws
Exception {
-		ResultSet rs = statement.getResultSet();
+		ResultSet rs = Objects.requireNonNull(statement.getResultSet());
 
 		try {
 			RowDescriptor descriptor = describeResultSet(rs, processedResultSets++);


Mime
View raw message