THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
The initial issue that started this discussion was a problem with this method signature:
Code Block |
---|
public final void setResponsePage(final Class<? extends Page<?>> cls, PageParameters parameters) { getRequestCycle().setResponsePage(cls, parameters); } |
We could change this to:
Code Block |
---|
@SuppressWarnings({"unchecked"}) public final void setResponsePage(final Class<?> cls, PageParameters parameters) { final Class<? extends Page<?>> castCls = (Class<? extends Page<?>> cls) getRequestCycle().setResponsePage(castCls, parameters); } |
This way (a) users migrating to 1.4 don't get tons of warnings/errors and (b) if they pass in the wrong thing, a class cast exception will be thrown quickly.
...