On Tue, Jan 25, 2011 at 1:29 PM, Christian Grobmeier <grobme...@gmail.com>wrote:
> Hello all,
>
> just have set up a wicket dev environment and the wicket-util project
> throwed one error.
> convertToString must override
> Works with deleting it - not sure if this was the intention :-)
>
> Best
> Christian
>
> Index:
> src/main/java/org/apache/wicket/util/convert/converter/ZeroPaddingIntegerConverter.java
> ===================================================================
> ---
> src/main/java/org/apache/wicket/util/convert/converter/ZeroPaddingIntegerConverter.java
> (revision
> 1063222)
> +++
> src/main/java/org/apache/wicket/util/convert/converter/ZeroPaddingIntegerConverter.java
> (working
> copy)
> @@ -46,7 +46,7 @@
> * @see
> org.apache.wicket.util.convert.converter.AbstractNumberConverter#convertToString(java.lang.Object,
> * java.util.Locale)
> */
> - @Override
> + // @Override
> public String convertToString(final Integer value, final Locale
> locale)
> {
> String result = super.convertToString(value, locale);
>
Which JDK do you use ?
With jdk1.5.0_22 this compiles without any problems.
convertToString() comes
from org.apache.wicket.util.convert.IConverter.convertToString(C, Locale)
which is interface and @Override is not allowed (in 1.6 it is allowed) in
the direct child.
ZeroPaddingIntegerConverter is not direct, it overrides
AbstractIntegerConverter, which overrides AbstractNumberConverter and using
@Override is ok.