diff options
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r-- | src/org/traccar/database/DataManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 17c1299e8..b7d3cb1e4 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -419,9 +419,9 @@ public class DataManager { } } - public static String makeNameId(Class<?> clazz) { + private static String makeNameId(Class<?> clazz) { String name = clazz.getSimpleName(); - return Introspector.decapitalize(name) + (name.indexOf("Id") == -1 ? "Id" : ""); + return Introspector.decapitalize(name) + (!name.contains("Id") ? "Id" : ""); } public Collection<Permission> getPermissions(Class<? extends BaseModel> owner, Class<? extends BaseModel> property) |