aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-01 08:36:53 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-01 08:38:48 +0500
commit0c15d55ada982b404c9863a8409bb4e91aa59ace (patch)
tree7eab8422c7d190ecbc882ead5cbdf317e7fdea90 /src/org
parent01de09dcdf4a746bac66e1f700f8c6eb2c96c6ae (diff)
downloadtraccar-server-0c15d55ada982b404c9863a8409bb4e91aa59ace.tar.gz
traccar-server-0c15d55ada982b404c9863a8409bb4e91aa59ace.tar.bz2
traccar-server-0c15d55ada982b404c9863a8409bb4e91aa59ace.zip
Fix build
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/Config.java2
-rw-r--r--src/org/traccar/database/DataManager.java13
2 files changed, 9 insertions, 6 deletions
diff --git a/src/org/traccar/Config.java b/src/org/traccar/Config.java
index a0f3f8c2e..43f4632da 100644
--- a/src/org/traccar/Config.java
+++ b/src/org/traccar/Config.java
@@ -97,7 +97,7 @@ public class Config {
}
public void setString(String key, String value) {
- properties.putIfAbsent(key, value);
+ properties.put(key, value);
}
}
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 3d89cc3d1..63d98818d 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -184,12 +184,12 @@ public class DataManager {
+ getPermissionsTableName(owner, property);
case ACTION_INSERT:
return "INSERT INTO " + getPermissionsTableName(owner, property)
- + " (" + makeNameId(owner) + ", " + makeNameId(property) + ") VALUES (:"
- + makeNameId(owner) + ", :" + makeNameId(property) + ")";
+ + " (" + makeNameId(owner) + ", " + makeNameId(property) + ") VALUES (:"
+ + makeNameId(owner) + ", :" + makeNameId(property) + ")";
case ACTION_DELETE:
return "DELETE FROM " + getPermissionsTableName(owner, property)
- + " WHERE " + makeNameId(owner) + " = :" + makeNameId(owner)
- + " AND " + makeNameId(property) + " = :" + makeNameId(property);
+ + " WHERE " + makeNameId(owner) + " = :" + makeNameId(owner)
+ + " AND " + makeNameId(property) + " = :" + makeNameId(property);
default:
throw new IllegalArgumentException("Unknown action");
}
@@ -212,7 +212,10 @@ public class DataManager {
if (action.equals(ACTION_SELECT_ALL)) {
queryName = "database.select" + clazz.getSimpleName() + "s";
} else {
- queryName = "database." + action.toLowerCase() + clazz.getSimpleName() + (extended ? "Extended" : "");
+ queryName = "database." + action.toLowerCase() + clazz.getSimpleName();
+ if (extended) {
+ queryName += "Extended";
+ }
}
String query = config.getString(queryName);
if (query == null) {