Mercurial > hg > release > thermostat-0.13
changeset 1194:b525881b4f8a
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
author | Elliott Baron <ebaron@redhat.com> |
---|---|
date | Wed, 31 Jul 2013 15:53:15 -0400 |
parents | e810fb4143b5 |
children | 1925258e6309 |
files | storage/core/src/main/java/com/redhat/thermostat/storage/core/PreparedParameters.java |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);