Fix warnings 2 (#1130)

* FIX: warnings (add generics, overrides, fix imports) - should be no effecive code change

* replaced deprecated methods by default methods

* FIX: more compiler warnings

* FIX more warnings - no code changes

* FIX: deprecated call to JsonParseException

* Remove unused code, check unused variables
This commit is contained in:
Roland Praml
2017-09-14 00:32:48 +12:00
committed by Rob Bygrave
parent ac6708e0d0
commit b66f18bfd6
17 changed files with 30 additions and 79 deletions
@@ -134,8 +134,6 @@ public class DatabasePlatformFactory {
String dbProductName = metaData.getDatabaseProductName();
dbProductName = dbProductName.toLowerCase();
int majorVersion = metaData.getDatabaseMajorVersion();
if (dbProductName.contains("oracle")) {
return new OraclePlatform();
} else if (dbProductName.contains("microsoft")) {
@@ -85,7 +85,7 @@ public class BeanDescriptorJsonHelp<T> {
return null;
}
if (JsonToken.START_OBJECT != token) {
throw new JsonParseException("Unexpected token " + token + " - expecting start_object", parser.getCurrentLocation());
throw new JsonParseException(parser, "Unexpected token " + token + " - expecting start_object", parser.getCurrentLocation());
}
}
@@ -98,7 +98,7 @@ public class BeanDescriptorJsonHelp<T> {
if (parser.nextToken() != JsonToken.FIELD_NAME) {
String msg = "Error reading inheritance discriminator - expected [" + discColumn + "] but no json key?";
throw new JsonParseException(msg, parser.getCurrentLocation());
throw new JsonParseException(parser, msg, parser.getCurrentLocation());
}
String propName = parser.getCurrentName();
@@ -111,7 +111,7 @@ public class BeanDescriptorJsonHelp<T> {
return jsonReadProperties(jsonRead, bean, path);
}
String msg = "Error reading inheritance discriminator, expected property [" + discColumn + "] but got [" + propName + "] ?";
throw new JsonParseException(msg, parser.getCurrentLocation());
throw new JsonParseException(parser, msg, parser.getCurrentLocation());
}
String discValue = parser.nextTextValue();
@@ -49,8 +49,6 @@ public class DeployUtil {
private static final int DEFAULT_JSON_VARCHAR_LENGTH = 3000;
private static final int DEFAULT_ARRAY_VARCHAR_LENGTH = 1000;
private final NamingConvention namingConvention;
private final TypeManager typeManager;
@@ -189,17 +189,4 @@ public class OrmUpdateProperties {
return sb.toString();
}
/**
* Return a logical set clause to use for isSameByPlan() use.
*/
private String logicalSetClause() {
StringBuilder sb = new StringBuilder();
for (Map.Entry<String, Value> entry : values.entrySet()) {
sb.append(", ");
sb.append(entry.getKey()).append(entry.getValue().bindClause());
}
return sb.toString();
}
}