cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [6/6] cayenne git commit: CAY-2050 fix NPE on bitwise operations
Date Sat, 05 Mar 2016 08:21:54 GMT
CAY-2050 fix NPE on bitwise operations


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

Branch: refs/heads/master
Commit: 360d6426c2627c6c8944b0f85990a68de4b548f5
Parents: bfb4747
Author: Alexei Grigoriev <agrigoriev@objectstyle.com>
Authored: Wed Feb 10 13:38:24 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Sat Mar 5 09:14:31 2016 +0100

----------------------------------------------------------------------
 .../apache/cayenne/access/translator/select/QueryAssembler.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/360d6426/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
index 59ca220..40554bd 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
@@ -150,7 +150,8 @@ public abstract class QueryAssembler {
 	 *            DbAttribute being processed.
 	 */
 	public void addToParamList(DbAttribute dbAttr, Object anObject) {
-		String typeName = TypesMapping.getJavaBySqlType(dbAttr.getType());
+		String typeName = TypesMapping.SQL_NULL;
+		if (dbAttr != null) typeName = TypesMapping.getJavaBySqlType(dbAttr.getType());
 		ExtendedType extendedType = adapter.getExtendedTypes().getRegisteredType(typeName);
 		
 		ParameterBinding binding = new ParameterBinding(dbAttr, extendedType);


Mime
View raw message