From 773d8ba8d4f9560a2ef43d7673c2515677b4ac85 Mon Sep 17 00:00:00 2001 From: fangchen Date: Thu, 18 Oct 2007 00:43:02 +0000 Subject: Fix special handle for char to short adaption. -This line, and those below, will be ignored-- M JDBCStorage.java --- src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/repo') diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java index 558f70d..d463283 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java @@ -592,6 +592,15 @@ class JDBCStorage extends StandardQueryFactory if (adapter != null) { Class toType = psSetMethod.getParameterTypes()[1]; mAdapterMethods[i] = adapter.findAdaptMethod(jProperty.getType(), toType); + // Special case for converting character to String. + if (mAdapterMethods[i] == null) { + if (toType == String.class) { + mAdapterMethods[i] = adapter.findAdaptMethod(jProperty.getType(), Character.class); + if (mAdapterMethods[i] == null) { + mAdapterMethods[i] = adapter.findAdaptMethod(jProperty.getType(), char.class); + } + } + } mAdapterInstances[i] = adapter.getAdapterInstance(); } } -- cgit v1.2.3