You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2010/10/16 12:16:08 UTC
svn commit: r1023231 - in /wicket/trunk:
wicket-util/src/main/java/org/apache/wicket/util/license/
wicket/src/main/java/org/apache/wicket/
wicket/src/main/java/org/apache/wicket/markup/html/link/
wicket/src/main/java/org/apache/wicket/markup/html/pages...
Author: jdonnerstag
Date: Sat Oct 16 10:16:07 2010
New Revision: 1023231
URL: http://svn.apache.org/viewvc?rev=1023231&view=rev
Log:
WICKET-3008 fixed: clarify purpose of getMarkupSettings().setThrowExceptionOnMissingXmlDeclaration(true)
re-enabled ApacheLicenseHeaderTest and fixed the identified issues
Added:
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlPrologHeaderHandler.java
Modified:
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlLicenseHeaderHandler.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ComponentEvent.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupCloseLink$ClosePopupPage.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/AccessDeniedPage.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/InternalErrorPage.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/PageExpiredErrorPage.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/RedirectPage.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/mock/MockHomePage.html
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/SwitchProtocolRequestHandler.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/mapper/ResourceMapper.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/BehaviorUrlTest.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/request/mapper/ResourceMapperTest.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageAjaxSubmitLinkSubmitsWholeForm.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/versioning/InMemoryPageStore.java
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java Sat Oct 16 10:16:07 2010
@@ -27,6 +27,8 @@ import java.util.Map.Entry;
import junit.framework.TestCase;
import org.apache.wicket.util.string.Strings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Testcase used in the different wicket projects for testing for the correct ASL license headers.
@@ -36,6 +38,9 @@ import org.apache.wicket.util.string.Str
*/
public abstract class ApacheLicenseHeaderTestCase extends TestCase
{
+ /** Log. */
+ private static final Logger log = LoggerFactory.getLogger(ApacheLicenseHeaderTestCase.class);
+
private static final String LINE_ENDING = System.getProperty("line.separator");
static interface FileVisitor
@@ -79,8 +84,16 @@ public abstract class ApacheLicenseHeade
accept = true;
break;
}
+ else
+ {
+ log.info("File ignored: " + pathname.toString());
+ }
}
}
+ else
+ {
+ log.info("File ignored: " + pathname.toString());
+ }
}
return accept;
@@ -114,9 +127,8 @@ public abstract class ApacheLicenseHeade
break;
}
}
-
// Absolute file
- if (ignoreFile.isFile())
+ else if (ignoreFile.isFile())
{
if (relativePathname.equals(ignorePath))
{
@@ -124,6 +136,11 @@ public abstract class ApacheLicenseHeade
break;
}
}
+ else if (pathname.getName().equals(ignorePath))
+ {
+ ignore = true;
+ break;
+ }
}
}
@@ -174,6 +191,7 @@ public abstract class ApacheLicenseHeade
protected String[] javaIgnore;
protected String[] htmlIgnore;
+ protected String[] xmlPrologIgnore;
protected String[] propertiesIgnore;
protected String[] xmlIgnore;
protected String[] cssIgnore;
@@ -215,15 +233,15 @@ public abstract class ApacheLicenseHeade
new JavaScriptLicenseHeaderHandler(javaScriptIgnore),
new XmlLicenseHeaderHandler(xmlIgnore),
new PropertiesLicenseHeaderHandler(propertiesIgnore),
- new CssLicenseHeaderHandler(cssIgnore), new HtmlLicenseHeaderHandler(htmlIgnore),
- new VelocityLicenseHeaderHandler(velocityIgnore) };
+ new HtmlLicenseHeaderHandler(htmlIgnore),
+ new VelocityLicenseHeaderHandler(velocityIgnore),
+ new XmlPrologHeaderHandler(xmlPrologIgnore),
+ new CssLicenseHeaderHandler(cssIgnore), };
final Map<ILicenseHeaderHandler, List<File>> badFiles = new HashMap<ILicenseHeaderHandler, List<File>>();
- for (int i = 0; i < licenseHeaderHandlers.length; i++)
+ for (final ILicenseHeaderHandler licenseHeaderHandler : licenseHeaderHandlers)
{
- final ILicenseHeaderHandler licenseHeaderHandler = licenseHeaderHandlers[i];
-
visitFiles(licenseHeaderHandler.getSuffixes(), licenseHeaderHandler.getIgnoreFiles(),
new FileVisitor()
{
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlLicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlLicenseHeaderHandler.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlLicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlLicenseHeaderHandler.java Sat Oct 16 10:16:07 2010
@@ -127,6 +127,4 @@ class XmlLicenseHeaderHandler extends Ab
return added;
}
-
-
}
Added: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlPrologHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlPrologHeaderHandler.java?rev=1023231&view=auto
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlPrologHeaderHandler.java (added)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlPrologHeaderHandler.java Sat Oct 16 10:16:07 2010
@@ -0,0 +1,63 @@
+/*
+ * 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.license;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.wicket.util.diff.Revision;
+
+class XmlPrologHeaderHandler extends XmlLicenseHeaderHandler
+{
+ /**
+ * Construct.
+ *
+ * @param ignoreFiles
+ */
+ public XmlPrologHeaderHandler(String[] ignoreFiles)
+ {
+ super(ignoreFiles);
+ }
+
+ @Override
+ public String[] getSuffixes()
+ {
+ return new String[] { "html" };
+ }
+
+ /**
+ * @see org.apache.wicket.util.license.XmlLicenseHeaderHandler#checkLicenseHeader(java.io.File)
+ */
+ @Override
+ public boolean checkLicenseHeader(final File file)
+ {
+ Revision revision = null;
+
+ try
+ {
+ String header = extractLicenseHeader(file, 0, 1);
+ return header.startsWith("<?xml") == true;
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ Assert.fail(e.getMessage());
+ }
+ return true;
+ }
+}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ComponentEvent.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ComponentEvent.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ComponentEvent.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ComponentEvent.java Sat Oct 16 10:16:07 2010
@@ -1,3 +1,19 @@
+/*
+ * 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;
import org.apache.wicket.event.Broadcast;
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.html Sat Oct 16 10:16:07 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/ClientSideImageMap.java Sat Oct 16 10:16:07 2010
@@ -37,7 +37,6 @@ import org.apache.wicket.model.PropertyM
*/
public class ClientSideImageMap extends Panel
{
-
private static final long serialVersionUID = 1L;
private static final String CIRCLE = "circle";
private static final String POLYGON = "polygon";
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupCloseLink$ClosePopupPage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupCloseLink%24ClosePopupPage.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupCloseLink$ClosePopupPage.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupCloseLink$ClosePopupPage.html Sat Oct 16 10:16:07 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/AccessDeniedPage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/AccessDeniedPage.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/AccessDeniedPage.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/AccessDeniedPage.html Sat Oct 16 10:16:07 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.html Sat Oct 16 10:16:07 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.html Sat Oct 16 10:16:07 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/InternalErrorPage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/InternalErrorPage.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/InternalErrorPage.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/InternalErrorPage.html Sat Oct 16 10:16:07 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/PageExpiredErrorPage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/PageExpiredErrorPage.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/PageExpiredErrorPage.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/PageExpiredErrorPage.html Sat Oct 16 10:16:07 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/RedirectPage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/RedirectPage.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/RedirectPage.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/pages/RedirectPage.html Sat Oct 16 10:16:07 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/mock/MockHomePage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/mock/MockHomePage.html?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/mock/MockHomePage.html (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/mock/MockHomePage.html Sat Oct 16 10:16:07 2010
@@ -1,4 +1,21 @@
-<html>
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<html xmlns:wicket>
<head>
</head>
<body>
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/SwitchProtocolRequestHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/SwitchProtocolRequestHandler.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/SwitchProtocolRequestHandler.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/SwitchProtocolRequestHandler.java Sat Oct 16 10:16:07 2010
@@ -1,3 +1,19 @@
+/*
+ * 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.protocol.https;
import javax.servlet.http.HttpServletRequest;
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/mapper/ResourceMapper.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/mapper/ResourceMapper.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/request/mapper/ResourceMapper.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/request/mapper/ResourceMapper.java Sat Oct 16 10:16:07 2010
@@ -1,3 +1,19 @@
+/*
+ * 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.request.mapper;
import java.util.ArrayList;
@@ -20,21 +36,22 @@ import org.apache.wicket.util.lang.Args;
* <li>maps indexed parameters to path segments</li>
* <li>maps named parameters to query string arguments</li>
* </ul>
- *
+ *
* <h4>sample structure of url</h4>
- *
+ *
* <pre>
* /articles/images/[indexed-param-0]/[indexed-param-1]?[named-param-1=value]&[named-param-2=value2]
* </pre>
- *
+ *
* <h4>sample usage</h4>
- *
+ *
* in your wicket application's init() method use a statement like this
* <p/>
+ *
* <pre>
- * getRootRequestMapperAsCompound().add(new ResourceMapper("/images", new ImagesResourceReference()));
+ * getRootRequestMapperAsCompound().add(new ResourceMapper("/images", new ImagesResourceReference()));
* </pre>
- *
+ *
* @author Peter Ertl
*/
public class ResourceMapper extends AbstractMapper implements IRequestMapper
@@ -47,16 +64,18 @@ public class ResourceMapper extends Abst
/**
* create a resource mapper for a resource
- *
- * @param path mount path for the resource
- * @param resourceReference resource reference that should be linked to the mount path
+ *
+ * @param path
+ * mount path for the resource
+ * @param resourceReference
+ * resource reference that should be linked to the mount path
*/
public ResourceMapper(String path, ResourceReference resourceReference)
{
Args.notEmpty(path, "path");
Args.notNull(resourceReference, "resourceReference");
this.resourceReference = resourceReference;
- this.mountSegments = getMountSegments(path);
+ mountSegments = getMountSegments(path);
}
/**
@@ -129,10 +148,12 @@ public class ResourceMapper extends Abst
// append named parameters as query strings
List<PageParameters.NamedPair> namedParameters = parameters.getAllNamed();
- List<Url.QueryParameter> queryParams = new ArrayList<Url.QueryParameter>(namedParameters.size());
+ List<Url.QueryParameter> queryParams = new ArrayList<Url.QueryParameter>(
+ namedParameters.size());
for (PageParameters.NamedPair namedParameter : namedParameters)
- queryParams.add(new Url.QueryParameter(namedParameter.getKey(), namedParameter.getValue()));
+ queryParams.add(new Url.QueryParameter(namedParameter.getKey(),
+ namedParameter.getValue()));
// create and return url
return new Url(path, queryParams);
Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/BehaviorUrlTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/BehaviorUrlTest.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/BehaviorUrlTest.java (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/BehaviorUrlTest.java Sat Oct 16 10:16:07 2010
@@ -1,3 +1,19 @@
+/*
+ * 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;
import junit.framework.TestCase;
Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/request/mapper/ResourceMapperTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/request/mapper/ResourceMapperTest.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/request/mapper/ResourceMapperTest.java (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/request/mapper/ResourceMapperTest.java Sat Oct 16 10:16:07 2010
@@ -1,3 +1,19 @@
+/*
+ * 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.request.mapper;
import java.nio.charset.Charset;
Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 10:16:07 2010
@@ -16,8 +16,6 @@
*/
package org.apache.wicket.util.license;
-import org.junit.Ignore;
-
/**
* Test that the license headers are in place in this project. The tests are run from
@@ -25,8 +23,6 @@ import org.junit.Ignore;
*
* @author Frank Bille Jensen (frankbille)
*/
-@Ignore
-// FIXME REENABLE!!!!!
public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
{
/**
@@ -47,6 +43,23 @@ public class ApacheLicenceHeaderTest ext
*/
"src/main/java/org/apache/wicket/util/diff", };
+ xmlPrologIgnore = new String[] {
+ /*
+ * .html in test is very test specific and a license header would confuse and make it
+ * unclear what the test is about.
+ */
+ "src/test/java",
+
+ /*
+ * Ignore package.html
+ */
+ "package.html",
+
+ /*
+ * See NOTICE.txt
+ */
+ "src/main/java/org/apache/wicket/util/diff", };
+
cssIgnore = new String[] {
/*
* .css in test is very test specific and a license header would confuse and make it unclear
Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageAjaxSubmitLinkSubmitsWholeForm.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageAjaxSubmitLinkSubmitsWholeForm.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageAjaxSubmitLinkSubmitsWholeForm.java (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageAjaxSubmitLinkSubmitsWholeForm.java Sat Oct 16 10:16:07 2010
@@ -1,3 +1,19 @@
+/*
+ * 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.tester;
import org.apache.wicket.ajax.AjaxRequestTarget;
Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/versioning/InMemoryPageStore.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/versioning/InMemoryPageStore.java?rev=1023231&r1=1023230&r2=1023231&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/versioning/InMemoryPageStore.java (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/versioning/InMemoryPageStore.java Sat Oct 16 10:16:07 2010
@@ -1,3 +1,19 @@
+/*
+ * 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.versioning;
import java.util.HashMap;