From 2bc3832f20dd6319701b78a0ece8f8551e86b9db Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 10 Aug 2017 04:54:59 +1200 Subject: Minor code cleanup --- src/org/traccar/database/DataManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 17c1299e8..be42d6d3e 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -419,12 +419,12 @@ 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 getPermissions(Class owner, Class property) + private Collection getPermissions(Class owner, Class property) throws SQLException, ClassNotFoundException { return QueryBuilder.create(dataSource, getQuery(ACTION_SELECT_ALL, owner, property)) .executePermissionsQuery(); -- cgit v1.2.3