Skip to content

Commit

Permalink
Fix for bug when passing Integer object as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
shai-almog committed Dec 4, 2018
1 parent 081beed commit 77c9ad1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Ports/Android/src/com/codename1/impl/android/AndroidDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,14 @@ public void execute(String sql, Object... params) throws IOException {
s.bindBlob(i + 1, (byte [])p);
}else if(p instanceof Double){
s.bindDouble(i + 1, ((Double)p).doubleValue());
}else if(p instanceof Long){
} else if(p instanceof Long){
s.bindLong(i + 1, ((Long)p).longValue());
} else if(p instanceof Integer){
s.bindLong(i + 1, ((Integer)p).intValue());
} else {
if(p != null) {
s.bindString(i + 1, p.toString());
}
}
}
}
Expand Down

0 comments on commit 77c9ad1

Please sign in to comment.