You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2010/10/23 17:55:38 UTC

Weird cast in object serialization code

Hi,

I'm looking at the Findbugs findings in 1.5 and one of the warnings is:

/store/git/wicket15/wicket/src/main/java/org/apache/wicket/util/io/WicketObjectInputStream.java:601
Impossible cast from Byte to Character

public char get(String name, char val) throws IOException
{
Object o = values.get(name);
if (o instanceof Byte)
{
return ((Character)o).charValue();
}
return val;
}

It looks like a copy/paste error from the previous method which reads Byte
value.
Since this is in that code area I don't want to fix it without asking
whether there is something special.