# HG changeset patch # User Elliott Baron # Date 1375300395 14400 # Node ID b525881b4f8afa88ef183ab3347827a5e5525004 # Parent e810fb4143b5b158780c46257d5bc83c7addd5cc Deserialization fix for PreparedParameters class When running the webservice command, the new prepared statement serialization fails while trying to deserialize a PreparedParameters object. This is because there is no default constructor. This commit simply adds a default constructor to be used only be the deserializer. This problem doesn't appear when using the WAR, only the webservice command. Maybe this is due to differences in class loading. Even if we are not planning to support the webservice command, this commit shouldn't cause harm and allows the webservice command to work properly. Reviewed-by: omajid Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-July/007636.html diff -r e810fb4143b5 -r b525881b4f8a storage/core/src/main/java/com/redhat/thermostat/storage/core/PreparedParameters.java --- a/storage/core/src/main/java/com/redhat/thermostat/storage/core/PreparedParameters.java Wed Jul 31 15:50:35 2013 -0400 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/core/PreparedParameters.java Wed Jul 31 15:53:15 2013 -0400 @@ -49,6 +49,11 @@ params = new PreparedParameter[numParams]; } + @SuppressWarnings("unused") + private PreparedParameters() { + // nothing. Exists for serialization purposes. + } + @Override public void setLong(int paramIndex, long paramValue) { setType(paramIndex, paramValue, Long.class);