Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ public void setObject(int parameterIndex, Object obj, SqlType sqlType) throws SQ
case STRING:
case LONG_STRING:
case DATE:
case BOOLEAN:
case CHAR:
case BYTE:
case SHORT:
Expand All @@ -147,6 +146,9 @@ public void setObject(int parameterIndex, Object obj, SqlType sqlType) throws SQ
case SERIALIZABLE:
args.add(parameterIndex, obj);
break;
case BOOLEAN:
args.add(parameterIndex, ((Boolean) obj ? 1 : 0));
break;
case BLOB:
// this is only for derby serializable
case BIG_DECIMAL:
Expand Down Expand Up @@ -251,12 +253,15 @@ private Object[] getArgArray() {
}
}

private String[] getStringArray() {
if (args == null) {
return NO_STRING_ARGS;
} else {
// we assume we have Strings in args
return args.toArray(new String[args.size()]);
}
}
private String[] getStringArray() {
if (args == null) {
return NO_STRING_ARGS;
}
String[] result = new String[args.size()];
for (int i = 0; i < args.size(); i++) {
Object arg = args.get(i);
result[i] = (arg == null) ? null : arg.toString();
}
return result;
}
}