User: wescott
Date: 01/02/24 19:32:17
Modified: src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCCommand.java
Log:
It turns out the *BINARY types are *NOT* always byte[] arrays after
all. Flip, flop, flip flop ...
Revision Changes Path
1.27 +2 -14 jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCCommand.java
Index: JDBCCommand.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCCommand.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- JDBCCommand.java 2001/02/22 19:22:01 1.26
+++ JDBCCommand.java 2001/02/25 03:32:17 1.27
@@ -57,7 +57,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Justin Forder</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Dirk Zimmermann</a>
- * @version $Revision: 1.26 $
+ * @version $Revision: 1.27 $
*/
public abstract class JDBCCommand
{
@@ -290,7 +290,7 @@
}
if (isBinaryType(jdbcType)) {
byte[] bytes = null;
- if (isByteArray(jdbcType)) {
+ if (value instanceof byte[]) {
bytes = (byte[])value;
} else {
// ejb-reference: store the handle
@@ -557,18 +557,6 @@
Types.LONGVARBINARY == jdbcType ||
Types.OTHER == jdbcType ||
Types.STRUCT == jdbcType ||
- Types.VARBINARY == jdbcType);
- }
-
- /**
- * Returns true if the JDBC type represents a byte array.
- *
- * @param jdbcType the JDBC type
- * @return true if the JDBC type represents a byte array
- */
- protected final boolean isByteArray(int jdbcType) {
- return (Types.BINARY == jdbcType ||
- Types.LONGVARBINARY == jdbcType ||
Types.VARBINARY == jdbcType);
}