turbomanage / storm-gen

Simple ORM for Android SQLite
Apache License 2.0
83 stars 15 forks source link

StringIndexOutOfBoundsException when querying by example with only boolean field set #19

Open turbomanage opened 10 years ago

turbomanage commented 10 years ago

From https://code.google.com/p/storm-gen/issues/detail?id=42

What steps will reproduce the problem?

  1. Have an entity with boolean type field
  2. Create this entity and set only this field
  3. dao.queryByExample

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system? 0.97

Please provide any additional information below.

09-27 21:45:43.329: E/AndroidRuntime(26567): Caused by: java.lang.StringIndexOutOfBoundsException: length=0; index=5 09-27 21:45:43.329: E/AndroidRuntime(26567): at java.lang.String.indexAndLength(String.java:579) 09-27 21:45:43.329: E/AndroidRuntime(26567): at java.lang.String.substring(String.java:1438) 09-27 21:45:43.329: E/AndroidRuntime(26567): at com.turbomanage.storm.query.FilterBuilder.where(FilterBuilder.java:174) 09-27 21:45:43.329: E/AndroidRuntime(26567): at com.turbomanage.storm.query.FilterBuilder.exec(FilterBuilder.java:123) 09-27 21:45:43.329: E/AndroidRuntime(26567): at com.turbomanage.storm.SQLiteDao.queryByExample(SQLiteDao.java:268) 09-27 21:45:43.329: E/AndroidRuntime(26567): at com.turbomanage.storm.SQLiteDao.getByExample(SQLiteDao.java:145)