You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Juergen <ju...@gmail.com> on 2010/08/01 13:54:02 UTC
Re: svn commit: r981169 - in /wicket/trunk: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/ wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ wicket-extensions/src/main/ja
Ups. I'll fix them
Von meinem iPod gesendet
Am 01.08.2010 um 10:25 schrieb Martin Grigorov <mg...@apache.org>:
> Hi Juergen,
>
> Two tests are broken.
> The signature
> of org.apache.wicket.protocol.http.WicketFilter.getFilterPath
> (HttpServletRequest)
> is changed
> and org.apache.wicket.protocol.http.WicketFilterTest.getFilterPath
> (String,
> InputStream) doesn't work anymore.
>
> Looking
> at org.apache.wicket.protocol.http.WicketFilter.getFilterPath
> (HttpServletRequest)
> I
> see that the parameter is not even used.
> I can fix it but I am not sure what were your intentions.
>
> On Sun, Aug 1, 2010 at 9:01 AM, <jd...@apache.org> wrote:
>
>> Author: jdonnerstag
>> Date: Sun Aug 1 07:01:19 2010
>> New Revision: 981169
>>
>> URL: http://svn.apache.org/viewvc?rev=981169&view=rev
>> Log:
>> went through some of the Eclipse warnings
>>
>> Added:
>>
>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/
>> WebXmlFile.java
>> Modified:
>>
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
>>
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/ajax/markup/html/modal/ModalWindow.java
>>
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/validation/validator/
>> RfcCompliantEmailAddressValidator.java
>>
>> wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>> Application.java
>>
>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/
>> Connections.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/
>> RestartResponseAtInterceptPageException.java
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/
>> SharedResources.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/
>> AjaxRequestTarget.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/
>> form/CheckGroup.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/
>> form/RadioGroup.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/page/
>> CouldNotLockPageException.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/
>> WicketFilter.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/CompressedResourceReference.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/DynamicImageResource.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/JavascriptResourceReference.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/PackageResourceReference.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/ResourceStreamResource.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/SharedResourceReference.java
>>
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/
>> TextTemplateResourceReference.java
>>
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> ComponentConfigurationTest.java
>>
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> ComponentInitializationTest.java
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> VisitorTest.java
>>
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> form/DisabledItemRetainingCheckBoxTest.java
>>
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> form/FormHasErrorPage.java
>>
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> page/SimplePanel.java
>>
>> Modified:
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
>> (original)
>> +++
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
>> Sun Aug 1 07:01:19 2010
>> @@ -28,10 +28,10 @@ import org.apache.wicket.model.IModel;
>> *
>> * FIXME javadoc - constructors need proper descriptions
>> *
>> - * Note that you must add your own CSS to make the suggestion
>> display
>> properly,
>> - * see {@link DefaultCssAutocompleteTextField} for an example.
>> + * Note that you must add your own CSS to make the suggestion
>> display
>> properly, see
>> + * {@link DefaultCssAutoCompleteTextField} for an example.
>> *
>> - * @see DefaultCssAutocompleteTextField
>> + * @see DefaultCssAutoCompleteTextField
>> * @see AutoCompleteBehavior
>> * @see IAutoCompleteRenderer
>> *
>>
>> Modified:
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/ajax/markup/html/modal/ModalWindow.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/ajax/markup/html/modal/ModalWindow.java
>> (original)
>> +++
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/ajax/markup/html/modal/ModalWindow.java
>> Sun Aug 1 07:01:19 2010
>> @@ -25,7 +25,6 @@ import org.apache.wicket.ajax.AjaxReques
>> import org.apache.wicket.ajax.IAjaxCallDecorator;
>> import
>> org.apache.wicket.ajax.calldecorator.CancelEventIfNoAjaxDecorator;
>> import org.apache.wicket.behavior.HeaderContributor;
>> -import
>> org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.PageCreator;
>> import org.apache.wicket.markup.ComponentTag;
>> import org.apache.wicket.markup.html.WebMarkupContainer;
>> import org.apache.wicket.markup.html.panel.Panel;
>>
>> Modified:
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/validation/validator/
>> RfcCompliantEmailAddressValidator.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/validation/validator/RfcCompliantEmailAddressValidator.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/validation/validator/
>> RfcCompliantEmailAddressValidator.java
>> (original)
>> +++
>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/
>> extensions/validation/validator/
>> RfcCompliantEmailAddressValidator.java
>> Sun Aug 1 07:01:19 2010
>> @@ -32,9 +32,9 @@ import org.apache.wicket.validation.vali
>> * <p>
>> * Most users will be satisfied with the {@link EmailAddressValidator}
>> *
>> - * @see <a href="http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
>> ">Perl
>> Regex implementation *
>> - * of RFC 822< /a>
>> - * @see <a href="http://www.ietf.org/rfc/rfc0822.txt?
>> number=822">RFC 822<
>> /a>
>> + * @see <a href="http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
>> ">Perl
>> Regex implementation
>> + * of RFC 822</a>
>> + * @see <a href="http://www.ietf.org/rfc/rfc0822.txt?number=822">RFC
>> 822</a>
>> * @author Frank Bille
>> */
>> public class RfcCompliantEmailAddressValidator extends
>> PatternValidator
>> @@ -140,6 +140,7 @@ public class RfcCompliantEmailAddressVal
>> super(emailPattern);
>> }
>>
>> + @Override
>> protected void onValidate(IValidatable validatable)
>> {
>> String email = validatable.getValue().toString();
>>
>> Modified:
>> wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>> Application.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>> Application.java
>> (original)
>> +++
>> wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>> Application.java
>> Sun Aug 1 07:01:19 2010
>> @@ -18,8 +18,6 @@ package org.apache.wicket.jmx;
>>
>> import java.io.IOException;
>>
>> -import org.apache.wicket.protocol.http.WebApplication;
>> -
>>
>> /**
>> * Exposes Application related functionality for JMX.
>> @@ -30,8 +28,6 @@ public class Application implements Appl
>> {
>> private final org.apache.wicket.Application application;
>>
>> - private final WebApplication webApplication;
>> -
>> /**
>> * Create.
>> *
>> @@ -40,16 +36,6 @@ public class Application implements Appl
>> public Application(org.apache.wicket.Application application)
>> {
>> this.application = application;
>> -
>> - // do this so that we don't have to cast all the time
>> - if (application instanceof WebApplication)
>> - {
>> - webApplication = (WebApplication)application;
>> - }
>> - else
>> - {
>> - webApplication = null;
>> - }
>> }
>>
>> /**
>>
>> Added:
>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/
>> WebXmlFile.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/WebXmlFile.java?rev=981169&view=auto
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/
>> WebXmlFile.java
>> (added)
>> +++
>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/
>> WebXmlFile.java
>> Sun Aug 1 07:01:19 2010
>> @@ -0,0 +1,221 @@
>> +/*
>> + * 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.util.file;
>> +
>> +import java.io.IOException;
>> +import java.io.InputStream;
>> +
>> +import javax.servlet.FilterConfig;
>> +import javax.servlet.ServletContext;
>> +import javax.xml.parsers.DocumentBuilder;
>> +import javax.xml.parsers.DocumentBuilderFactory;
>> +import javax.xml.parsers.ParserConfigurationException;
>> +
>> +import org.slf4j.Logger;
>> +import org.slf4j.LoggerFactory;
>> +import org.w3c.dom.Document;
>> +import org.w3c.dom.Node;
>> +import org.w3c.dom.NodeList;
>> +import org.xml.sax.SAXException;
>> +
>> +/**
>> + * A utility class providing helper methods in dealing with web.xml
>> + *
>> + * @author jcompagner
>> + * @author Juergen Donnerstag
>> + */
>> +public class WebXmlFile
>> +{
>> + private static final Logger log =
>> LoggerFactory.getLogger(WebXmlFile.class);
>> +
>> + /**
>> + * Construct.
>> + */
>> + public WebXmlFile()
>> + {
>> + }
>> +
>> + /**
>> + * Gets Wicket filter path via FilterConfig
>> + *
>> + * @param filterConfig
>> + * @return Filter path retrieved from "url-pattern". Null
>> if not
>> found or error occured
>> + */
>> + public final String getFilterPath(final FilterConfig
>> filterConfig)
>> + {
>> + return getFilterPath(filterConfig.getServletContext
>> (),
>> filterConfig.getFilterName());
>> + }
>> +
>> + /**
>> + * Gets Wicket filter path via ServletContext and the
>> filter name
>> + *
>> + * @param servletContext
>> + * @param filterName
>> + * @return Filter path retrieved from "url-pattern". Null
>> if not
>> found or error occured
>> + */
>> + public final String getFilterPath(final ServletContext
>> servletContext, final String filterName)
>> + {
>> + InputStream is =
>> servletContext.getResourceAsStream("/WEB-INF/web.xml");
>> + if (is != null)
>> + {
>> + try
>> + {
>> + return getFilterPath(filterName, is);
>> + }
>> + catch (ParserConfigurationException ex)
>> + {
>> + log.error("Error reading servlet/
>> filter
>> path from web.xml", ex);
>> + }
>> + catch (SAXException ex)
>> + {
>> + log.error("Error reading servlet/
>> filter
>> path from web.xml", ex);
>> + }
>> + catch (IOException ex)
>> + {
>> + log.error("Error reading servlet/
>> filter
>> path from web.xml", ex);
>> + }
>> + catch (SecurityException e)
>> + {
>> + // Swallow this at INFO.
>> + log.info("Couldn't read web.xml to
>> automatically pick up servlet/filter path: " +
>> + e.getMessage());
>> + }
>> + }
>> + return null;
>> + }
>> +
>> + /**
>> + * Gets Wicket filter path via filter name and InputStream.
>> The
>> InputStream is assumed to be an
>> + * web.xml file.
>> + * <p>
>> + * A typical Wicket web.xml entry looks like:
>> + *
>> + * <pre>
>> + * <code>
>> + * <filter>
>> + * <filter-name>HelloWorldApplication</filter-
>> name>
>> + *
>> <filter-
>> class>org.apache.wicket.protocol.http.WicketFilter</filter-
>> class>
>> + * <init-param>
>> + * <param-name>applicationClassName</param-
>> name>
>> + *
>> <param-
>> value&
>> gt;org.apache.wicket.examples.helloworld.HelloWorldApplication</
>> param-value>
>> + * </init-param>
>> + * </filter>
>> + *
>> + * <filter-mapping>
>> + * <filter-name>HelloWorldApplication</filter-
>> name>
>> + * <url-pattern>/helloworld/*</url-pattern>
>> + * <dispatcher>REQUEST</dispatcher>
>> + * <dispatcher>INCLUDE</dispatcher>
>> + * </filter-mapping>
>> + * </code>
>> + * </pre>
>> + *
>> + * @param filterName
>> + * @param is
>> + * The web.xml file
>> + * @return Filter path retrieved from "url-pattern". Null
>> if not
>> found.
>> + * @throws ParserConfigurationException
>> + * @throws IOException
>> + * @throws SAXException
>> + */
>> + public final String getFilterPath(final String filterName,
>> final
>> InputStream is)
>> + throws ParserConfigurationException, SAXException,
>> IOException
>> + {
>> + DocumentBuilderFactory factory =
>> DocumentBuilderFactory.newInstance();
>> + DocumentBuilder builder = factory.newDocumentBuilder
>> ();
>> + Document document = builder.parse(is);
>> +
>> + String mapping = "filter-mapping";
>> + String name = "filter-name";
>> +
>> + String urlPattern = getFilterPath(filterName,
>> mapping,
>> name, document.getChildNodes());
>> +
>> + // remove leading "/" and trailing "*"
>> + return urlPattern.substring(1, urlPattern.length()
>> - 1);
>> + }
>> +
>> + /**
>> + * Iterate through all children of 'node' and search for a
>> node
>> with name "filterName". Return
>> + * the value of node "url-pattern" if "filterName" was found.
>> + *
>> + * @param filterName
>> + * @param name
>> + * @param node
>> + * @return value of node "url-pattern"
>> + */
>> + private String getFilterPath(final String filterName, final
>> String
>> name, final Node node)
>> + {
>> + String foundUrlPattern = null;
>> + String foundFilterName = null;
>> +
>> + for (int i = 0; i < node.getChildNodes().getLength
>> (); ++i)
>> + {
>> + Node n = node.getChildNodes().item(i);
>> + if (name.equals(n.getNodeName()))
>> + {
>> + foundFilterName = n.getTextContent();
>> + }
>> + else if ("url-pattern".equals(n.getNodeName
>> ()))
>> + {
>> + foundUrlPattern = n.getTextContent();
>> + }
>> + }
>> +
>> + if (foundFilterName != null)
>> + {
>> + foundFilterName = foundFilterName.trim();
>> + }
>> +
>> + if (filterName.equals(foundFilterName))
>> + {
>> + return (foundUrlPattern != null) ?
>> foundUrlPattern.trim() : null;
>> + }
>> + else
>> + {
>> + return null;
>> + }
>> + }
>> +
>> + /**
>> + * Find a node with name 'mapping' within 'nodeList' and if
>> found
>> continue to search amongst its
>> + * children for a node with 'filterName' and "url-pattern'
>> + *
>> + * @param filterName
>> + * @param mapping
>> + * @param name
>> + * @param nodeList
>> + * @return The value assigned to node "url-pattern"
>> + */
>> + private String getFilterPath(final String filterName, final
>> String
>> mapping, final String name,
>> + final NodeList nodeList)
>> + {
>> + String path = null;
>> + for (int i = 0; (i < nodeList.getLength()) && (path
>> ==
>> null); ++i)
>> + {
>> + Node node = nodeList.item(i);
>> + if (mapping.equals(node.getNodeName()))
>> + {
>> + path = getFilterPath(filterName,
>> name,
>> node);
>> + }
>> + else
>> + {
>> + path = getFilterPath(filterName,
>> mapping,
>> name, node.getChildNodes());
>> + }
>> + }
>> + return path;
>> + }
>> +}
>>
>> Modified:
>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/
>> Connections.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/
>> Connections.java
>> (original)
>> +++
>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/
>> Connections.java
>> Sun Aug 1 07:01:19 2010
>> @@ -16,11 +16,9 @@
>> */
>> package org.apache.wicket.util.io;
>>
>> -import java.io.File;
>> import java.io.IOException;
>> import java.net.HttpURLConnection;
>> import java.net.JarURLConnection;
>> -import java.net.URI;
>> import java.net.URL;
>> import java.net.URLConnection;
>>
>> @@ -33,7 +31,6 @@ public class Connections
>> {
>> private Connections()
>> {
>> -
>> }
>>
>> /**
>> @@ -45,7 +42,6 @@ public class Connections
>> */
>> public static long getLastModified(URL url) throws IOException
>> {
>> -
>> URLConnection connection = url.openConnection();
>>
>> try
>> @@ -68,7 +64,6 @@ public class Connections
>> {
>> return connection.getLastModified();
>> }
>> -
>> }
>> finally
>> {
>> @@ -115,5 +110,4 @@ public class Connections
>> connection.getInputStream().close();
>> }
>> }
>> -
>> }
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/
>> RestartResponseAtInterceptPageException.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/
>> RestartResponseAtInterceptPageException.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/
>> RestartResponseAtInterceptPageException.java
>> Sun Aug 1 07:01:19 2010
>> @@ -36,6 +36,7 @@ import org.apache.wicket.util.string.Str
>>
>> public class RestartResponseAtInterceptPageException extends
>> ResetResponseException
>> {
>> + private static final long serialVersionUID = 1L;
>>
>> public RestartResponseAtInterceptPageException(Page
>> interceptPage)
>> {
>> @@ -59,6 +60,8 @@ public class RestartResponseAtInterceptP
>> */
>> public static class InterceptData implements Serializable
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> private Url originalUrl;
>> private Map<String, List<StringValue>> postParameters;
>> private boolean continueOk;
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/
>> SharedResources.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/
>> SharedResources.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/
>> SharedResources.java Sun
>> Aug 1 07:01:19 2010
>> @@ -33,6 +33,8 @@ public class SharedResources
>>
>> private static final class SharedResourceReference extends
>> ResourceReference
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> private final IResource resource;
>>
>> public SharedResourceReference(Class<?> scope, String
>> name,
>> Locale locale, String style,
>> @@ -116,5 +118,5 @@ public class SharedResources
>> String variation, boolean strict)
>> {
>> return registry.getResourceReference(scope, name,
>> locale,
>> style, variation, strict);
>> -}
>> + }
>> }
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/
>> AjaxRequestTarget.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/
>> AjaxRequestTarget.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/
>> AjaxRequestTarget.java
>> Sun Aug 1 07:01:19 2010
>> @@ -33,7 +33,6 @@ import org.apache.wicket.Component;
>> import org.apache.wicket.MarkupContainer;
>> import org.apache.wicket.Page;
>> import org.apache.wicket.WicketRuntimeException;
>> -import org.apache.wicket.ajax.AjaxRequestTarget.IListener;
>> import org.apache.wicket.behavior.IBehavior;
>> import org.apache.wicket.markup.html.IHeaderResponse;
>> import org.apache.wicket.markup.html.internal.HeaderResponse;
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/
>> form/CheckGroup.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/
>> form/CheckGroup.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/
>> form/CheckGroup.java
>> Sun Aug 1 07:01:19 2010
>> @@ -100,7 +100,6 @@ public class CheckGroup<T> extends FormC
>> /**
>> * @see FormComponent#convertValue(String[])
>> */
>> - @SuppressWarnings("unchecked")
>> @Override
>> protected Collection<T> convertValue(String[] values) throws
>> ConversionException
>> {
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/
>> form/RadioGroup.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/
>> form/RadioGroup.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/
>> form/RadioGroup.java
>> Sun Aug 1 07:01:19 2010
>> @@ -92,7 +92,6 @@ public class RadioGroup<T> extends FormC
>> /**
>> * @see
>> org.apache.wicket.markup.html.form.FormComponent#convertValue(String
>> [])
>> */
>> - @SuppressWarnings("unchecked")
>> @Override
>> protected T convertValue(String[] input) throws
>> ConversionException
>> {
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/page/
>> CouldNotLockPageException.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/page/CouldNotLockPageException.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/page/
>> CouldNotLockPageException.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/page/
>> CouldNotLockPageException.java
>> Sun Aug 1 07:01:19 2010
>> @@ -20,6 +20,8 @@ import org.apache.wicket.util.time.Durat
>>
>> public class CouldNotLockPageException extends RuntimeException
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> private final int page;
>> private final Duration timeout;
>> private final String threadName;
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/
>> WicketFilter.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/
>> WicketFilter.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/
>> WicketFilter.java
>> Sun Aug 1 07:01:19 2010
>> @@ -17,7 +17,6 @@
>> package org.apache.wicket.protocol.http;
>>
>> import java.io.IOException;
>> -import java.io.InputStream;
>>
>> import javax.servlet.Filter;
>> import javax.servlet.FilterChain;
>> @@ -27,21 +26,18 @@ import javax.servlet.ServletRequest;
>> import javax.servlet.ServletResponse;
>> import javax.servlet.http.HttpServletRequest;
>> import javax.servlet.http.HttpServletResponse;
>> -import javax.xml.parsers.DocumentBuilder;
>> -import javax.xml.parsers.DocumentBuilderFactory;
>>
>> import org.apache.wicket.ThreadContext;
>> import org.apache.wicket.WicketRuntimeException;
>> import org.apache.wicket.protocol.http.servlet.ServletWebRequest;
>> import org.apache.wicket.protocol.http.servlet.ServletWebResponse;
>> import org.apache.wicket.request.cycle.RequestCycle;
>> +import org.apache.wicket.request.http.WebRequest;
>> import org.apache.wicket.request.http.WebResponse;
>> +import org.apache.wicket.util.file.WebXmlFile;
>> import org.apache.wicket.util.string.Strings;
>> import org.slf4j.Logger;
>> import org.slf4j.LoggerFactory;
>> -import org.w3c.dom.Document;
>> -import org.w3c.dom.Node;
>> -import org.w3c.dom.NodeList;
>>
>> /**
>> * Filter for initiating handling of Wicket requests.
>> @@ -75,13 +71,15 @@ public class WicketFilter implements Fil
>>
>> static final String SERVLET_PATH_HOLDER = "<servlet>";
>>
>> - private WebApplication webApplication;
>> + // Wicket's Application object
>> + private WebApplication application;
>>
>> private FilterConfig filterConfig;
>>
>> private String filterPath;
>>
>> - private final boolean servletMode = false;
>> + // filterPath length without trailing "/"
>> + private int filterPathLength = -1;
>>
>> /**
>> * @return The class loader
>> @@ -92,55 +90,19 @@ public class WicketFilter implements Fil
>> }
>>
>> /**
>> - * Checks if the request is for home page and lacks
>> trailing slash.
>> If necessary redirects to
>> - * URL with trailing slash.
>> + * This is Wicket's main method to execute a request
>> *
>> * @param request
>> * @param response
>> - * @param filterPath
>> - * @return <code>true</code> if there is a trailing slash,
>> <code>false</code> if redirect was
>> - * necessary.
>> + * @param chain
>> + * @return false, if the request could not be processed
>> + * @throws IOException
>> + * @throws ServletException
>> */
>> - private boolean checkForTrailingSlash(HttpServletRequest
>> request,
>> HttpServletResponse response,
>> - String filterPath)
>> - {
>> - // current URI
>> - String uri =
>> Strings.stripJSessionId(request.getRequestURI());
>> -
>> - // home page without trailing slash URI
>> - String homePageUri = request.getContextPath() + "/" +
>> filterPath;
>> - if (homePageUri.endsWith("/"))
>> - {
>> - homePageUri = homePageUri.substring(0,
>> homePageUri.length() - 1);
>> - }
>> -
>> - if (uri.equals(homePageUri))
>> - {
>> - // construct redirect URL
>> - String redirect = uri + "/";
>> - if (!Strings.isEmpty(request.getQueryString
>> ()))
>> - {
>> - redirect += "?" +
>> request.getQueryString();
>> - }
>> - try
>> - {
>> - // send redirect - this will
>> discard POST
>> parameters if the request is POST
>> - // - still better than getting an
>> error
>> because of lacking trailing slash
>> -
>> response.sendRedirect(response.encodeRedirectURL(redirect));
>> - }
>> - catch (IOException e)
>> - {
>> - throw new RuntimeException(e);
>> - }
>> - return false;
>> - }
>> -
>> - return true;
>> - }
>> -
>> - boolean processRequest(ServletRequest request,
>> ServletResponse
>> response, FilterChain chain)
>> - throws IOException, ServletException
>> + boolean processRequest(final ServletRequest request, final
>> ServletResponse response,
>> + final FilterChain chain) throws IOException,
>> ServletException
>> {
>> + // Assume we are able to handle the request
>> boolean res = true;
>>
>> final ClassLoader previousClassLoader =
>> Thread.currentThread().getContextClassLoader();
>> @@ -158,17 +120,17 @@ public class WicketFilter implements Fil
>>
>> String filterPath =
>> getFilterPath(httpServletRequest);
>>
>> - webApplication.set();
>> -
>> - if (checkForTrailingSlash(httpServletRequest,
>> httpServletResponse, filterPath))
>> + String redirectURL =
>> checkIfRedirectRequired(httpServletRequest);
>> + if (redirectURL == null)
>> {
>> - ServletWebRequest req = new
>> ServletWebRequest(httpServletRequest, filterPath);
>> + // No redirect; process the request
>> + application.set();
>>
>> - WebResponse resp = new
>> HeaderBufferingWebResponse(new ServletWebResponse(
>> + WebRequest webRequest = new
>> ServletWebRequest(httpServletRequest, filterPath);
>> + WebResponse webResponse = new
>> HeaderBufferingWebResponse(new ServletWebResponse(
>> httpServletRequest,
>> httpServletResponse));
>>
>> - RequestCycle requestCycle =
>> webApplication.createRequestCycle(req, resp);
>> -
>> + RequestCycle requestCycle =
>> application.createRequestCycle(webRequest, webResponse);
>> if (!
>> requestCycle.processRequestAndDetach())
>> {
>> if (chain != null)
>> @@ -179,7 +141,20 @@ public class WicketFilter implements Fil
>> }
>> else
>> {
>> - resp.flush();
>> + webResponse.flush();
>> + }
>> + }
>> + else
>> + {
>> + try
>> + {
>> + // send redirect - this will
>> discard POST parameters if the request is POST
>> + // - still better than
>> getting an
>> error because of lacking trailing slash
>> +
>> httpServletResponse.sendRedirect
>> (httpServletResponse.encodeRedirectURL(redirectURL));
>> + }
>> + catch (IOException e)
>> + {
>> + throw new RuntimeException
>> (e);
>> }
>> }
>> }
>> @@ -201,8 +176,8 @@ public class WicketFilter implements Fil
>> * @see javax.servlet.Filter#doFilter
>> (javax.servlet.ServletRequest,
>> * javax.servlet.ServletResponse,
>> javax.servlet.FilterChain)
>> */
>> - public void doFilter(ServletRequest request, ServletResponse
>> response, FilterChain chain)
>> - throws IOException, ServletException
>> + public void doFilter(final ServletRequest request, final
>> ServletResponse response,
>> + final FilterChain chain) throws IOException,
>> ServletException
>> {
>> processRequest(request, response, chain);
>> }
>> @@ -268,20 +243,27 @@ public class WicketFilter implements Fil
>> /**
>> * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
>> */
>> - public void init(FilterConfig filterConfig) throws
>> ServletException
>> + public void init(final FilterConfig filterConfig) throws
>> ServletException
>> {
>> this.filterConfig = filterConfig;
>> - IWebApplicationFactory factory =
>> getApplicationFactory();
>> - webApplication = factory.createApplication(this);
>> - webApplication.setName(filterConfig.getFilterName());
>> - webApplication.setWicketFilter(this);
>>
>> - initFilterPath();
>> + IWebApplicationFactory factory =
>> getApplicationFactory();
>> + application = factory.createApplication(this);
>> + application.setName(filterConfig.getFilterName());
>> + application.setWicketFilter(this);
>> +
>> + filterPath = new WebXmlFile().getFilterPath
>> (filterConfig);
>> + if (filterPath == null)
>> + {
>> + log.info("Unable to parse filter mapping
>> web.xml
>> for " + filterConfig.getFilterName() +
>> + ". " + "Configure with init-param " +
>> FILTER_MAPPING_PARAM +
>> + " if it is not \"/*\".");
>> + }
>>
>> final ClassLoader previousClassLoader =
>> Thread.currentThread().getContextClassLoader();
>> final ClassLoader newClassLoader = getClassLoader();
>>
>> - webApplication.set();
>> + application.set();
>> try
>> {
>> if (previousClassLoader != newClassLoader)
>> @@ -289,10 +271,10 @@ public class WicketFilter implements Fil
>>
>> Thread.currentThread().setContextClassLoader(newClassLoader);
>> }
>>
>> - webApplication.initApplication();
>> + application.initApplication();
>>
>> // Give the application the option to log
>> that it is
>> started
>> - webApplication.logStarted();
>> + application.logStarted();
>> }
>> finally
>> {
>> @@ -314,190 +296,102 @@ public class WicketFilter implements Fil
>> }
>>
>> /**
>> + * Either get the filterPath retrieved from web.xml, or if
>> not
>> found the old (1.3) way via a
>> + * filter mapping param.
>> *
>> + * @param request
>> + * @return filterPath
>> */
>> - private void initFilterPath()
>> + protected String getFilterPath(final HttpServletRequest
>> request)
>> {
>> - InputStream is =
>> filterConfig.getServletContext().getResourceAsStream("/WEB-INF/
>> web.xml");
>> - if (is != null)
>> + if (filterPath != null)
>> {
>> - try
>> - {
>> - filterPath =
>> getFilterPath(filterConfig.getFilterName(), is);
>> - }
>> - catch (ServletException e)
>> - {
>> - log.error("Error reading servlet/
>> filter
>> path from web.xml", e);
>> - }
>> - catch (SecurityException e)
>> - {
>> - // Swallow this at INFO.
>> - log.info("Couldn't read web.xml to
>> automatically pick up servlet/filter path: " +
>> - e.getMessage());
>> - }
>> - if (filterPath == null)
>> - {
>> - log.info("Unable to parse filter
>> mapping
>> web.xml for " +
>> - filterConfig.getFilterName
>> () + ". "
>> + "Configure with init-param " +
>> - FILTER_MAPPING_PARAM + " if
>> it is
>> not \"/*\".");
>> - }
>> + return filterPath;
>> }
>> - };
>>
>> - /**
>> - *
>> - * @param filterName
>> - * @param name
>> - * @param node
>> - * @return
>> - */
>> - private String getFilterPath(String filterName, String
>> name, Node
>> node)
>> - {
>> - String foundUrlPattern = null;
>> - String foundFilterName = null;
>> -
>> - for (int i = 0; i < node.getChildNodes().getLength
>> (); ++i)
>> - {
>> - Node n = node.getChildNodes().item(i);
>> - if (name.equals(n.getNodeName()))
>> - {
>> - foundFilterName = n.getTextContent();
>> - }
>> - else if ("url-pattern".equals(n.getNodeName
>> ()))
>> - {
>> - foundUrlPattern = n.getTextContent();
>> - }
>> - }
>> + // Legacy migration check.
>> + // TODO: Remove this after 1.3 is released and
>> everyone's
>> upgraded.
>>
>> - if (foundFilterName != null)
>> + String result =
>> filterConfig.getInitParameter(FILTER_MAPPING_PARAM);
>> + if (result == null || result.equals("/*"))
>> {
>> - foundFilterName = foundFilterName.trim();
>> + filterPath = "";
>> }
>> -
>> -
>> - if (filterName.equals(foundFilterName))
>> + else if (!result.startsWith("/") || !result.endsWith
>> ("/*"))
>> {
>> - return (foundUrlPattern != null) ?
>> foundUrlPattern.trim() : null;
>> + throw new WicketRuntimeException("Your " +
>> FILTER_MAPPING_PARAM +
>> + " must start with \"/\" and end with
>> \"/*\". It is: " + result);
>> }
>> else
>> {
>> - return null;
>> + // remove leading "/" and trailing "*"
>> + filterPath = result.substring(1,
>> result.length() -
>> 1);
>> }
>> + return filterPath;
>> }
>>
>> /**
>> - *
>> - * @param filterName
>> - * @param mapping
>> - * @param name
>> - * @param nodeList
>> - * @return
>> + * @see javax.servlet.Filter#destroy()
>> */
>> - private String getFilterPath(String filterName, String
>> mapping,
>> String name, NodeList nodeList)
>> + public void destroy()
>> {
>> - for (int i = 0; i < nodeList.getLength(); ++i)
>> + if (application != null)
>> {
>> - Node node = nodeList.item(i);
>> - if (mapping.equals(node.getNodeName()))
>> - {
>> - String path = getFilterPath
>> (filterName,
>> name, node);
>> - if (path != null)
>> - {
>> - return path;
>> - }
>> - }
>> - else
>> - {
>> - String path = getFilterPath
>> (filterName,
>> mapping, name, node.getChildNodes());
>> - if (path != null)
>> - {
>> - return path;
>> - }
>> - }
>> + application.internalDestroy();
>> + application = null;
>> }
>> - return null;
>> }
>>
>> /**
>> + * Try to determine as fast as possible if a redirect is
>> necessary
>> *
>> - * @param filterName
>> - * @param is
>> - * @return
>> - * @throws ServletException
>> + * @param request
>> + * @return null, if no redirect is necessary. Else the
>> redirect URL
>> */
>> - private String getFilterPath(String filterName, InputStream
>> is)
>> throws ServletException
>> + private String checkIfRedirectRequired(final
>> HttpServletRequest
>> request)
>> {
>> - DocumentBuilderFactory factory =
>> DocumentBuilderFactory.newInstance();
>> - try
>> - {
>> - DocumentBuilder builder =
>> factory.newDocumentBuilder();
>> - Document document = builder.parse(is);
>> + String requestURI = request.getRequestURI();
>> + String contextPath = request.getContextPath();
>>
>> - String prefix = servletMode ? "servlet" :
>> "filter";
>> - String mapping = prefix + "-mapping";
>> - String name = prefix + "-name";
>> -
>> - String urlPattern = getFilterPath(filterName,
>> mapping, name, document.getChildNodes());
>> - return stripWildcard(urlPattern);
>> - }
>> - catch (Exception e)
>> + // length without jesessionid (http://
>> .../abc;jsessionid=...?param)
>> + int uriLength = requestURI.indexOf(';');
>> + if (uriLength == -1)
>> {
>> - throw new ServletException(e);
>> + uriLength = requestURI.length();
>> }
>> - }
>>
>> - /**
>> - *
>> - * @param request
>> - * @return
>> - */
>> - protected String getFilterPath(HttpServletRequest request)
>> - {
>> - if (filterPath != null)
>> + if (filterPathLength == -1)
>> {
>> - return filterPath;
>> - }
>> - if (servletMode)
>> - {
>> - return filterPath = request.getServletPath();
>> + filterPathLength = filterPath.length();
>> + if (filterPath.endsWith("/"))
>> + {
>> + filterPathLength -= 1;
>> + }
>> }
>> - String result;
>> - // Legacy migration check.
>> - // TODO: Remove this after 1.3 is released and
>> everyone's
>> upgraded.
>>
>> - result =
>> filterConfig.getInitParameter(FILTER_MAPPING_PARAM);
>> - if (result == null || result.equals("/*"))
>> + // uri != request.getContextPath() + "/" + filterPath
>> (without "/" at the end)
>> + if (uriLength != (contextPath.length() + 1 +
>> filterPathLength))
>> {
>> - return "";
>> + return null;
>> }
>> - else if (!result.startsWith("/") || !result.endsWith
>> ("/*"))
>> +
>> + // current URI without jsessionid
>> + String uri = requestURI.substring(0, uriLength);
>> +
>> + // home page without trailing slash URI
>> + String homePageUri = contextPath + "/" +
>> filterPath.substring(0, filterPathLength);
>> + if (uri.equals(homePageUri) == false)
>> {
>> - throw new WicketRuntimeException("Your " +
>> FILTER_MAPPING_PARAM +
>> - " must start with \"/\" and end with
>> \"/*\". It is: " + result);
>> + return null;
>> }
>> - return filterPath = stripWildcard(result);
>> - }
>> -
>> - /**
>> - * Strip trailing '*' and keep leading '/'
>> - *
>> - * @param result
>> - * @return The stripped String
>> - */
>> - private String stripWildcard(String result)
>> - {
>> - return result.substring(1, result.length() - 1);
>> - }
>>
>> - /**
>> - * @see javax.servlet.Filter#destroy()
>> - */
>> - public void destroy()
>> - {
>> - if (webApplication != null)
>> + // create the redirect URI
>> + uri += "/";
>> + if (!Strings.isEmpty(request.getQueryString()))
>> {
>> - webApplication.internalDestroy();
>> - webApplication = null;
>> + uri += "?" + request.getQueryString();
>> }
>> +
>> + return uri;
>> }
>> }
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/CompressedResourceReference.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/CompressedResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/CompressedResourceReference.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/CompressedResourceReference.java
>> Sun Aug 1 07:01:19 2010
>> @@ -21,6 +21,7 @@ import java.util.Locale;
>> // TODO NG
>> public class CompressedResourceReference extends
>> PackageResourceReference
>> {
>> + private static final long serialVersionUID = 1L;
>>
>> public CompressedResourceReference(Class<?> scope, String name,
>> Locale locale, String style,
>> String variation)
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/DynamicImageResource.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/DynamicImageResource.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/DynamicImageResource.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/DynamicImageResource.java
>> Sun Aug 1 07:01:19 2010
>> @@ -28,6 +28,8 @@ import org.apache.wicket.util.time.Time;
>>
>> public abstract class DynamicImageResource extends AbstractResource
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> /** The image type */
>> private String format = "png";
>>
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/JavascriptResourceReference.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/JavascriptResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/JavascriptResourceReference.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/JavascriptResourceReference.java
>> Sun Aug 1 07:01:19 2010
>> @@ -25,6 +25,7 @@ import java.util.Locale;
>> */
>> public class JavascriptResourceReference extends
>> PackageResourceReference
>> {
>> + private static final long serialVersionUID = 1L;
>>
>> public JavascriptResourceReference(Class<?> scope, String name,
>> Locale locale, String style,
>> String variation)
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/PackageResourceReference.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/PackageResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/PackageResourceReference.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/PackageResourceReference.java
>> Sun Aug 1 07:01:19 2010
>> @@ -27,6 +27,7 @@ import org.apache.wicket.util.resource.l
>>
>> public class PackageResourceReference extends ResourceReference
>> {
>> + private static final long serialVersionUID = 1L;
>>
>> public PackageResourceReference(Class<?> scope, String name,
>> Locale
>> locale, String style,
>> String variation)
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/ResourceStreamResource.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/ResourceStreamResource.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/ResourceStreamResource.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/ResourceStreamResource.java
>> Sun Aug 1 07:01:19 2010
>> @@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
>>
>> public class ResourceStreamResource extends AbstractResource
>> {
>> + private static final long serialVersionUID = 1L;
>>
>> private final IResourceStream stream;
>> private String fileName;
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/SharedResourceReference.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/SharedResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/SharedResourceReference.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/
>> resource/SharedResourceReference.java
>> Sun Aug 1 07:01:19 2010
>> @@ -24,6 +24,7 @@ import org.apache.wicket.Application;
>>
>> public class SharedResourceReference extends ResourceReference
>> {
>> + private static final long serialVersionUID = 1L;
>>
>> public SharedResourceReference(Class<?> scope, String name,
>> Locale
>> locale, String style,
>> String variation)
>> @@ -53,6 +54,8 @@ public class SharedResourceReference ext
>> {
>> return new AbstractResource()
>> {
>> + private static final long
>> serialVersionUID
>> = 1L;
>> +
>> @Override
>> protected ResourceResponse
>> newResourceResponse(Attributes attributes)
>> {
>>
>> Modified:
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/
>> TextTemplateResourceReference.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/TextTemplateResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/
>> TextTemplateResourceReference.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/
>> TextTemplateResourceReference.java
>> Sun Aug 1 07:01:19 2010
>> @@ -30,7 +30,7 @@ import org.apache.wicket.util.template.T
>> /**
>> * A class which adapts a {@link PackagedTextTemplate} to a {@link
>> ResourceReference}.
>> *
>> - * @see {@link
>> https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html
>> }
>> + * @see {@link "
>> https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html
>> "}
>> *
>> * @author James Carman
>> */
>>
>> Modified:
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> ComponentConfigurationTest.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentConfigurationTest.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> ComponentConfigurationTest.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> ComponentConfigurationTest.java
>> Sun Aug 1 07:01:19 2010
>> @@ -87,6 +87,7 @@ public class ComponentConfigurationTest
>> add(t2 = new TestComponent("t2"));
>> add(link = new Link<Void>("link")
>> {
>> + private static final long
>> serialVersionUID
>> = 1L;
>>
>> @Override
>> public void onClick()
>> @@ -121,6 +122,8 @@ public class ComponentConfigurationTest
>>
>> private static class TestComponent extends WebMarkupContainer
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> private int requestCount = 0;
>> private int totalCount = 0;
>> private int beforeRenderCount = 0;
>>
>> Modified:
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> ComponentInitializationTest.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentInitializationTest.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> ComponentInitializationTest.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> ComponentInitializationTest.java
>> Sun Aug 1 07:01:19 2010
>> @@ -141,6 +141,8 @@ public class ComponentInitializationTest
>>
>> private static class TestComponent extends WebMarkupContainer
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> private int count = 0;
>>
>> public TestComponent(String id)
>>
>> Modified:
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/VisitorTest.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/VisitorTest.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> --- wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> VisitorTest.java
>> (original)
>> +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/
>> VisitorTest.java
>> Sun Aug 1 07:01:19 2010
>> @@ -134,6 +134,8 @@ public class VisitorTest extends WicketT
>>
>> private static class TestContainer extends WebMarkupContainer
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> public TestContainer()
>> {
>> super("A");
>>
>> Modified:
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> form/DisabledItemRetainingCheckBoxTest.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/DisabledItemRetainingCheckBoxTest.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> form/DisabledItemRetainingCheckBoxTest.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> form/DisabledItemRetainingCheckBoxTest.java
>> Sun Aug 1 07:01:19 2010
>> @@ -108,6 +108,8 @@ public class DisabledItemRetainingCheckB
>> form.add(new
>> CheckBoxMultipleChoice<Integer>("choices",
>> new PropertyModel<Collection<Integer>>
>> (this,
>> "selection"), Arrays.asList(0, 1, 2))
>> {
>> + private static final long
>> serialVersionUID
>> = 1L;
>> +
>> @Override
>> protected boolean isDisabled(Integer
>> object,
>> int index, String selected)
>> {
>> @@ -118,6 +120,8 @@ public class DisabledItemRetainingCheckB
>> form.add(new
>> CheckBoxMultipleChoice<Integer>("choices2",
>> new PropertyModel<Collection<Integer>>
>> (this,
>> "selection2"), Arrays.asList(0, 1, 2))
>> {
>> + private static final long
>> serialVersionUID
>> = 1L;
>> +
>> @Override
>> protected boolean isDisabled(Integer
>> object,
>> int index, String selected)
>> {
>>
>> Modified:
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> form/FormHasErrorPage.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/FormHasErrorPage.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> form/FormHasErrorPage.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> form/FormHasErrorPage.java
>> Sun Aug 1 07:01:19 2010
>> @@ -33,6 +33,8 @@ public class FormHasErrorPage extends We
>> {
>> public static final class InvalidPanel extends Panel
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> public InvalidPanel(String id)
>> {
>> super(id);
>> @@ -63,6 +65,8 @@ public class FormHasErrorPage extends We
>>
>> Form form = new Form("form")
>> {
>> + private static final long serialVersionUID
>> = 1L;
>> +
>> @Override
>> protected void onError()
>> {
>>
>> Modified:
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> page/SimplePanel.java
>> URL:
>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java?rev=981169&r1=981168&r2=981169&view=diff
>>
>> ===
>> ===
>> ===
>> =====================================================================
>> ---
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> page/SimplePanel.java
>> (original)
>> +++
>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/
>> page/SimplePanel.java
>> Sun Aug 1 07:01:19 2010
>> @@ -22,6 +22,8 @@ import org.apache.wicket.model.Model;
>>
>> public class SimplePanel extends Panel
>> {
>> + private static final long serialVersionUID = 1L;
>> +
>> public SimplePanel(String id)
>> {
>> super(id);
>>
>>
>>
Re: svn commit: r981169 - in /wicket/trunk: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/
wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/
wicket-extensions/src/main/ja
Posted by Juergen Donnerstag <ju...@gmail.com>.
saw that already
On Sun, Aug 1, 2010 at 9:57 PM, Martin Grigorov <mg...@apache.org> wrote:
> Now another test is failing:
> http://hudson.zones.apache.org/hudson/job/Apache%20Wicket%201.5.x/org.apache.wicket$wicket/197/testReport/junit/org.apache.wicket.protocol.http/WicketFilterTest/testCheckRedirect_1/
>
> On Sun, Aug 1, 2010 at 6:36 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> The regression is fixed.
>> Thanks
>>
>>
>> On Sun, Aug 1, 2010 at 6:24 PM, Juergen Donnerstag <
>> juergen.donnerstag@gmail.com> wrote:
>>
>>> fixed it and added a test case. Tested it against a quickstart. It
>>> should now be ok. Could you please check. Thanks
>>>
>>> Juergen
>>>
>>> On Sun, Aug 1, 2010 at 3:37 PM, Martin Grigorov <mg...@apache.org>
>>> wrote:
>>> > Still there is something wrong with WicketFilter.
>>> > I have a simple application with mapping to "/*" and issuing a request
>>> to
>>> > http://localhost:8080 doesn't map to HomeRequestMapper because
>>> > Request.getUrl().getSegments() returns a list with two elements: [, ] .
>>> It
>>> > should be empty list.
>>> >
>>> >
>>>
>>
>>
>
Re: svn commit: r981169 - in /wicket/trunk: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/
wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/
wicket-extensions/src/main/ja
Posted by Martin Grigorov <mg...@apache.org>.
Now another test is failing:
http://hudson.zones.apache.org/hudson/job/Apache%20Wicket%201.5.x/org.apache.wicket$wicket/197/testReport/junit/org.apache.wicket.protocol.http/WicketFilterTest/testCheckRedirect_1/
On Sun, Aug 1, 2010 at 6:36 PM, Martin Grigorov <mg...@apache.org>wrote:
> The regression is fixed.
> Thanks
>
>
> On Sun, Aug 1, 2010 at 6:24 PM, Juergen Donnerstag <
> juergen.donnerstag@gmail.com> wrote:
>
>> fixed it and added a test case. Tested it against a quickstart. It
>> should now be ok. Could you please check. Thanks
>>
>> Juergen
>>
>> On Sun, Aug 1, 2010 at 3:37 PM, Martin Grigorov <mg...@apache.org>
>> wrote:
>> > Still there is something wrong with WicketFilter.
>> > I have a simple application with mapping to "/*" and issuing a request
>> to
>> > http://localhost:8080 doesn't map to HomeRequestMapper because
>> > Request.getUrl().getSegments() returns a list with two elements: [, ] .
>> It
>> > should be empty list.
>> >
>> >
>>
>
>
Re: svn commit: r981169 - in /wicket/trunk: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/
wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/
wicket-extensions/src/main/ja
Posted by Martin Grigorov <mg...@apache.org>.
The regression is fixed.
Thanks
On Sun, Aug 1, 2010 at 6:24 PM, Juergen Donnerstag <
juergen.donnerstag@gmail.com> wrote:
> fixed it and added a test case. Tested it against a quickstart. It
> should now be ok. Could you please check. Thanks
>
> Juergen
>
> On Sun, Aug 1, 2010 at 3:37 PM, Martin Grigorov <mg...@apache.org>
> wrote:
> > Still there is something wrong with WicketFilter.
> > I have a simple application with mapping to "/*" and issuing a request to
> > http://localhost:8080 doesn't map to HomeRequestMapper because
> > Request.getUrl().getSegments() returns a list with two elements: [, ] .
> It
> > should be empty list.
> >
> >
>
Re: svn commit: r981169 - in /wicket/trunk: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/
wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/
wicket-extensions/src/main/ja
Posted by Juergen Donnerstag <ju...@gmail.com>.
fixed it and added a test case. Tested it against a quickstart. It
should now be ok. Could you please check. Thanks
Juergen
On Sun, Aug 1, 2010 at 3:37 PM, Martin Grigorov <mg...@apache.org> wrote:
> Still there is something wrong with WicketFilter.
> I have a simple application with mapping to "/*" and issuing a request to
> http://localhost:8080 doesn't map to HomeRequestMapper because
> Request.getUrl().getSegments() returns a list with two elements: [, ] . It
> should be empty list.
>
>
Re: svn commit: r981169 - in /wicket/trunk: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/
wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/
wicket-extensions/src/main/ja
Posted by Martin Grigorov <mg...@apache.org>.
Still there is something wrong with WicketFilter.
I have a simple application with mapping to "/*" and issuing a request to
http://localhost:8080 doesn't map to HomeRequestMapper because
Request.getUrl().getSegments() returns a list with two elements: [, ] . It
should be empty list.
On Sun, Aug 1, 2010 at 1:54 PM, Juergen <ju...@gmail.com>wrote:
> Ups. I'll fix them
>
> Von meinem iPod gesendet
>
> Am 01.08.2010 um 10:25 schrieb Martin Grigorov <mg...@apache.org>:
>
> Hi Juergen,
>>
>> Two tests are broken.
>> The signature
>> of
>> org.apache.wicket.protocol.http.WicketFilter.getFilterPath(HttpServletRequest)
>> is changed
>> and org.apache.wicket.protocol.http.WicketFilterTest.getFilterPath(String,
>> InputStream) doesn't work anymore.
>>
>> Looking
>> at
>> org.apache.wicket.protocol.http.WicketFilter.getFilterPath(HttpServletRequest)
>> I
>> see that the parameter is not even used.
>> I can fix it but I am not sure what were your intentions.
>>
>> On Sun, Aug 1, 2010 at 9:01 AM, <jd...@apache.org> wrote:
>>
>> Author: jdonnerstag
>>> Date: Sun Aug 1 07:01:19 2010
>>> New Revision: 981169
>>>
>>> URL: http://svn.apache.org/viewvc?rev=981169&view=rev
>>> Log:
>>> went through some of the Eclipse warnings
>>>
>>> Added:
>>>
>>>
>>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/WebXmlFile.java
>>> Modified:
>>>
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
>>>
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
>>>
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/validation/validator/RfcCompliantEmailAddressValidator.java
>>>
>>>
>>> wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>>
>>>
>>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/page/CouldNotLockPageException.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/CompressedResourceReference.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/DynamicImageResource.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/JavascriptResourceReference.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/PackageResourceReference.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/ResourceStreamResource.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/SharedResourceReference.java
>>>
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/TextTemplateResourceReference.java
>>>
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentConfigurationTest.java
>>>
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentInitializationTest.java
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/VisitorTest.java
>>>
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/DisabledItemRetainingCheckBoxTest.java
>>>
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/FormHasErrorPage.java
>>>
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -28,10 +28,10 @@ import org.apache.wicket.model.IModel;
>>> *
>>> * FIXME javadoc - constructors need proper descriptions
>>> *
>>> - * Note that you must add your own CSS to make the suggestion display
>>> properly,
>>> - * see {@link DefaultCssAutocompleteTextField} for an example.
>>> + * Note that you must add your own CSS to make the suggestion display
>>> properly, see
>>> + * {@link DefaultCssAutoCompleteTextField} for an example.
>>> *
>>> - * @see DefaultCssAutocompleteTextField
>>> + * @see DefaultCssAutoCompleteTextField
>>> * @see AutoCompleteBehavior
>>> * @see IAutoCompleteRenderer
>>> *
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -25,7 +25,6 @@ import org.apache.wicket.ajax.AjaxReques
>>> import org.apache.wicket.ajax.IAjaxCallDecorator;
>>> import org.apache.wicket.ajax.calldecorator.CancelEventIfNoAjaxDecorator;
>>> import org.apache.wicket.behavior.HeaderContributor;
>>> -import
>>>
>>> org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.PageCreator;
>>> import org.apache.wicket.markup.ComponentTag;
>>> import org.apache.wicket.markup.html.WebMarkupContainer;
>>> import org.apache.wicket.markup.html.panel.Panel;
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/validation/validator/RfcCompliantEmailAddressValidator.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/validation/validator/RfcCompliantEmailAddressValidator.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/validation/validator/RfcCompliantEmailAddressValidator.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/validation/validator/RfcCompliantEmailAddressValidator.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -32,9 +32,9 @@ import org.apache.wicket.validation.vali
>>> * <p>
>>> * Most users will be satisfied with the {@link EmailAddressValidator}
>>> *
>>> - * @see <a href="http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
>>> ">Perl
>>> Regex implementation *
>>> - * of RFC 822< /a>
>>> - * @see <a href="http://www.ietf.org/rfc/rfc0822.txt?number=822">RFC
>>> 822<
>>> /a>
>>> + * @see <a href="http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
>>> ">Perl
>>> Regex implementation
>>> + * of RFC 822</a>
>>> + * @see <a href="http://www.ietf.org/rfc/rfc0822.txt?number=822">RFC
>>> 822</a>
>>> * @author Frank Bille
>>> */
>>> public class RfcCompliantEmailAddressValidator extends PatternValidator
>>> @@ -140,6 +140,7 @@ public class RfcCompliantEmailAddressVal
>>> super(emailPattern);
>>> }
>>>
>>> + @Override
>>> protected void onValidate(IValidatable validatable)
>>> {
>>> String email = validatable.getValue().toString();
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -18,8 +18,6 @@ package org.apache.wicket.jmx;
>>>
>>> import java.io.IOException;
>>>
>>> -import org.apache.wicket.protocol.http.WebApplication;
>>> -
>>>
>>> /**
>>> * Exposes Application related functionality for JMX.
>>> @@ -30,8 +28,6 @@ public class Application implements Appl
>>> {
>>> private final org.apache.wicket.Application application;
>>>
>>> - private final WebApplication webApplication;
>>> -
>>> /**
>>> * Create.
>>> *
>>> @@ -40,16 +36,6 @@ public class Application implements Appl
>>> public Application(org.apache.wicket.Application application)
>>> {
>>> this.application = application;
>>> -
>>> - // do this so that we don't have to cast all the time
>>> - if (application instanceof WebApplication)
>>> - {
>>> - webApplication = (WebApplication)application;
>>> - }
>>> - else
>>> - {
>>> - webApplication = null;
>>> - }
>>> }
>>>
>>> /**
>>>
>>> Added:
>>>
>>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/WebXmlFile.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/WebXmlFile.java?rev=981169&view=auto
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/WebXmlFile.java
>>> (added)
>>> +++
>>>
>>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/file/WebXmlFile.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -0,0 +1,221 @@
>>> +/*
>>> + * 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.util.file;
>>> +
>>> +import java.io.IOException;
>>> +import java.io.InputStream;
>>> +
>>> +import javax.servlet.FilterConfig;
>>> +import javax.servlet.ServletContext;
>>> +import javax.xml.parsers.DocumentBuilder;
>>> +import javax.xml.parsers.DocumentBuilderFactory;
>>> +import javax.xml.parsers.ParserConfigurationException;
>>> +
>>> +import org.slf4j.Logger;
>>> +import org.slf4j.LoggerFactory;
>>> +import org.w3c.dom.Document;
>>> +import org.w3c.dom.Node;
>>> +import org.w3c.dom.NodeList;
>>> +import org.xml.sax.SAXException;
>>> +
>>> +/**
>>> + * A utility class providing helper methods in dealing with web.xml
>>> + *
>>> + * @author jcompagner
>>> + * @author Juergen Donnerstag
>>> + */
>>> +public class WebXmlFile
>>> +{
>>> + private static final Logger log =
>>> LoggerFactory.getLogger(WebXmlFile.class);
>>> +
>>> + /**
>>> + * Construct.
>>> + */
>>> + public WebXmlFile()
>>> + {
>>> + }
>>> +
>>> + /**
>>> + * Gets Wicket filter path via FilterConfig
>>> + *
>>> + * @param filterConfig
>>> + * @return Filter path retrieved from "url-pattern". Null if not
>>> found or error occured
>>> + */
>>> + public final String getFilterPath(final FilterConfig
>>> filterConfig)
>>> + {
>>> + return getFilterPath(filterConfig.getServletContext(),
>>> filterConfig.getFilterName());
>>> + }
>>> +
>>> + /**
>>> + * Gets Wicket filter path via ServletContext and the filter name
>>> + *
>>> + * @param servletContext
>>> + * @param filterName
>>> + * @return Filter path retrieved from "url-pattern". Null if not
>>> found or error occured
>>> + */
>>> + public final String getFilterPath(final ServletContext
>>> servletContext, final String filterName)
>>> + {
>>> + InputStream is =
>>> servletContext.getResourceAsStream("/WEB-INF/web.xml");
>>> + if (is != null)
>>> + {
>>> + try
>>> + {
>>> + return getFilterPath(filterName, is);
>>> + }
>>> + catch (ParserConfigurationException ex)
>>> + {
>>> + log.error("Error reading servlet/filter
>>> path from web.xml", ex);
>>> + }
>>> + catch (SAXException ex)
>>> + {
>>> + log.error("Error reading servlet/filter
>>> path from web.xml", ex);
>>> + }
>>> + catch (IOException ex)
>>> + {
>>> + log.error("Error reading servlet/filter
>>> path from web.xml", ex);
>>> + }
>>> + catch (SecurityException e)
>>> + {
>>> + // Swallow this at INFO.
>>> + log.info("Couldn't read web.xml to
>>> automatically pick up servlet/filter path: " +
>>> + e.getMessage());
>>> + }
>>> + }
>>> + return null;
>>> + }
>>> +
>>> + /**
>>> + * Gets Wicket filter path via filter name and InputStream. The
>>> InputStream is assumed to be an
>>> + * web.xml file.
>>> + * <p>
>>> + * A typical Wicket web.xml entry looks like:
>>> + *
>>> + * <pre>
>>> + * <code>
>>> + * <filter>
>>> + * <filter-name>HelloWorldApplication</filter-name>
>>> + *
>>>
>>> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
>>> + * <init-param>
>>> + * <param-name>applicationClassName</param-name>
>>> + *
>>>
>>> <param-value>org.apache.wicket.examples.helloworld.HelloWorldApplication</param-value>
>>> + * </init-param>
>>> + * </filter>
>>> + *
>>> + * <filter-mapping>
>>> + * <filter-name>HelloWorldApplication</filter-name>
>>> + * <url-pattern>/helloworld/*</url-pattern>
>>> + * <dispatcher>REQUEST</dispatcher>
>>> + * <dispatcher>INCLUDE</dispatcher>
>>> + * </filter-mapping>
>>> + * </code>
>>> + * </pre>
>>> + *
>>> + * @param filterName
>>> + * @param is
>>> + * The web.xml file
>>> + * @return Filter path retrieved from "url-pattern". Null if not
>>> found.
>>> + * @throws ParserConfigurationException
>>> + * @throws IOException
>>> + * @throws SAXException
>>> + */
>>> + public final String getFilterPath(final String filterName, final
>>> InputStream is)
>>> + throws ParserConfigurationException, SAXException,
>>> IOException
>>> + {
>>> + DocumentBuilderFactory factory =
>>> DocumentBuilderFactory.newInstance();
>>> + DocumentBuilder builder = factory.newDocumentBuilder();
>>> + Document document = builder.parse(is);
>>> +
>>> + String mapping = "filter-mapping";
>>> + String name = "filter-name";
>>> +
>>> + String urlPattern = getFilterPath(filterName, mapping,
>>> name, document.getChildNodes());
>>> +
>>> + // remove leading "/" and trailing "*"
>>> + return urlPattern.substring(1, urlPattern.length() - 1);
>>> + }
>>> +
>>> + /**
>>> + * Iterate through all children of 'node' and search for a node
>>> with name "filterName". Return
>>> + * the value of node "url-pattern" if "filterName" was found.
>>> + *
>>> + * @param filterName
>>> + * @param name
>>> + * @param node
>>> + * @return value of node "url-pattern"
>>> + */
>>> + private String getFilterPath(final String filterName, final
>>> String
>>> name, final Node node)
>>> + {
>>> + String foundUrlPattern = null;
>>> + String foundFilterName = null;
>>> +
>>> + for (int i = 0; i < node.getChildNodes().getLength();
>>> ++i)
>>> + {
>>> + Node n = node.getChildNodes().item(i);
>>> + if (name.equals(n.getNodeName()))
>>> + {
>>> + foundFilterName = n.getTextContent();
>>> + }
>>> + else if ("url-pattern".equals(n.getNodeName()))
>>> + {
>>> + foundUrlPattern = n.getTextContent();
>>> + }
>>> + }
>>> +
>>> + if (foundFilterName != null)
>>> + {
>>> + foundFilterName = foundFilterName.trim();
>>> + }
>>> +
>>> + if (filterName.equals(foundFilterName))
>>> + {
>>> + return (foundUrlPattern != null) ?
>>> foundUrlPattern.trim() : null;
>>> + }
>>> + else
>>> + {
>>> + return null;
>>> + }
>>> + }
>>> +
>>> + /**
>>> + * Find a node with name 'mapping' within 'nodeList' and if found
>>> continue to search amongst its
>>> + * children for a node with 'filterName' and "url-pattern'
>>> + *
>>> + * @param filterName
>>> + * @param mapping
>>> + * @param name
>>> + * @param nodeList
>>> + * @return The value assigned to node "url-pattern"
>>> + */
>>> + private String getFilterPath(final String filterName, final
>>> String
>>> mapping, final String name,
>>> + final NodeList nodeList)
>>> + {
>>> + String path = null;
>>> + for (int i = 0; (i < nodeList.getLength()) && (path ==
>>> null); ++i)
>>> + {
>>> + Node node = nodeList.item(i);
>>> + if (mapping.equals(node.getNodeName()))
>>> + {
>>> + path = getFilterPath(filterName, name,
>>> node);
>>> + }
>>> + else
>>> + {
>>> + path = getFilterPath(filterName, mapping,
>>> name, node.getChildNodes());
>>> + }
>>> + }
>>> + return path;
>>> + }
>>> +}
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -16,11 +16,9 @@
>>> */
>>> package org.apache.wicket.util.io;
>>>
>>> -import java.io.File;
>>> import java.io.IOException;
>>> import java.net.HttpURLConnection;
>>> import java.net.JarURLConnection;
>>> -import java.net.URI;
>>> import java.net.URL;
>>> import java.net.URLConnection;
>>>
>>> @@ -33,7 +31,6 @@ public class Connections
>>> {
>>> private Connections()
>>> {
>>> -
>>> }
>>>
>>> /**
>>> @@ -45,7 +42,6 @@ public class Connections
>>> */
>>> public static long getLastModified(URL url) throws IOException
>>> {
>>> -
>>> URLConnection connection = url.openConnection();
>>>
>>> try
>>> @@ -68,7 +64,6 @@ public class Connections
>>> {
>>> return connection.getLastModified();
>>> }
>>> -
>>> }
>>> finally
>>> {
>>> @@ -115,5 +110,4 @@ public class Connections
>>> connection.getInputStream().close();
>>> }
>>> }
>>> -
>>> }
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -36,6 +36,7 @@ import org.apache.wicket.util.string.Str
>>>
>>> public class RestartResponseAtInterceptPageException extends
>>> ResetResponseException
>>> {
>>> + private static final long serialVersionUID = 1L;
>>>
>>> public RestartResponseAtInterceptPageException(Page interceptPage)
>>> {
>>> @@ -59,6 +60,8 @@ public class RestartResponseAtInterceptP
>>> */
>>> public static class InterceptData implements Serializable
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> private Url originalUrl;
>>> private Map<String, List<StringValue>> postParameters;
>>> private boolean continueOk;
>>>
>>> Modified:
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java
>>> (original)
>>> +++
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java
>>> Sun
>>> Aug 1 07:01:19 2010
>>> @@ -33,6 +33,8 @@ public class SharedResources
>>>
>>> private static final class SharedResourceReference extends
>>> ResourceReference
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> private final IResource resource;
>>>
>>> public SharedResourceReference(Class<?> scope, String name,
>>> Locale locale, String style,
>>> @@ -116,5 +118,5 @@ public class SharedResources
>>> String variation, boolean strict)
>>> {
>>> return registry.getResourceReference(scope, name, locale,
>>> style, variation, strict);
>>> -}
>>> + }
>>> }
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -33,7 +33,6 @@ import org.apache.wicket.Component;
>>> import org.apache.wicket.MarkupContainer;
>>> import org.apache.wicket.Page;
>>> import org.apache.wicket.WicketRuntimeException;
>>> -import org.apache.wicket.ajax.AjaxRequestTarget.IListener;
>>> import org.apache.wicket.behavior.IBehavior;
>>> import org.apache.wicket.markup.html.IHeaderResponse;
>>> import org.apache.wicket.markup.html.internal.HeaderResponse;
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -100,7 +100,6 @@ public class CheckGroup<T> extends FormC
>>> /**
>>> * @see FormComponent#convertValue(String[])
>>> */
>>> - @SuppressWarnings("unchecked")
>>> @Override
>>> protected Collection<T> convertValue(String[] values) throws
>>> ConversionException
>>> {
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -92,7 +92,6 @@ public class RadioGroup<T> extends FormC
>>> /**
>>> * @see
>>> org.apache.wicket.markup.html.form.FormComponent#convertValue(String[])
>>> */
>>> - @SuppressWarnings("unchecked")
>>> @Override
>>> protected T convertValue(String[] input) throws ConversionException
>>> {
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/page/CouldNotLockPageException.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/page/CouldNotLockPageException.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/page/CouldNotLockPageException.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/page/CouldNotLockPageException.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -20,6 +20,8 @@ import org.apache.wicket.util.time.Durat
>>>
>>> public class CouldNotLockPageException extends RuntimeException
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> private final int page;
>>> private final Duration timeout;
>>> private final String threadName;
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -17,7 +17,6 @@
>>> package org.apache.wicket.protocol.http;
>>>
>>> import java.io.IOException;
>>> -import java.io.InputStream;
>>>
>>> import javax.servlet.Filter;
>>> import javax.servlet.FilterChain;
>>> @@ -27,21 +26,18 @@ import javax.servlet.ServletRequest;
>>> import javax.servlet.ServletResponse;
>>> import javax.servlet.http.HttpServletRequest;
>>> import javax.servlet.http.HttpServletResponse;
>>> -import javax.xml.parsers.DocumentBuilder;
>>> -import javax.xml.parsers.DocumentBuilderFactory;
>>>
>>> import org.apache.wicket.ThreadContext;
>>> import org.apache.wicket.WicketRuntimeException;
>>> import org.apache.wicket.protocol.http.servlet.ServletWebRequest;
>>> import org.apache.wicket.protocol.http.servlet.ServletWebResponse;
>>> import org.apache.wicket.request.cycle.RequestCycle;
>>> +import org.apache.wicket.request.http.WebRequest;
>>> import org.apache.wicket.request.http.WebResponse;
>>> +import org.apache.wicket.util.file.WebXmlFile;
>>> import org.apache.wicket.util.string.Strings;
>>> import org.slf4j.Logger;
>>> import org.slf4j.LoggerFactory;
>>> -import org.w3c.dom.Document;
>>> -import org.w3c.dom.Node;
>>> -import org.w3c.dom.NodeList;
>>>
>>> /**
>>> * Filter for initiating handling of Wicket requests.
>>> @@ -75,13 +71,15 @@ public class WicketFilter implements Fil
>>>
>>> static final String SERVLET_PATH_HOLDER = "<servlet>";
>>>
>>> - private WebApplication webApplication;
>>> + // Wicket's Application object
>>> + private WebApplication application;
>>>
>>> private FilterConfig filterConfig;
>>>
>>> private String filterPath;
>>>
>>> - private final boolean servletMode = false;
>>> + // filterPath length without trailing "/"
>>> + private int filterPathLength = -1;
>>>
>>> /**
>>> * @return The class loader
>>> @@ -92,55 +90,19 @@ public class WicketFilter implements Fil
>>> }
>>>
>>> /**
>>> - * Checks if the request is for home page and lacks trailing
>>> slash.
>>> If necessary redirects to
>>> - * URL with trailing slash.
>>> + * This is Wicket's main method to execute a request
>>> *
>>> * @param request
>>> * @param response
>>> - * @param filterPath
>>> - * @return <code>true</code> if there is a trailing slash,
>>> <code>false</code> if redirect was
>>> - * necessary.
>>> + * @param chain
>>> + * @return false, if the request could not be processed
>>> + * @throws IOException
>>> + * @throws ServletException
>>> */
>>> - private boolean checkForTrailingSlash(HttpServletRequest request,
>>> HttpServletResponse response,
>>> - String filterPath)
>>> - {
>>> - // current URI
>>> - String uri =
>>> Strings.stripJSessionId(request.getRequestURI());
>>> -
>>> - // home page without trailing slash URI
>>> - String homePageUri = request.getContextPath() + "/" +
>>> filterPath;
>>> - if (homePageUri.endsWith("/"))
>>> - {
>>> - homePageUri = homePageUri.substring(0,
>>> homePageUri.length() - 1);
>>> - }
>>> -
>>> - if (uri.equals(homePageUri))
>>> - {
>>> - // construct redirect URL
>>> - String redirect = uri + "/";
>>> - if (!Strings.isEmpty(request.getQueryString()))
>>> - {
>>> - redirect += "?" +
>>> request.getQueryString();
>>> - }
>>> - try
>>> - {
>>> - // send redirect - this will discard POST
>>> parameters if the request is POST
>>> - // - still better than getting an error
>>> because of lacking trailing slash
>>> -
>>> response.sendRedirect(response.encodeRedirectURL(redirect));
>>> - }
>>> - catch (IOException e)
>>> - {
>>> - throw new RuntimeException(e);
>>> - }
>>> - return false;
>>> - }
>>> -
>>> - return true;
>>> - }
>>> -
>>> - boolean processRequest(ServletRequest request, ServletResponse
>>> response, FilterChain chain)
>>> - throws IOException, ServletException
>>> + boolean processRequest(final ServletRequest request, final
>>> ServletResponse response,
>>> + final FilterChain chain) throws IOException,
>>> ServletException
>>> {
>>> + // Assume we are able to handle the request
>>> boolean res = true;
>>>
>>> final ClassLoader previousClassLoader =
>>> Thread.currentThread().getContextClassLoader();
>>> @@ -158,17 +120,17 @@ public class WicketFilter implements Fil
>>>
>>> String filterPath =
>>> getFilterPath(httpServletRequest);
>>>
>>> - webApplication.set();
>>> -
>>> - if (checkForTrailingSlash(httpServletRequest,
>>> httpServletResponse, filterPath))
>>> + String redirectURL =
>>> checkIfRedirectRequired(httpServletRequest);
>>> + if (redirectURL == null)
>>> {
>>> - ServletWebRequest req = new
>>> ServletWebRequest(httpServletRequest, filterPath);
>>> + // No redirect; process the request
>>> + application.set();
>>>
>>> - WebResponse resp = new
>>> HeaderBufferingWebResponse(new ServletWebResponse(
>>> + WebRequest webRequest = new
>>> ServletWebRequest(httpServletRequest, filterPath);
>>> + WebResponse webResponse = new
>>> HeaderBufferingWebResponse(new ServletWebResponse(
>>> httpServletRequest,
>>> httpServletResponse));
>>>
>>> - RequestCycle requestCycle =
>>> webApplication.createRequestCycle(req, resp);
>>> -
>>> + RequestCycle requestCycle =
>>> application.createRequestCycle(webRequest, webResponse);
>>> if (!requestCycle.processRequestAndDetach())
>>> {
>>> if (chain != null)
>>> @@ -179,7 +141,20 @@ public class WicketFilter implements Fil
>>> }
>>> else
>>> {
>>> - resp.flush();
>>> + webResponse.flush();
>>> + }
>>> + }
>>> + else
>>> + {
>>> + try
>>> + {
>>> + // send redirect - this will
>>> discard POST parameters if the request is POST
>>> + // - still better than getting an
>>> error because of lacking trailing slash
>>> +
>>>
>>> httpServletResponse.sendRedirect(httpServletResponse.encodeRedirectURL(redirectURL));
>>> + }
>>> + catch (IOException e)
>>> + {
>>> + throw new RuntimeException(e);
>>> }
>>> }
>>> }
>>> @@ -201,8 +176,8 @@ public class WicketFilter implements Fil
>>> * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
>>> * javax.servlet.ServletResponse, javax.servlet.FilterChain)
>>> */
>>> - public void doFilter(ServletRequest request, ServletResponse
>>> response, FilterChain chain)
>>> - throws IOException, ServletException
>>> + public void doFilter(final ServletRequest request, final
>>> ServletResponse response,
>>> + final FilterChain chain) throws IOException,
>>> ServletException
>>> {
>>> processRequest(request, response, chain);
>>> }
>>> @@ -268,20 +243,27 @@ public class WicketFilter implements Fil
>>> /**
>>> * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
>>> */
>>> - public void init(FilterConfig filterConfig) throws
>>> ServletException
>>> + public void init(final FilterConfig filterConfig) throws
>>> ServletException
>>> {
>>> this.filterConfig = filterConfig;
>>> - IWebApplicationFactory factory = getApplicationFactory();
>>> - webApplication = factory.createApplication(this);
>>> - webApplication.setName(filterConfig.getFilterName());
>>> - webApplication.setWicketFilter(this);
>>>
>>> - initFilterPath();
>>> + IWebApplicationFactory factory = getApplicationFactory();
>>> + application = factory.createApplication(this);
>>> + application.setName(filterConfig.getFilterName());
>>> + application.setWicketFilter(this);
>>> +
>>> + filterPath = new
>>> WebXmlFile().getFilterPath(filterConfig);
>>> + if (filterPath == null)
>>> + {
>>> + log.info("Unable to parse filter mapping web.xml
>>> for " + filterConfig.getFilterName() +
>>> + ". " + "Configure with init-param " +
>>> FILTER_MAPPING_PARAM +
>>> + " if it is not \"/*\".");
>>> + }
>>>
>>> final ClassLoader previousClassLoader =
>>> Thread.currentThread().getContextClassLoader();
>>> final ClassLoader newClassLoader = getClassLoader();
>>>
>>> - webApplication.set();
>>> + application.set();
>>> try
>>> {
>>> if (previousClassLoader != newClassLoader)
>>> @@ -289,10 +271,10 @@ public class WicketFilter implements Fil
>>>
>>> Thread.currentThread().setContextClassLoader(newClassLoader);
>>> }
>>>
>>> - webApplication.initApplication();
>>> + application.initApplication();
>>>
>>> // Give the application the option to log that it is
>>> started
>>> - webApplication.logStarted();
>>> + application.logStarted();
>>> }
>>> finally
>>> {
>>> @@ -314,190 +296,102 @@ public class WicketFilter implements Fil
>>> }
>>>
>>> /**
>>> + * Either get the filterPath retrieved from web.xml, or if not
>>> found the old (1.3) way via a
>>> + * filter mapping param.
>>> *
>>> + * @param request
>>> + * @return filterPath
>>> */
>>> - private void initFilterPath()
>>> + protected String getFilterPath(final HttpServletRequest request)
>>> {
>>> - InputStream is =
>>> filterConfig.getServletContext().getResourceAsStream("/WEB-INF/web.xml");
>>> - if (is != null)
>>> + if (filterPath != null)
>>> {
>>> - try
>>> - {
>>> - filterPath =
>>> getFilterPath(filterConfig.getFilterName(), is);
>>> - }
>>> - catch (ServletException e)
>>> - {
>>> - log.error("Error reading servlet/filter
>>> path from web.xml", e);
>>> - }
>>> - catch (SecurityException e)
>>> - {
>>> - // Swallow this at INFO.
>>> - log.info("Couldn't read web.xml to
>>> automatically pick up servlet/filter path: " +
>>> - e.getMessage());
>>> - }
>>> - if (filterPath == null)
>>> - {
>>> - log.info("Unable to parse filter mapping
>>> web.xml for " +
>>> - filterConfig.getFilterName() + ".
>>> "
>>> + "Configure with init-param " +
>>> - FILTER_MAPPING_PARAM + " if it is
>>> not \"/*\".");
>>> - }
>>> + return filterPath;
>>> }
>>> - };
>>>
>>> - /**
>>> - *
>>> - * @param filterName
>>> - * @param name
>>> - * @param node
>>> - * @return
>>> - */
>>> - private String getFilterPath(String filterName, String name, Node
>>> node)
>>> - {
>>> - String foundUrlPattern = null;
>>> - String foundFilterName = null;
>>> -
>>> - for (int i = 0; i < node.getChildNodes().getLength();
>>> ++i)
>>> - {
>>> - Node n = node.getChildNodes().item(i);
>>> - if (name.equals(n.getNodeName()))
>>> - {
>>> - foundFilterName = n.getTextContent();
>>> - }
>>> - else if ("url-pattern".equals(n.getNodeName()))
>>> - {
>>> - foundUrlPattern = n.getTextContent();
>>> - }
>>> - }
>>> + // Legacy migration check.
>>> + // TODO: Remove this after 1.3 is released and everyone's
>>> upgraded.
>>>
>>> - if (foundFilterName != null)
>>> + String result =
>>> filterConfig.getInitParameter(FILTER_MAPPING_PARAM);
>>> + if (result == null || result.equals("/*"))
>>> {
>>> - foundFilterName = foundFilterName.trim();
>>> + filterPath = "";
>>> }
>>> -
>>> -
>>> - if (filterName.equals(foundFilterName))
>>> + else if (!result.startsWith("/") ||
>>> !result.endsWith("/*"))
>>> {
>>> - return (foundUrlPattern != null) ?
>>> foundUrlPattern.trim() : null;
>>> + throw new WicketRuntimeException("Your " +
>>> FILTER_MAPPING_PARAM +
>>> + " must start with \"/\" and end with
>>> \"/*\". It is: " + result);
>>> }
>>> else
>>> {
>>> - return null;
>>> + // remove leading "/" and trailing "*"
>>> + filterPath = result.substring(1, result.length()
>>> -
>>> 1);
>>> }
>>> + return filterPath;
>>> }
>>>
>>> /**
>>> - *
>>> - * @param filterName
>>> - * @param mapping
>>> - * @param name
>>> - * @param nodeList
>>> - * @return
>>> + * @see javax.servlet.Filter#destroy()
>>> */
>>> - private String getFilterPath(String filterName, String mapping,
>>> String name, NodeList nodeList)
>>> + public void destroy()
>>> {
>>> - for (int i = 0; i < nodeList.getLength(); ++i)
>>> + if (application != null)
>>> {
>>> - Node node = nodeList.item(i);
>>> - if (mapping.equals(node.getNodeName()))
>>> - {
>>> - String path = getFilterPath(filterName,
>>> name, node);
>>> - if (path != null)
>>> - {
>>> - return path;
>>> - }
>>> - }
>>> - else
>>> - {
>>> - String path = getFilterPath(filterName,
>>> mapping, name, node.getChildNodes());
>>> - if (path != null)
>>> - {
>>> - return path;
>>> - }
>>> - }
>>> + application.internalDestroy();
>>> + application = null;
>>> }
>>> - return null;
>>> }
>>>
>>> /**
>>> + * Try to determine as fast as possible if a redirect is
>>> necessary
>>> *
>>> - * @param filterName
>>> - * @param is
>>> - * @return
>>> - * @throws ServletException
>>> + * @param request
>>> + * @return null, if no redirect is necessary. Else the redirect
>>> URL
>>> */
>>> - private String getFilterPath(String filterName, InputStream is)
>>> throws ServletException
>>> + private String checkIfRedirectRequired(final HttpServletRequest
>>> request)
>>> {
>>> - DocumentBuilderFactory factory =
>>> DocumentBuilderFactory.newInstance();
>>> - try
>>> - {
>>> - DocumentBuilder builder =
>>> factory.newDocumentBuilder();
>>> - Document document = builder.parse(is);
>>> + String requestURI = request.getRequestURI();
>>> + String contextPath = request.getContextPath();
>>>
>>> - String prefix = servletMode ? "servlet" :
>>> "filter";
>>> - String mapping = prefix + "-mapping";
>>> - String name = prefix + "-name";
>>> -
>>> - String urlPattern = getFilterPath(filterName,
>>> mapping, name, document.getChildNodes());
>>> - return stripWildcard(urlPattern);
>>> - }
>>> - catch (Exception e)
>>> + // length without jesessionid (http://
>>> .../abc;jsessionid=...?param)
>>> + int uriLength = requestURI.indexOf(';');
>>> + if (uriLength == -1)
>>> {
>>> - throw new ServletException(e);
>>> + uriLength = requestURI.length();
>>> }
>>> - }
>>>
>>> - /**
>>> - *
>>> - * @param request
>>> - * @return
>>> - */
>>> - protected String getFilterPath(HttpServletRequest request)
>>> - {
>>> - if (filterPath != null)
>>> + if (filterPathLength == -1)
>>> {
>>> - return filterPath;
>>> - }
>>> - if (servletMode)
>>> - {
>>> - return filterPath = request.getServletPath();
>>> + filterPathLength = filterPath.length();
>>> + if (filterPath.endsWith("/"))
>>> + {
>>> + filterPathLength -= 1;
>>> + }
>>> }
>>> - String result;
>>> - // Legacy migration check.
>>> - // TODO: Remove this after 1.3 is released and everyone's
>>> upgraded.
>>>
>>> - result =
>>> filterConfig.getInitParameter(FILTER_MAPPING_PARAM);
>>> - if (result == null || result.equals("/*"))
>>> + // uri != request.getContextPath() + "/" + filterPath
>>> (without "/" at the end)
>>> + if (uriLength != (contextPath.length() + 1 +
>>> filterPathLength))
>>> {
>>> - return "";
>>> + return null;
>>> }
>>> - else if (!result.startsWith("/") ||
>>> !result.endsWith("/*"))
>>> +
>>> + // current URI without jsessionid
>>> + String uri = requestURI.substring(0, uriLength);
>>> +
>>> + // home page without trailing slash URI
>>> + String homePageUri = contextPath + "/" +
>>> filterPath.substring(0, filterPathLength);
>>> + if (uri.equals(homePageUri) == false)
>>> {
>>> - throw new WicketRuntimeException("Your " +
>>> FILTER_MAPPING_PARAM +
>>> - " must start with \"/\" and end with
>>> \"/*\". It is: " + result);
>>> + return null;
>>> }
>>> - return filterPath = stripWildcard(result);
>>> - }
>>> -
>>> - /**
>>> - * Strip trailing '*' and keep leading '/'
>>> - *
>>> - * @param result
>>> - * @return The stripped String
>>> - */
>>> - private String stripWildcard(String result)
>>> - {
>>> - return result.substring(1, result.length() - 1);
>>> - }
>>>
>>> - /**
>>> - * @see javax.servlet.Filter#destroy()
>>> - */
>>> - public void destroy()
>>> - {
>>> - if (webApplication != null)
>>> + // create the redirect URI
>>> + uri += "/";
>>> + if (!Strings.isEmpty(request.getQueryString()))
>>> {
>>> - webApplication.internalDestroy();
>>> - webApplication = null;
>>> + uri += "?" + request.getQueryString();
>>> }
>>> +
>>> + return uri;
>>> }
>>> }
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/CompressedResourceReference.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/CompressedResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/CompressedResourceReference.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/CompressedResourceReference.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -21,6 +21,7 @@ import java.util.Locale;
>>> // TODO NG
>>> public class CompressedResourceReference extends PackageResourceReference
>>> {
>>> + private static final long serialVersionUID = 1L;
>>>
>>> public CompressedResourceReference(Class<?> scope, String name,
>>> Locale locale, String style,
>>> String variation)
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/DynamicImageResource.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/DynamicImageResource.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/DynamicImageResource.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/DynamicImageResource.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -28,6 +28,8 @@ import org.apache.wicket.util.time.Time;
>>>
>>> public abstract class DynamicImageResource extends AbstractResource
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> /** The image type */
>>> private String format = "png";
>>>
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/JavascriptResourceReference.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/JavascriptResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/JavascriptResourceReference.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/JavascriptResourceReference.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -25,6 +25,7 @@ import java.util.Locale;
>>> */
>>> public class JavascriptResourceReference extends PackageResourceReference
>>> {
>>> + private static final long serialVersionUID = 1L;
>>>
>>> public JavascriptResourceReference(Class<?> scope, String name,
>>> Locale locale, String style,
>>> String variation)
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/PackageResourceReference.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/PackageResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/PackageResourceReference.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/PackageResourceReference.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -27,6 +27,7 @@ import org.apache.wicket.util.resource.l
>>>
>>> public class PackageResourceReference extends ResourceReference
>>> {
>>> + private static final long serialVersionUID = 1L;
>>>
>>> public PackageResourceReference(Class<?> scope, String name, Locale
>>> locale, String style,
>>> String variation)
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/ResourceStreamResource.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/ResourceStreamResource.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/ResourceStreamResource.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/ResourceStreamResource.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
>>>
>>> public class ResourceStreamResource extends AbstractResource
>>> {
>>> + private static final long serialVersionUID = 1L;
>>>
>>> private final IResourceStream stream;
>>> private String fileName;
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/SharedResourceReference.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/SharedResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/SharedResourceReference.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/request/resource/SharedResourceReference.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -24,6 +24,7 @@ import org.apache.wicket.Application;
>>>
>>> public class SharedResourceReference extends ResourceReference
>>> {
>>> + private static final long serialVersionUID = 1L;
>>>
>>> public SharedResourceReference(Class<?> scope, String name, Locale
>>> locale, String style,
>>> String variation)
>>> @@ -53,6 +54,8 @@ public class SharedResourceReference ext
>>> {
>>> return new AbstractResource()
>>> {
>>> + private static final long
>>> serialVersionUID
>>> = 1L;
>>> +
>>> @Override
>>> protected ResourceResponse
>>> newResourceResponse(Attributes attributes)
>>> {
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/TextTemplateResourceReference.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/TextTemplateResourceReference.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/TextTemplateResourceReference.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/TextTemplateResourceReference.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -30,7 +30,7 @@ import org.apache.wicket.util.template.T
>>> /**
>>> * A class which adapts a {@link PackagedTextTemplate} to a {@link
>>> ResourceReference}.
>>> *
>>> - * @see {@link
>>>
>>> https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html
>>> }
>>> + * @see {@link "
>>>
>>> https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html
>>> "}
>>> *
>>> * @author James Carman
>>> */
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentConfigurationTest.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentConfigurationTest.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentConfigurationTest.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentConfigurationTest.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -87,6 +87,7 @@ public class ComponentConfigurationTest
>>> add(t2 = new TestComponent("t2"));
>>> add(link = new Link<Void>("link")
>>> {
>>> + private static final long
>>> serialVersionUID
>>> = 1L;
>>>
>>> @Override
>>> public void onClick()
>>> @@ -121,6 +122,8 @@ public class ComponentConfigurationTest
>>>
>>> private static class TestComponent extends WebMarkupContainer
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> private int requestCount = 0;
>>> private int totalCount = 0;
>>> private int beforeRenderCount = 0;
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentInitializationTest.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentInitializationTest.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentInitializationTest.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/ComponentInitializationTest.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -141,6 +141,8 @@ public class ComponentInitializationTest
>>>
>>> private static class TestComponent extends WebMarkupContainer
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> private int count = 0;
>>>
>>> public TestComponent(String id)
>>>
>>> Modified:
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/VisitorTest.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/VisitorTest.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> --- wicket/trunk/wicket/src/test/java/org/apache/wicket/VisitorTest.java
>>> (original)
>>> +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/VisitorTest.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -134,6 +134,8 @@ public class VisitorTest extends WicketT
>>>
>>> private static class TestContainer extends WebMarkupContainer
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> public TestContainer()
>>> {
>>> super("A");
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/DisabledItemRetainingCheckBoxTest.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/DisabledItemRetainingCheckBoxTest.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/DisabledItemRetainingCheckBoxTest.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/DisabledItemRetainingCheckBoxTest.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -108,6 +108,8 @@ public class DisabledItemRetainingCheckB
>>> form.add(new
>>> CheckBoxMultipleChoice<Integer>("choices",
>>> new PropertyModel<Collection<Integer>>(this,
>>> "selection"), Arrays.asList(0, 1, 2))
>>> {
>>> + private static final long
>>> serialVersionUID
>>> = 1L;
>>> +
>>> @Override
>>> protected boolean isDisabled(Integer object,
>>> int index, String selected)
>>> {
>>> @@ -118,6 +120,8 @@ public class DisabledItemRetainingCheckB
>>> form.add(new
>>> CheckBoxMultipleChoice<Integer>("choices2",
>>> new PropertyModel<Collection<Integer>>(this,
>>> "selection2"), Arrays.asList(0, 1, 2))
>>> {
>>> + private static final long
>>> serialVersionUID
>>> = 1L;
>>> +
>>> @Override
>>> protected boolean isDisabled(Integer object,
>>> int index, String selected)
>>> {
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/FormHasErrorPage.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/FormHasErrorPage.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/FormHasErrorPage.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/FormHasErrorPage.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -33,6 +33,8 @@ public class FormHasErrorPage extends We
>>> {
>>> public static final class InvalidPanel extends Panel
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> public InvalidPanel(String id)
>>> {
>>> super(id);
>>> @@ -63,6 +65,8 @@ public class FormHasErrorPage extends We
>>>
>>> Form form = new Form("form")
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> @Override
>>> protected void onError()
>>> {
>>>
>>> Modified:
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java?rev=981169&r1=981168&r2=981169&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java
>>> (original)
>>> +++
>>>
>>> wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java
>>> Sun Aug 1 07:01:19 2010
>>> @@ -22,6 +22,8 @@ import org.apache.wicket.model.Model;
>>>
>>> public class SimplePanel extends Panel
>>> {
>>> + private static final long serialVersionUID = 1L;
>>> +
>>> public SimplePanel(String id)
>>> {
>>> super(id);
>>>
>>>
>>>
>>>