Updated Branches: refs/heads/master b5e4574b1 -> da481e4da
WICKET-5410 Remove setting interfaces Remove IExceptionSettings interface Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/da481e4d Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/da481e4d Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/da481e4d Branch: refs/heads/master Commit: da481e4da86973c729e4e12a577ff6b6eeeb0526 Parents: b5e4574 Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Tue Nov 12 11:31:58 2013 +0200 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Tue Nov 12 11:31:58 2013 +0200 ---------------------------------------------------------------------- .../java/org/apache/wicket/Application.java | 11 +- .../apache/wicket/DefaultExceptionMapper.java | 9 +- .../wicket/page/PageAccessSynchronizer.java | 4 +- .../wicket/settings/IExceptionSettings.java | 145 ------------------- .../wicket/settings/def/ExceptionSettings.java | 113 +++++++++++++-- .../wicket/DefaultExceptionMapperTest.java | 4 +- .../InternalErrorCallsAjaxOnFailureTest.java | 15 +- .../http/WebResponseExceptionsTest.java | 6 +- .../wicket/examples/ajax/builtin/LinksPage.java | 8 +- 9 files changed, 128 insertions(+), 187 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-core/src/main/java/org/apache/wicket/Application.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.java b/wicket-core/src/main/java/org/apache/wicket/Application.java index a2b5947..28b228f 100644 --- a/wicket-core/src/main/java/org/apache/wicket/Application.java +++ b/wicket-core/src/main/java/org/apache/wicket/Application.java @@ -84,7 +84,6 @@ import org.apache.wicket.response.filter.EmptySrcAttributeCheckFilter; import org.apache.wicket.session.DefaultPageFactory; import org.apache.wicket.session.ISessionStore; import org.apache.wicket.session.ISessionStore.UnboundListener; -import org.apache.wicket.settings.IExceptionSettings; import org.apache.wicket.settings.IFrameworkSettings; import org.apache.wicket.settings.IJavaScriptLibrarySettings; import org.apache.wicket.settings.IMarkupSettings; @@ -304,7 +303,7 @@ public abstract class Application implements UnboundListener, IEventSink getResourceSettings().setUseMinifiedResources(false); getMarkupSettings().setStripWicketTags(false); getExceptionSettings().setUnexpectedExceptionDisplay( - IExceptionSettings.SHOW_EXCEPTION_PAGE); + ExceptionSettings.SHOW_EXCEPTION_PAGE); getDebugSettings().setComponentUseCheck(true); getDebugSettings().setAjaxDebugModeEnabled(true); getDebugSettings().setDevelopmentUtilitiesEnabled(true); @@ -317,7 +316,7 @@ public abstract class Application implements UnboundListener, IEventSink getResourceSettings().setJavaScriptCompressor(new DefaultJavaScriptCompressor()); getMarkupSettings().setStripWicketTags(true); getExceptionSettings().setUnexpectedExceptionDisplay( - IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); + ExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); getDebugSettings().setComponentUseCheck(false); getDebugSettings().setAjaxDebugModeEnabled(false); getDebugSettings().setDevelopmentUtilitiesEnabled(false); @@ -1029,7 +1028,7 @@ public abstract class Application implements UnboundListener, IEventSink private DebugSettings debugSettings; /** Exception Settings */ - private IExceptionSettings exceptionSettings; + private ExceptionSettings exceptionSettings; /** Framework Settings */ private IFrameworkSettings frameworkSettings; @@ -1130,7 +1129,7 @@ public abstract class Application implements UnboundListener, IEventSink /** * @return Application's exception handling settings */ - public final IExceptionSettings getExceptionSettings() + public final ExceptionSettings getExceptionSettings() { checkSettingsAvailable(); if (exceptionSettings == null) @@ -1144,7 +1143,7 @@ public abstract class Application implements UnboundListener, IEventSink * * @param exceptionSettings */ - public final void setExceptionSettings(final IExceptionSettings exceptionSettings) + public final void setExceptionSettings(final ExceptionSettings exceptionSettings) { this.exceptionSettings = exceptionSettings; } http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-core/src/main/java/org/apache/wicket/DefaultExceptionMapper.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/DefaultExceptionMapper.java b/wicket-core/src/main/java/org/apache/wicket/DefaultExceptionMapper.java index 81829d0..9eebf7b 100644 --- a/wicket-core/src/main/java/org/apache/wicket/DefaultExceptionMapper.java +++ b/wicket-core/src/main/java/org/apache/wicket/DefaultExceptionMapper.java @@ -34,8 +34,7 @@ import org.apache.wicket.request.handler.EmptyRequestHandler; import org.apache.wicket.request.http.WebRequest; import org.apache.wicket.request.http.WebResponse; import org.apache.wicket.request.http.handler.ErrorCodeRequestHandler; -import org.apache.wicket.settings.IExceptionSettings; -import org.apache.wicket.settings.IExceptionSettings.UnexpectedExceptionDisplay; +import org.apache.wicket.settings.def.ExceptionSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -117,18 +116,18 @@ public class DefaultExceptionMapper implements IExceptionMapper else { - final UnexpectedExceptionDisplay unexpectedExceptionDisplay = application.getExceptionSettings() + final ExceptionSettings.UnexpectedExceptionDisplay unexpectedExceptionDisplay = application.getExceptionSettings() .getUnexpectedExceptionDisplay(); logger.error("Unexpected error occurred", e); - if (IExceptionSettings.SHOW_EXCEPTION_PAGE.equals(unexpectedExceptionDisplay)) + if (ExceptionSettings.SHOW_EXCEPTION_PAGE.equals(unexpectedExceptionDisplay)) { Page currentPage = extractCurrentPage(); return createPageRequestHandler(new PageProvider(new ExceptionErrorPage(e, currentPage))); } - else if (IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE.equals(unexpectedExceptionDisplay)) + else if (ExceptionSettings.SHOW_INTERNAL_ERROR_PAGE.equals(unexpectedExceptionDisplay)) { return createPageRequestHandler(new PageProvider( application.getApplicationSettings().getInternalErrorPage())); http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java b/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java index 478c4c3..9442382 100644 --- a/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java +++ b/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java @@ -22,7 +22,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import org.apache.wicket.Application; -import org.apache.wicket.settings.IExceptionSettings.ThreadDumpStrategy; +import org.apache.wicket.settings.def.ExceptionSettings.ThreadDumpStrategy; import org.apache.wicket.util.IProvider; import org.apache.wicket.util.LazyInitializer; import org.apache.wicket.util.lang.Threads; @@ -50,7 +50,7 @@ public class PageAccessSynchronizer implements Serializable @Override protected ConcurrentMap<Integer, PageLock> createInstance() { - return new ConcurrentHashMap<Integer, PageLock>(); + return new ConcurrentHashMap<>(); } }; http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-core/src/main/java/org/apache/wicket/settings/IExceptionSettings.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/settings/IExceptionSettings.java b/wicket-core/src/main/java/org/apache/wicket/settings/IExceptionSettings.java deleted file mode 100644 index f9b0a20..0000000 --- a/wicket-core/src/main/java/org/apache/wicket/settings/IExceptionSettings.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.wicket.settings; - -import org.apache.wicket.util.lang.EnumeratedType; - - -/** - * Settings interface for configuring exception handling related settings. - * <p> - * <i>unexpectedExceptionDisplay </i> (defaults to SHOW_EXCEPTION_PAGE) - Determines how exceptions - * are displayed to the developer or user - * <p> - * <i>throwExceptionOnMissingResource </i> (defaults to true) - Set to true to throw a runtime - * exception if a required string resource is not found. Set to false to return the requested - * resource key surrounded by pairs of question mark characters (e.g. "??missingKey??") - * - * @author Igor Vaynberg (ivaynberg) - */ -public interface IExceptionSettings -{ - /** - * Enumerated type for different ways of displaying unexpected exceptions. - */ - public static final class UnexpectedExceptionDisplay extends EnumeratedType - { - private static final long serialVersionUID = 1L; - - UnexpectedExceptionDisplay(final String name) - { - super(name); - } - } - - /** - * Indicates that an exception page appropriate to development should be shown when an - * unexpected exception is thrown. - */ - public static final UnexpectedExceptionDisplay SHOW_EXCEPTION_PAGE = new UnexpectedExceptionDisplay( - "SHOW_EXCEPTION_PAGE"); - /** - * Indicates a generic internal error page should be shown when an unexpected exception is - * thrown. - */ - public static final UnexpectedExceptionDisplay SHOW_INTERNAL_ERROR_PAGE = new UnexpectedExceptionDisplay( - "SHOW_INTERNAL_ERROR_PAGE"); - - /** - * Indicates that no exception page should be shown when an unexpected exception is thrown. - */ - public static final UnexpectedExceptionDisplay SHOW_NO_EXCEPTION_PAGE = new UnexpectedExceptionDisplay( - "SHOW_NO_EXCEPTION_PAGE"); - - /** - * @return Returns the unexpectedExceptionDisplay. - */ - UnexpectedExceptionDisplay getUnexpectedExceptionDisplay(); - - /** - * The exception display type determines how the framework displays exceptions to you as a - * developer or user. - * <p> - * The default value for exception display type is SHOW_EXCEPTION_PAGE. When this value is set - * and an unhandled runtime exception is thrown by a page, a redirect to a helpful exception - * display page will occur. - * <p> - * This is a developer feature, however, and you may want to instead show an internal error page - * without developer details that allows a user to start over at the application's home page. - * This can be accomplished by setting the exception display type to SHOW_INTERNAL_ERROR_PAGE. - * <p> - * Finally, if you are having trouble with the exception display pages themselves, you can - * disable exception displaying entirely with the value SHOW_NO_EXCEPTION_PAGE. This will cause - * the framework to re-throw any unhandled runtime exceptions after wrapping them in a - * ServletException wrapper. - * - * @param unexpectedExceptionDisplay - * The unexpectedExceptionDisplay to set. - */ - void setUnexpectedExceptionDisplay(UnexpectedExceptionDisplay unexpectedExceptionDisplay); - - /** - * Sets strategy used to handle errors during Ajax request processing - * - * @param strategy - */ - void setAjaxErrorHandlingStrategy(AjaxErrorStrategy strategy); - - /** - * @return strategy used to handle errors during Ajax request processing - */ - AjaxErrorStrategy getAjaxErrorHandlingStrategy(); - - /** - * How to handle errors while processing an Ajax request - * - * @author igor - */ - public static enum AjaxErrorStrategy { - /** redirect to error page, just like a normal requset */ - REDIRECT_TO_ERROR_PAGE, - /** invoke client side failure handler */ - INVOKE_FAILURE_HANDLER - } - - /** - * Which threads' stacktrace to dump when a page lock timeout occurs - * - * @author papegaaij - */ - enum ThreadDumpStrategy { - /** Do not dump any stacktraces */ - NO_THREADS, - /** Dump the stacktrace of the thread holding the lock */ - THREAD_HOLDING_LOCK, - /** Dump stacktraces of all threads of the application */ - ALL_THREADS - } - - /** - * Sets the strategy to use for dumping stack traces of live threads in the JVM. - * - * @param strategy - */ - void setThreadDumpStrategy(ThreadDumpStrategy strategy); - - /** - * @return strategy to use for dumping stack traces of live threads in the JVM. - */ - ThreadDumpStrategy getThreadDumpStrategy(); - -} http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-core/src/main/java/org/apache/wicket/settings/def/ExceptionSettings.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/settings/def/ExceptionSettings.java b/wicket-core/src/main/java/org/apache/wicket/settings/def/ExceptionSettings.java index 700f880..1e75823 100644 --- a/wicket-core/src/main/java/org/apache/wicket/settings/def/ExceptionSettings.java +++ b/wicket-core/src/main/java/org/apache/wicket/settings/def/ExceptionSettings.java @@ -16,10 +16,20 @@ */ package org.apache.wicket.settings.def; -import org.apache.wicket.settings.IExceptionSettings; import org.apache.wicket.util.lang.Args; +import org.apache.wicket.util.lang.EnumeratedType; /** + * + * Settings interface for configuring exception handling related settings. + * <p> + * <i>unexpectedExceptionDisplay </i> (defaults to SHOW_EXCEPTION_PAGE) - Determines how exceptions + * are displayed to the developer or user + * <p> + * <i>throwExceptionOnMissingResource </i> (defaults to true) - Set to true to throw a runtime + * exception if a required string resource is not found. Set to false to return the requested + * resource key surrounded by pairs of question mark characters (e.g. "??missingKey??") + * * @author Jonathan Locke * @author Chris Turner * @author Eelco Hillenius @@ -29,8 +39,66 @@ import org.apache.wicket.util.lang.Args; * @author Martijn Dashorst * @author James Carman */ -public class ExceptionSettings implements IExceptionSettings +public class ExceptionSettings { + /** + * Enumerated type for different ways of displaying unexpected exceptions. + */ + public static final class UnexpectedExceptionDisplay extends EnumeratedType + { + private static final long serialVersionUID = 1L; + + UnexpectedExceptionDisplay(final String name) + { + super(name); + } + } + + /** + * Indicates that an exception page appropriate to development should be shown when an + * unexpected exception is thrown. + */ + public static final UnexpectedExceptionDisplay SHOW_EXCEPTION_PAGE = new UnexpectedExceptionDisplay( + "SHOW_EXCEPTION_PAGE"); + /** + * Indicates a generic internal error page should be shown when an unexpected exception is + * thrown. + */ + public static final UnexpectedExceptionDisplay SHOW_INTERNAL_ERROR_PAGE = new UnexpectedExceptionDisplay( + "SHOW_INTERNAL_ERROR_PAGE"); + + /** + * Indicates that no exception page should be shown when an unexpected exception is thrown. + */ + public static final UnexpectedExceptionDisplay SHOW_NO_EXCEPTION_PAGE = new UnexpectedExceptionDisplay( + "SHOW_NO_EXCEPTION_PAGE"); + + /** + * How to handle errors while processing an Ajax request + * + * @author igor + */ + public static enum AjaxErrorStrategy { + /** redirect to error page, just like a normal requset */ + REDIRECT_TO_ERROR_PAGE, + /** invoke client side failure handler */ + INVOKE_FAILURE_HANDLER + } + + /** + * Which threads' stacktrace to dump when a page lock timeout occurs + * + * @author papegaaij + */ + public static enum ThreadDumpStrategy { + /** Do not dump any stacktraces */ + NO_THREADS, + /** Dump the stacktrace of the thread holding the lock */ + THREAD_HOLDING_LOCK, + /** Dump stacktraces of all threads of the application */ + ALL_THREADS + } + /** Type of handling for unexpected exceptions */ private UnexpectedExceptionDisplay unexpectedExceptionDisplay = SHOW_EXCEPTION_PAGE; @@ -45,49 +113,70 @@ public class ExceptionSettings implements IExceptionSettings private ThreadDumpStrategy threadDumpStrategy = ThreadDumpStrategy.THREAD_HOLDING_LOCK; /** - * @see org.apache.wicket.settings.IRequestCycleSettings#getUnexpectedExceptionDisplay() + * @return Returns the unexpectedExceptionDisplay. */ - @Override public UnexpectedExceptionDisplay getUnexpectedExceptionDisplay() { return unexpectedExceptionDisplay; } /** - * @see org.apache.wicket.settings.IRequestCycleSettings#setUnexpectedExceptionDisplay(org.apache.wicket.settings.Settings.UnexpectedExceptionDisplay) + * The exception display type determines how the framework displays exceptions to you as a + * developer or user. + * <p> + * The default value for exception display type is SHOW_EXCEPTION_PAGE. When this value is set + * and an unhandled runtime exception is thrown by a page, a redirect to a helpful exception + * display page will occur. + * <p> + * This is a developer feature, however, and you may want to instead show an internal error page + * without developer details that allows a user to start over at the application's home page. + * This can be accomplished by setting the exception display type to SHOW_INTERNAL_ERROR_PAGE. + * <p> + * Finally, if you are having trouble with the exception display pages themselves, you can + * disable exception displaying entirely with the value SHOW_NO_EXCEPTION_PAGE. This will cause + * the framework to re-throw any unhandled runtime exceptions after wrapping them in a + * ServletException wrapper. + * + * @param unexpectedExceptionDisplay + * The unexpectedExceptionDisplay to set. */ - @Override public void setUnexpectedExceptionDisplay(UnexpectedExceptionDisplay unexpectedExceptionDisplay) { this.unexpectedExceptionDisplay = unexpectedExceptionDisplay; } /** - * @see org.apache.wicket.settings.IExceptionSettings#getAjaxErrorHandlingStrategy() + * @return strategy used to handle errors during Ajax request processing */ - @Override public AjaxErrorStrategy getAjaxErrorHandlingStrategy() { return errorHandlingStrategyDuringAjaxRequests; } /** - * @see org.apache.wicket.settings.IExceptionSettings#setAjaxErrorHandlingStrategy(org.apache.wicket.settings.IExceptionSettings.AjaxErrorStrategy) + * Sets strategy used to handle errors during Ajax request processing + * + * @param errorHandlingStrategyDuringAjaxRequests */ - @Override public void setAjaxErrorHandlingStrategy( AjaxErrorStrategy errorHandlingStrategyDuringAjaxRequests) { this.errorHandlingStrategyDuringAjaxRequests = errorHandlingStrategyDuringAjaxRequests; } - @Override + /** + * Sets the strategy to use for dumping stack traces of live threads in the JVM. + * + * @param strategy + */ public void setThreadDumpStrategy(ThreadDumpStrategy strategy) { threadDumpStrategy = Args.notNull(strategy, "strategy"); } - @Override + /** + * @return strategy to use for dumping stack traces of live threads in the JVM. + */ public ThreadDumpStrategy getThreadDumpStrategy() { return threadDumpStrategy; http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-core/src/test/java/org/apache/wicket/DefaultExceptionMapperTest.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/test/java/org/apache/wicket/DefaultExceptionMapperTest.java b/wicket-core/src/test/java/org/apache/wicket/DefaultExceptionMapperTest.java index 3e5dac5..b0b1b40 100644 --- a/wicket-core/src/test/java/org/apache/wicket/DefaultExceptionMapperTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/DefaultExceptionMapperTest.java @@ -28,7 +28,7 @@ import org.apache.wicket.mock.MockApplication; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.request.http.WebResponse; import org.apache.wicket.request.mapper.parameter.PageParameters; -import org.apache.wicket.settings.IExceptionSettings; +import org.apache.wicket.settings.def.ExceptionSettings; import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.StringResourceStream; import org.junit.Assert; @@ -48,7 +48,7 @@ public class DefaultExceptionMapperTest extends WicketTestCase protected void init() { getExceptionSettings().setUnexpectedExceptionDisplay( - IExceptionSettings.SHOW_NO_EXCEPTION_PAGE); + ExceptionSettings.SHOW_NO_EXCEPTION_PAGE); } }; } http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-core/src/test/java/org/apache/wicket/ajax/InternalErrorCallsAjaxOnFailureTest.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/InternalErrorCallsAjaxOnFailureTest.java b/wicket-core/src/test/java/org/apache/wicket/ajax/InternalErrorCallsAjaxOnFailureTest.java index f15b871..30eb563 100644 --- a/wicket-core/src/test/java/org/apache/wicket/ajax/InternalErrorCallsAjaxOnFailureTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/ajax/InternalErrorCallsAjaxOnFailureTest.java @@ -21,8 +21,7 @@ import org.apache.wicket.markup.html.pages.ExceptionErrorPage; import org.apache.wicket.markup.html.pages.InternalErrorPage; import org.apache.wicket.protocol.http.mock.MockHttpServletResponse; import org.apache.wicket.resource.DummyApplication; -import org.apache.wicket.settings.IExceptionSettings; -import org.apache.wicket.settings.IExceptionSettings.AjaxErrorStrategy; +import org.apache.wicket.settings.def.ExceptionSettings; import org.apache.wicket.util.tester.BaseWicketTester; import org.apache.wicket.util.tester.WicketTester; import org.junit.Test; @@ -40,8 +39,8 @@ public class InternalErrorCallsAjaxOnFailureTest extends WicketTestCase { /** - * The default {@link IExceptionSettings#getAjaxErrorHandlingStrategy()} is - * {@link AjaxErrorStrategy#REDIRECT_TO_ERROR_PAGE} + * The default {@link org.apache.wicket.settings.def.ExceptionSettings#getAjaxErrorHandlingStrategy()} is + * {@link org.apache.wicket.settings.def.ExceptionSettings.AjaxErrorStrategy#REDIRECT_TO_ERROR_PAGE} */ @Test public void showsInternalErrorPage() @@ -64,9 +63,9 @@ public class InternalErrorCallsAjaxOnFailureTest extends WicketTestCase /** - * Setup {@link AjaxErrorStrategy#INVOKE_FAILURE_HANDLER} so Wicket will not redirect to the - * configured {@link InternalErrorPage}/{@link ExceptionErrorPage} but will preserve the current - * page and send http status 500 to wicket-ajax.js + * Setup {@link org.apache.wicket.settings.def.ExceptionSettings.AjaxErrorStrategy#INVOKE_FAILURE_HANDLER} + * so Wicket will not redirect to the configured {@link InternalErrorPage}/{@link ExceptionErrorPage} + * but will preserve the current page and send http status 500 to wicket-ajax.js */ @Test public void callsOnFailure() @@ -84,7 +83,7 @@ public class InternalErrorCallsAjaxOnFailureTest extends WicketTestCase super.init(); getExceptionSettings().setAjaxErrorHandlingStrategy( - AjaxErrorStrategy.INVOKE_FAILURE_HANDLER); + ExceptionSettings.AjaxErrorStrategy.INVOKE_FAILURE_HANDLER); } }); http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-core/src/test/java/org/apache/wicket/protocol/http/WebResponseExceptionsTest.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/test/java/org/apache/wicket/protocol/http/WebResponseExceptionsTest.java b/wicket-core/src/test/java/org/apache/wicket/protocol/http/WebResponseExceptionsTest.java index 5bfae5a..e5d17c9 100644 --- a/wicket-core/src/test/java/org/apache/wicket/protocol/http/WebResponseExceptionsTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/protocol/http/WebResponseExceptionsTest.java @@ -20,8 +20,8 @@ import org.apache.wicket.WicketTestCase; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.pages.PageExpiredErrorPage; -import org.apache.wicket.settings.IExceptionSettings; import org.apache.wicket.settings.IRequestCycleSettings; +import org.apache.wicket.settings.def.ExceptionSettings; import org.junit.Test; @@ -43,7 +43,7 @@ public class WebResponseExceptionsTest extends WicketTestCase .setRenderStrategy(IRequestCycleSettings.RenderStrategy.REDIRECT_TO_BUFFER); tester.getApplication() .getExceptionSettings() - .setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_EXCEPTION_PAGE); + .setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_EXCEPTION_PAGE); internalErrorPage(); } @@ -55,7 +55,7 @@ public class WebResponseExceptionsTest extends WicketTestCase { tester.getApplication() .getExceptionSettings() - .setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_EXCEPTION_PAGE); + .setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_EXCEPTION_PAGE); internalErrorPage(); } http://git-wip-us.apache.org/repos/asf/wicket/blob/da481e4d/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/LinksPage.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/LinksPage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/LinksPage.java index 61b7a79..bd1251c 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/LinksPage.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/LinksPage.java @@ -29,7 +29,7 @@ import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.PropertyModel; -import org.apache.wicket.settings.IExceptionSettings.AjaxErrorStrategy; +import org.apache.wicket.settings.def.ExceptionSettings; /** @@ -178,7 +178,7 @@ public class LinksPage extends BasePage // note: will be set until the "exception" link is clicked or the application is // restarted getApplication().getExceptionSettings().setAjaxErrorHandlingStrategy( - AjaxErrorStrategy.INVOKE_FAILURE_HANDLER); + ExceptionSettings.AjaxErrorStrategy.INVOKE_FAILURE_HANDLER); throw new WicketRuntimeException("Failure link clicked"); } @@ -229,10 +229,10 @@ public class LinksPage extends BasePage // note: will be set until the "failure" link is clicked or the application is // restarted getApplication().getExceptionSettings().setAjaxErrorHandlingStrategy( - AjaxErrorStrategy.REDIRECT_TO_ERROR_PAGE); + ExceptionSettings.AjaxErrorStrategy.REDIRECT_TO_ERROR_PAGE); throw new RuntimeException("test whether the exception handling works"); } }); } -} \ No newline at end of file +}
