fixed Method getFilteredPlantListByString for case if SearchString is empty.
This commit is contained in:
@@ -110,7 +110,9 @@ public class PlantListModel {
|
||||
* @throws IOException If the database cannot be accessed
|
||||
*/
|
||||
public List<Plant> getFilteredPlantListByString(HardinessZone zone, String searchString) throws HardinessZoneNotSetException, IOException {
|
||||
if(searchString.charAt(0) == '#') {
|
||||
if(searchString.length() == 0){
|
||||
return getPlantList(zone);
|
||||
} else if(searchString.charAt(0) == '#') {
|
||||
try {
|
||||
return getFilteredPlantListById(zone, Long.parseLong(searchString.substring(1)));
|
||||
} catch (NumberFormatException e) {
|
||||
|
||||
Reference in New Issue
Block a user