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 20:59:44 UTC
svn commit: r1023354 - in /wicket/trunk:
testing/wicket-threadtest/src/test/java/org/apache/wicket/util/license/
wicket-auth-roles/src/test/java/org/apache/wicket/util/license/
wicket-datetime/src/test/java/org/apache/wicket/util/license/
wicket-devuti...
Author: jdonnerstag
Date: Sat Oct 16 18:59:43 2010
New Revision: 1023354
URL: http://svn.apache.org/viewvc?rev=1023354&view=rev
Log:
copied ApacheLicenseCheck to projects where missing and changed it slightly (extensible defaults). Fixed issues where newly applied check failed.
Added:
wicket/trunk/wicket-ioc/src/test/java/org/apache/wicket/util/
wicket/trunk/wicket-ioc/src/test/java/org/apache/wicket/util/license/
wicket/trunk/wicket-ioc/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-request/src/test/java/org/apache/wicket/util/
wicket/trunk/wicket-request/src/test/java/org/apache/wicket/util/license/
wicket/trunk/wicket-request/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/license/
wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
Modified:
wicket/trunk/testing/wicket-threadtest/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-devutils/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-extensions/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-jmx/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-request/pom.xml
wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/IRequestCycle.java
wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/flow/RedirectToUrlException.java
wicket/trunk/wicket-request/src/test/java/org/apache/wicket/request/http/handler/RedirectRequestHandlerTest.java
wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket-util/pom.xml
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/lang/Exceptions.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/AbstractLicenseHeaderHandler.java
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/CssLicenseHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/HtmlLicenseHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ILicenseHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaLicenseHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaScriptLicenseHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/PropertiesLicenseHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/VelocityLicenseHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlLicenseHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlPrologHeaderHandler.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/ClassVisitFilter.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisit.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitFilter.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitor.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visit.java
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visits.java
wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/string/StringsTest.java
wicket/trunk/wicket-velocity/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
Modified: wicket/trunk/testing/wicket-threadtest/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/testing/wicket-threadtest/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/testing/wicket-threadtest/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/testing/wicket-threadtest/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -16,32 +16,22 @@
*/
package org.apache.wicket.util.license;
+
/**
- * Test that the license headers are in place in this project. The tests are run
- * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
- * tests here if needed.
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
*
* @author Frank Bille Jensen (frankbille)
*/
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase {
-
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
/**
* Construct.
*/
- public ApacheLicenceHeaderTest() {
+ public ApacheLicenceHeaderTest()
+ {
// addHeaders = true;
- xmlIgnore = new String[] { ".settings" };
-
- 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", "src/main/webapp",
- /*
- * Ignore package.html
- */
- "package.html", };
+ xmlPrologIgnore.add("src/main/webapp/index.html");
}
}
Modified: wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -17,41 +17,18 @@
package org.apache.wicket.util.license;
/**
- * Test that the license headers are in place in this project. The tests are run
- * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
- * tests here if needed.
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
*
* @author Frank Bille Jensen (frankbille)
*/
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase {
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
/**
* Construct.
*/
- public ApacheLicenceHeaderTest() {
+ public ApacheLicenceHeaderTest()
+ {
// addHeaders = true;
-
- /*
- * License header in test files lower the visibility of the test.
- */
- htmlIgnore = new String[] { "src/test/java" };
-
- /*
- * Low level configuration files for logging. No license needed.
- */
- propertiesIgnore = new String[] { "src/test/java" };
-
- xmlIgnore = new String[] { ".settings" };
-
- 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", };
}
}
Modified: wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -17,65 +17,44 @@
package org.apache.wicket.util.license;
/**
- * Test that the license headers are in place in this project. The tests are run
- * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
- * tests here if needed.
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
*
* @author Frank Bille Jensen (frankbille)
*/
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase {
-
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
/**
* Construct.
*/
- public ApacheLicenceHeaderTest() {
+ public ApacheLicenceHeaderTest()
+ {
// addHeaders = true;
- htmlIgnore = 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",
+
/*
* See NOTICE.txt
*/
- "src/main/java/org/apache/wicket/util/diff" };
+ htmlIgnore.add("src/main/java/org/apache/wicket/util/diff");
/*
* YUI lib. See NOTICE
*/
- cssIgnore = new String[] {
- "src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css",
- "src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css" };
+ cssIgnore.add("src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css");
+ cssIgnore.add("src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css");
/*
* YUI lib. See NOTICE
*/
- javaScriptIgnore = new String[] {
- "src/main/java/org/apache/wicket/extensions/yui/yuiloader.js",
- "src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js",
- "src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo.js",
- "src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo-min.js",
- "src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js",
- "src/main/java/org/apache/wicket/extensions/yui/event/event.js",
- "src/main/java/org/apache/wicket/extensions/yui/event/event-min.js",
- "src/main/java/org/apache/wicket/extensions/yui/dom/dom.js",
- "src/main/java/org/apache/wicket/extensions/yui/dom/dom-min.js",
- "src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js",
- "src/main/java/org/apache/wicket/extensions/yui/calendar/calendar-min.js" };
-
- xmlIgnore = new String[] { ".settings" };
-
- 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", };
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yuiloader.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo-min.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/event/event.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/event/event-min.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/dom/dom.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/dom/dom-min.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/calendar/calendar-min.js");
}
}
Modified: wicket/trunk/wicket-devutils/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-devutils/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-devutils/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-devutils/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -31,19 +31,5 @@ public class ApacheLicenceHeaderTest ext
public ApacheLicenceHeaderTest()
{
// addHeaders = true;
-
- xmlIgnore = new String[] { ".settings", "EclipseCodeFormat.xml" };
-
- 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", };
}
}
Modified: wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -16,79 +16,63 @@
*/
package org.apache.wicket.util.license;
+import java.util.Arrays;
+
/**
- * Test that the license headers are in place in this project. The tests are run
- * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
- * tests here if needed.
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
*
* @author Frank Bille Jensen (frankbille)
*/
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase {
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
/**
* Construct.
*/
- public ApacheLicenceHeaderTest() {
+ public ApacheLicenceHeaderTest()
+ {
// addHeaders = true;
- htmlIgnore = new String[] {
/*
- * This is an example project. Therefore we'd rather not have license
- * headers in html files, because it removes the focus away from what
- * the example is about.
+ * This is an example project. Therefore we'd rather not have license headers in html files,
+ * because it removes the focus away from what the example is about.
*/
- "src" };
+ htmlIgnore = Arrays.asList("src");
/* same, same */
- velocityIgnore = new String[] { "src" };
+ velocityIgnore = Arrays.asList("src");
- javaScriptIgnore = new String[] {
/*
* Prototype, released under MIT. See NOTICE
*/
- "src/main/webapp/prototype.js",
+ javaScriptIgnore.add("src/main/webapp/prototype.js");
/*
* Script.aculo.us, released under MIT. See NOTICE
*/
- "src/main/webapp/effects.js", "src/main/webapp/scriptaculous.js",
+ javaScriptIgnore.add("src/main/webapp/effects.js");
+ javaScriptIgnore.add("src/main/webapp/scriptaculous.js");
/*
* Behaviour, released under BSD. See NOTICE
*/
- "src/main/java/org/apache/wicket/examples/preview/behaviour.js",
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/examples/preview/behaviour.js");
/*
* DOJO is dual licensed. We use the BSD license. See NOTICE.
*/
- "src/main/java/org/apache/wicket/examples/preview/dojo.js" };
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/examples/preview/dojo.js");
- xmlIgnore = new String[] {
/*
* Part of an example
*/
- "src/main/java/org/apache/wicket/examples/compref/XmlPage.xml",
- ".settings" };
+ xmlIgnore.add("src/main/java/org/apache/wicket/examples/compref/XmlPage.xml");
+ xmlIgnore.add(".settings");
- propertiesIgnore = new String[] {
/*
* Configuration files with no "intelligent" content
*/
- "src/main/java/commons-logging.properties",
- "src/main/java/log4j.properties" };
-
- 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",
+ propertiesIgnore.add("src/main/java/commons-logging.properties");
+ propertiesIgnore.add("src/main/java/log4j.properties");
- /**
- * Not really needed for the examples
- */
- "src/main/java", "src/main/webapp", "src/main/resources",
-
- /*
- * Ignore package.html
- */
- "package.html", };
+ xmlPrologIgnore = Arrays.asList("src");
}
}
Modified: wicket/trunk/wicket-extensions/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-extensions/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-extensions/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -17,37 +17,18 @@
package org.apache.wicket.util.license;
/**
- * Test that the license headers are in place in this project. The tests are run
- * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
- * tests here if needed.
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
*
* @author Frank Bille Jensen (frankbille)
*/
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase {
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
/**
* Construct.
*/
- public ApacheLicenceHeaderTest() {
+ public ApacheLicenceHeaderTest()
+ {
// addHeaders = true;
- xmlIgnore = new String[] { ".settings" };
-
- htmlIgnore = 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" };
-
- 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", };
}
}
Modified: wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -31,6 +31,5 @@ public class ApacheLicenceHeaderTest ext
public ApacheLicenceHeaderTest()
{
// addHeaders = true;
- xmlIgnore = new String[] { ".settings" };
}
}
Added: wicket/trunk/wicket-ioc/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-ioc/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&view=auto
==============================================================================
--- wicket/trunk/wicket-ioc/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (added)
+++ wicket/trunk/wicket-ioc/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -0,0 +1,34 @@
+/*
+ * 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;
+
+/**
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
+ *
+ * @author Frank Bille Jensen (frankbille)
+ */
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
+ /**
+ * Construct.
+ */
+ public ApacheLicenceHeaderTest()
+ {
+ // addHeaders = true;
+ }
+}
Modified: wicket/trunk/wicket-jmx/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-jmx/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-jmx/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-jmx/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -17,30 +17,18 @@
package org.apache.wicket.util.license;
/**
- * Test that the license headers are in place in this project. The tests are run
- * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
- * tests here if needed.
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
*
* @author Frank Bille Jensen (frankbille)
*/
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase {
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
/**
* Construct.
*/
- public ApacheLicenceHeaderTest() {
+ public ApacheLicenceHeaderTest()
+ {
// addHeaders = true;
- xmlIgnore = new String[] { ".settings" };
-
- 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", };
}
}
Modified: wicket/trunk/wicket-request/pom.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-request/pom.xml?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-request/pom.xml (original)
+++ wicket/trunk/wicket-request/pom.xml Sat Oct 16 18:59:43 2010
@@ -1,4 +1,20 @@
<?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.
+-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
Modified: wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/IRequestCycle.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/IRequestCycle.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/IRequestCycle.java (original)
+++ wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/IRequestCycle.java Sat Oct 16 18:59:43 2010
@@ -1,6 +1,24 @@
+/*
+ * 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;
-
+/**
+ * @todo javadoc
+ */
public interface IRequestCycle
{
Response getResponse();
@@ -10,5 +28,4 @@ public interface IRequestCycle
void scheduleRequestHandlerAfterCurrent(IRequestHandler handler);
UrlRenderer getUrlRenderer();
-
}
Modified: wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/flow/RedirectToUrlException.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/flow/RedirectToUrlException.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/flow/RedirectToUrlException.java (original)
+++ wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/flow/RedirectToUrlException.java Sat Oct 16 18:59:43 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.flow;
import javax.servlet.http.HttpServletResponse;
Modified: wicket/trunk/wicket-request/src/test/java/org/apache/wicket/request/http/handler/RedirectRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-request/src/test/java/org/apache/wicket/request/http/handler/RedirectRequestHandlerTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-request/src/test/java/org/apache/wicket/request/http/handler/RedirectRequestHandlerTest.java (original)
+++ wicket/trunk/wicket-request/src/test/java/org/apache/wicket/request/http/handler/RedirectRequestHandlerTest.java Sat Oct 16 18:59:43 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.http.handler;
import javax.servlet.http.HttpServletResponse;
Added: wicket/trunk/wicket-request/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-request/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&view=auto
==============================================================================
--- wicket/trunk/wicket-request/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (added)
+++ wicket/trunk/wicket-request/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -0,0 +1,34 @@
+/*
+ * 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;
+
+/**
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
+ *
+ * @author Frank Bille Jensen (frankbille)
+ */
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
+ /**
+ * Construct.
+ */
+ public ApacheLicenceHeaderTest()
+ {
+ // addHeaders = true;
+ }
+}
Modified: wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -17,30 +17,18 @@
package org.apache.wicket.util.license;
/**
- * Test that the license headers are in place in this project. The tests are run
- * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
- * tests here if needed.
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
*
* @author Frank Bille Jensen (frankbille)
*/
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase {
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
/**
* Construct.
*/
- public ApacheLicenceHeaderTest() {
+ public ApacheLicenceHeaderTest()
+ {
// addHeaders = true;
- xmlIgnore = new String[] { ".settings" };
-
- 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", };
}
}
Modified: wicket/trunk/wicket-util/pom.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/pom.xml?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/pom.xml (original)
+++ wicket/trunk/wicket-util/pom.xml Sat Oct 16 18:59:43 2010
@@ -1,4 +1,20 @@
<?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.
+-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/lang/Exceptions.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/lang/Exceptions.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/lang/Exceptions.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/lang/Exceptions.java Sat Oct 16 18:59:43 2010
@@ -1,12 +1,38 @@
+/*
+ * 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.lang;
+/**
+ *
+ * @author igor.vaynberg
+ */
public class Exceptions
{
private Exceptions()
{
-
}
+ /**
+ *
+ * @param <T>
+ * @param throwable
+ * @param causeType
+ * @return
+ */
public static <T extends Throwable> T findCause(Throwable throwable, final Class<T> causeType)
{
return visit(throwable, new IThrowableVisitor<T>()
@@ -54,11 +80,22 @@ public class Exceptions
}
}
+ /**
+ *
+ * @param <T>
+ */
public static interface IThrowableVisitor<T>
{
void visit(Throwable throwable, Visit<T> visit);
}
+ /**
+ *
+ * @param <T>
+ * @param throwable
+ * @param visitor
+ * @return
+ */
public static <T> T visit(Throwable throwable, IThrowableVisitor<T> visitor)
{
Visit<T> visit = new Visit<T>();
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/AbstractLicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/AbstractLicenseHeaderHandler.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/AbstractLicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/AbstractLicenseHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
+import java.util.List;
import junit.framework.Assert;
@@ -32,19 +33,19 @@ abstract class AbstractLicenseHeaderHand
{
protected static final String LINE_ENDING = System.getProperty("line.separator");
private String licenseHeader;
- private final String[] ignoreFiles;
+ private final List<String> ignoreFiles;
/**
* Construct.
*
* @param ignoreFiles
*/
- public AbstractLicenseHeaderHandler(String[] ignoreFiles)
+ public AbstractLicenseHeaderHandler(List<String> ignoreFiles)
{
this.ignoreFiles = ignoreFiles;
}
- public String[] getIgnoreFiles()
+ public List<String> getIgnoreFiles()
{
return ignoreFiles;
}
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=1023354&r1=1023353&r2=1023354&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 18:59:43 2010
@@ -26,6 +26,7 @@ import java.util.Map.Entry;
import junit.framework.TestCase;
+import org.apache.wicket.util.lang.Generics;
import org.apache.wicket.util.string.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -53,15 +54,15 @@ public abstract class ApacheLicenseHeade
private class SuffixAndIgnoreFileFilter implements FileFilter
{
- private final String[] suffixes;
- private final String[] ignoreFiles;
+ private final List<String> suffixes;
+ private final List<String> ignoreFiles;
- private SuffixAndIgnoreFileFilter(String[] suffixes)
+ private SuffixAndIgnoreFileFilter(List<String> suffixes)
{
this(suffixes, null);
}
- private SuffixAndIgnoreFileFilter(String[] suffixes, String[] ignoreFiles)
+ private SuffixAndIgnoreFileFilter(List<String> suffixes, List<String> ignoreFiles)
{
this.suffixes = suffixes;
this.ignoreFiles = ignoreFiles;
@@ -75,9 +76,9 @@ public abstract class ApacheLicenseHeade
{
if (ignoreFile(pathname) == false)
{
- for (int i = 0; i < suffixes.length; i++)
+ for (int i = 0; i < suffixes.size(); i++)
{
- String suffix = suffixes[i];
+ String suffix = suffixes.get(i);
if (pathname.getName().endsWith("." + suffix))
{
@@ -110,9 +111,9 @@ public abstract class ApacheLicenseHeade
baseDirectory.getAbsolutePath() + System.getProperty("file.separator"), "")
.toString();
- for (int i = 0; i < ignoreFiles.length; i++)
+ for (int i = 0; i < ignoreFiles.size(); i++)
{
- String ignorePath = ignoreFiles[i];
+ String ignorePath = ignoreFiles.get(i);
// Will convert '/'s to '\\'s on Windows
ignorePath = Strings.replaceAll(ignorePath, "/",
System.getProperty("file.separator")).toString();
@@ -189,14 +190,14 @@ public abstract class ApacheLicenseHeade
private File baseDirectory = new File("").getAbsoluteFile();
- protected String[] javaIgnore;
- protected String[] htmlIgnore;
- protected String[] xmlPrologIgnore;
- protected String[] propertiesIgnore;
- protected String[] xmlIgnore;
- protected String[] cssIgnore;
- protected String[] velocityIgnore;
- protected String[] javaScriptIgnore;
+ protected List<String> javaIgnore = Generics.newArrayList();
+ protected List<String> htmlIgnore = Generics.newArrayList();
+ protected List<String> xmlPrologIgnore = Generics.newArrayList();
+ protected List<String> propertiesIgnore = Generics.newArrayList();
+ protected List<String> xmlIgnore = Generics.newArrayList();
+ protected List<String> cssIgnore = Generics.newArrayList();
+ protected List<String> velocityIgnore = Generics.newArrayList();
+ protected List<String> javaScriptIgnore = Generics.newArrayList();
protected boolean addHeaders = false;
/**
@@ -205,6 +206,35 @@ public abstract class ApacheLicenseHeade
public ApacheLicenseHeaderTestCase()
{
super("Test of the legal aspects of the Wicket source code is correct.");
+
+ // -------------------------------
+ // Configure defaults
+ // -------------------------------
+
+ // addHeaders = true;
+ xmlIgnore.add(".settings");
+ xmlIgnore.add("EclipseCodeFormat.xml");
+
+ /*
+ * License header in test files lower the visibility of the test.
+ */
+ htmlIgnore.add("src/test/java");
+
+ /*
+ * Low level configuration files for logging. No license needed.
+ */
+ propertiesIgnore.add("src/test/java");
+
+ /*
+ * .html in test is very test specific and a license header would confuse and make it
+ * unclear what the test is about.
+ */
+ xmlPrologIgnore.add("src/test/java");
+
+ /*
+ * Ignore package.html
+ */
+ xmlPrologIgnore.add("package.html");
}
/**
@@ -312,12 +342,12 @@ public abstract class ApacheLicenseHeade
}
}
- private void visitFiles(String[] suffixes, String[] ignoreFiles, FileVisitor fileVisitor)
+ private void visitFiles(List<String> suffixes, List<String> ignoreFiles, FileVisitor fileVisitor)
{
visitDirectory(suffixes, ignoreFiles, baseDirectory, fileVisitor);
}
- private void visitDirectory(String[] suffixes, String[] ignoreFiles, File directory,
+ private void visitDirectory(List<String> suffixes, List<String> ignoreFiles, File directory,
FileVisitor fileVisitor)
{
File[] files = directory.listFiles(new SuffixAndIgnoreFileFilter(suffixes, ignoreFiles));
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/CssLicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/CssLicenseHeaderHandler.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/CssLicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/CssLicenseHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -17,6 +17,8 @@
package org.apache.wicket.util.license;
import java.io.File;
+import java.util.Arrays;
+import java.util.List;
import junit.framework.Assert;
@@ -25,13 +27,12 @@ import org.apache.wicket.util.diff.Revis
class CssLicenseHeaderHandler extends AbstractLicenseHeaderHandler
{
-
/**
* Construct.
*
* @param ignoreFiles
*/
- public CssLicenseHeaderHandler(String[] ignoreFiles)
+ public CssLicenseHeaderHandler(List<String> ignoreFiles)
{
super(ignoreFiles);
}
@@ -60,9 +61,9 @@ class CssLicenseHeaderHandler extends Ab
return revision.size() == 0;
}
- public String[] getSuffixes()
+ public List<String> getSuffixes()
{
- return new String[] { "css" };
+ return Arrays.asList("css");
}
@Override
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/HtmlLicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/HtmlLicenseHeaderHandler.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/HtmlLicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/HtmlLicenseHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -16,6 +16,9 @@
*/
package org.apache.wicket.util.license;
+import java.util.Arrays;
+import java.util.List;
+
class HtmlLicenseHeaderHandler extends XmlLicenseHeaderHandler
{
/**
@@ -23,14 +26,14 @@ class HtmlLicenseHeaderHandler extends X
*
* @param ignoreFiles
*/
- public HtmlLicenseHeaderHandler(String[] ignoreFiles)
+ public HtmlLicenseHeaderHandler(List<String> ignoreFiles)
{
super(ignoreFiles);
}
@Override
- public String[] getSuffixes()
+ public List<String> getSuffixes()
{
- return new String[] { "html" };
+ return Arrays.asList("html");
}
}
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ILicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ILicenseHeaderHandler.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ILicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/ILicenseHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -17,18 +17,19 @@
package org.apache.wicket.util.license;
import java.io.File;
+import java.util.List;
interface ILicenseHeaderHandler
{
/**
* @return The suffixes that matches the files that it handles.
*/
- String[] getSuffixes();
+ List<String> getSuffixes();
/**
* @return The files to ignore.
*/
- String[] getIgnoreFiles();
+ List<String> getIgnoreFiles();
/**
* @param file
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaLicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaLicenseHeaderHandler.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaLicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaLicenseHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -17,6 +17,8 @@
package org.apache.wicket.util.license;
import java.io.File;
+import java.util.Arrays;
+import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -34,7 +36,7 @@ class JavaLicenseHeaderHandler extends A
*
* @param ignoreFiles
*/
- public JavaLicenseHeaderHandler(String[] ignoreFiles)
+ public JavaLicenseHeaderHandler(List<String> ignoreFiles)
{
super(ignoreFiles);
}
@@ -82,9 +84,9 @@ class JavaLicenseHeaderHandler extends A
return getLicenseHeader().equals(header);
}
- public String[] getSuffixes()
+ public List<String> getSuffixes()
{
- return new String[] { "java" };
+ return Arrays.asList("java");
}
@Override
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaScriptLicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaScriptLicenseHeaderHandler.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaScriptLicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/JavaScriptLicenseHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -17,16 +17,17 @@
package org.apache.wicket.util.license;
import java.io.File;
+import java.util.Arrays;
+import java.util.List;
class JavaScriptLicenseHeaderHandler extends AbstractLicenseHeaderHandler
{
-
/**
* Construct.
*
* @param ignoreFiles
*/
- public JavaScriptLicenseHeaderHandler(String[] ignoreFiles)
+ public JavaScriptLicenseHeaderHandler(List<String> ignoreFiles)
{
super(ignoreFiles);
}
@@ -44,9 +45,9 @@ class JavaScriptLicenseHeaderHandler ext
return getLicenseHeader().equals(header);
}
- public String[] getSuffixes()
+ public List<String> getSuffixes()
{
- return new String[] { "js" };
+ return Arrays.asList("js");
}
@Override
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/PropertiesLicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/PropertiesLicenseHeaderHandler.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/PropertiesLicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/PropertiesLicenseHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -17,6 +17,8 @@
package org.apache.wicket.util.license;
import java.io.File;
+import java.util.Arrays;
+import java.util.List;
import junit.framework.Assert;
@@ -30,7 +32,7 @@ class PropertiesLicenseHeaderHandler ext
*
* @param ignoreFiles
*/
- public PropertiesLicenseHeaderHandler(String[] ignoreFiles)
+ public PropertiesLicenseHeaderHandler(List<String> ignoreFiles)
{
super(ignoreFiles);
}
@@ -59,9 +61,9 @@ class PropertiesLicenseHeaderHandler ext
return revision.size() == 0;
}
- public String[] getSuffixes()
+ public List<String> getSuffixes()
{
- return new String[] { "properties" };
+ return Arrays.asList("properties");
}
@Override
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/VelocityLicenseHeaderHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/VelocityLicenseHeaderHandler.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/VelocityLicenseHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/VelocityLicenseHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -17,6 +17,8 @@
package org.apache.wicket.util.license;
import java.io.File;
+import java.util.Arrays;
+import java.util.List;
import junit.framework.Assert;
@@ -30,7 +32,7 @@ class VelocityLicenseHeaderHandler exten
*
* @param ignoreFiles
*/
- public VelocityLicenseHeaderHandler(String[] ignoreFiles)
+ public VelocityLicenseHeaderHandler(List<String> ignoreFiles)
{
super(ignoreFiles);
}
@@ -59,9 +61,9 @@ class VelocityLicenseHeaderHandler exten
return revision.size() == 0;
}
- public String[] getSuffixes()
+ public List<String> getSuffixes()
{
- return new String[] { "vm" };
+ return Arrays.asList("vm");
}
@Override
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=1023354&r1=1023353&r2=1023354&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 18:59:43 2010
@@ -17,6 +17,8 @@
package org.apache.wicket.util.license;
import java.io.File;
+import java.util.Arrays;
+import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -36,7 +38,7 @@ class XmlLicenseHeaderHandler extends Ab
*
* @param ignoreFiles
*/
- public XmlLicenseHeaderHandler(String[] ignoreFiles)
+ public XmlLicenseHeaderHandler(List<String> ignoreFiles)
{
super(ignoreFiles);
}
@@ -86,9 +88,9 @@ class XmlLicenseHeaderHandler extends Ab
return revision.size() == 0;
}
- public String[] getSuffixes()
+ public List<String> getSuffixes()
{
- return new String[] { "xml", "fml" };
+ return Arrays.asList("xml", "fml");
}
@Override
Modified: 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=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlPrologHeaderHandler.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/license/XmlPrologHeaderHandler.java Sat Oct 16 18:59:43 2010
@@ -17,6 +17,8 @@
package org.apache.wicket.util.license;
import java.io.File;
+import java.util.Arrays;
+import java.util.List;
import junit.framework.Assert;
@@ -29,15 +31,15 @@ class XmlPrologHeaderHandler extends Xml
*
* @param ignoreFiles
*/
- public XmlPrologHeaderHandler(String[] ignoreFiles)
+ public XmlPrologHeaderHandler(List<String> ignoreFiles)
{
super(ignoreFiles);
}
@Override
- public String[] getSuffixes()
+ public List<String> getSuffixes()
{
- return new String[] { "html" };
+ return Arrays.asList("html");
}
/**
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/ClassVisitFilter.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/ClassVisitFilter.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/ClassVisitFilter.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/ClassVisitFilter.java Sat Oct 16 18:59:43 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.visit;
/**
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisit.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisit.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisit.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisit.java Sat Oct 16 18:59:43 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.visit;
/**
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitFilter.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitFilter.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitFilter.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitFilter.java Sat Oct 16 18:59:43 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.visit;
/**
@@ -40,5 +56,4 @@ public interface IVisitFilter
return true;
}
};
-
}
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitor.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitor.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitor.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/IVisitor.java Sat Oct 16 18:59:43 2010
@@ -1,6 +1,21 @@
+/*
+ * 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.visit;
-
/**
* Generic visitor interface for traversals.
*
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visit.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visit.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visit.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visit.java Sat Oct 16 18:59:43 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.visit;
/**
@@ -78,6 +94,4 @@ public class Visit<R> implements IVisit<
{
return result;
}
-
-
}
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visits.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visits.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visits.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/visit/Visits.java Sat Oct 16 18:59:43 2010
@@ -1,9 +1,24 @@
+/*
+ * 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.visit;
import java.util.Collections;
import java.util.Iterator;
-
/**
* Utility class that contains visitor/traversal related code
*/
@@ -12,10 +27,8 @@ public class Visits
/** Constructor */
private Visits()
{
-
}
-
private static class SingletonIterable<T> implements Iterable<T>
{
private final T singleton;
@@ -29,7 +42,6 @@ public class Visits
{
return Collections.singleton(singleton).iterator();
}
-
}
/**
@@ -106,7 +118,6 @@ public class Visits
return visit.getResult();
}
-
private static final <S, R> void visitChildren(Iterable<? super S> container,
final IVisitor<S, R> visitor, IVisitFilter filter, Visit<R> visit)
{
@@ -239,7 +250,6 @@ public class Visits
return visit.getResult();
}
-
private static final <S, R> void visitPostOrderHelper(Object component,
final org.apache.wicket.util.visit.IVisitor<S, R> visitor, IVisitFilter filter,
Visit<R> visit)
Added: wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&view=auto
==============================================================================
--- wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (added)
+++ wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -0,0 +1,82 @@
+/*
+ * 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;
+
+/**
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
+ *
+ * @author Frank Bille Jensen (frankbille)
+ */
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
+ /**
+ * Construct.
+ */
+ public ApacheLicenceHeaderTest()
+ {
+ // addHeaders = true;
+
+ /*
+ * See NOTICE.txt
+ */
+ htmlIgnore.add("src/main/java/org/apache/wicket/util/diff");
+
+ xmlPrologIgnore.add("src/main/java/org/apache/wicket/util/diff");
+
+ /*
+ * ASL1.1. Taken from Maven JRCS. See NOTICE.txt
+ */
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/AddDelta.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/ChangeDelta.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/Chunk.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/DeleteDelta.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/Delta.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/Diff.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/DiffAlgorithm.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/DifferentiationFailedException.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/DiffException.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/PatchFailedException.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/Revision.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/RevisionVisitor.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/ToString.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/myers/DiffNode.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/myers/MyersDiff.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/myers/PathNode.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/myers/Snake.java");
+ /*
+ * Needs to be resolved (rewritten or NOTICE)
+ */
+ javaIgnore.add("src/main/java/org/apache/wicket/util/concurrent/ConcurrentReaderHashMap.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/concurrent/ConcurrentHashMap.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/concurrent/CopyOnWriteArrayList.java");
+
+ javaScriptIgnore.add("src/site/xdoc/onestat.js");
+
+ /*
+ * .js in test is very test specific and a license header would confuse and make it unclear
+ * what the test is about.
+ */
+ javaScriptIgnore.add("src/test/java");
+
+ /*
+ * See NOTICE.txt
+ */
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/ajax/wicket-ajax-debug-drag.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js");
+ }
+}
Modified: wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/string/StringsTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/string/StringsTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/string/StringsTest.java (original)
+++ wicket/trunk/wicket-util/src/test/java/org/apache/wicket/util/string/StringsTest.java Sat Oct 16 18:59:43 2010
@@ -1,11 +1,23 @@
-/**
- *
+/*
+ * 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.string;
import junit.framework.TestCase;
-
/**
*
*/
@@ -21,7 +33,7 @@ public class StringsTest extends TestCas
assertEquals(url + "/?param", Strings.stripJSessionId(url + "/?param"));
assertEquals(url, Strings.stripJSessionId(url + ";jsessionid=12345"));
assertEquals(url + "?param", Strings.stripJSessionId(url + ";jsessionid=12345?param"));
- assertEquals(url + "?param=a;b", Strings.stripJSessionId(url +
- ";jsessionid=12345?param=a;b"));
+ assertEquals(url + "?param=a;b",
+ Strings.stripJSessionId(url + ";jsessionid=12345?param=a;b"));
}
}
Modified: wicket/trunk/wicket-velocity/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-velocity/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java?rev=1023354&r1=1023353&r2=1023354&view=diff
==============================================================================
--- wicket/trunk/wicket-velocity/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java (original)
+++ wicket/trunk/wicket-velocity/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Sat Oct 16 18:59:43 2010
@@ -17,32 +17,18 @@
package org.apache.wicket.util.license;
/**
- * Test that the license headers are in place in this project. The tests are run
- * from {@link ApacheLicenseHeaderTestCase}, but you can add project specific
- * tests here if needed.
+ * Test that the license headers are in place in this project. The tests are run from
+ * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
*/
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase {
-
+public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
+{
/**
* Construct.
*/
- public ApacheLicenceHeaderTest() {
+ public ApacheLicenceHeaderTest()
+ {
// addHeaders = true;
- velocityIgnore = new String[] { "src/test/java/org/apache/wicket/contrib/velocity/testTemplate.vm" };
-
- xmlIgnore = new String[] { ".settings" };
-
- 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", };
+ velocityIgnore.add("src/test/java/org/apache/wicket/contrib/velocity/testTemplate.vm");
}
}
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=1023354&r1=1023353&r2=1023354&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 18:59:43 2010
@@ -32,88 +32,62 @@ public class ApacheLicenceHeaderTest ext
{
// addHeaders = true;
- htmlIgnore = 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",
/*
* See NOTICE.txt
*/
- "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",
+ htmlIgnore.add("src/main/java/org/apache/wicket/util/diff");
/*
* See NOTICE.txt
*/
- "src/main/java/org/apache/wicket/util/diff", };
+ xmlPrologIgnore.add("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
* what the test is about.
*/
- "src/test/java" };
+ cssIgnore.add("src/test/java");
- xmlIgnore = new String[] { ".settings", "EclipseCodeFormat.xml", "src/assembly/bin.xml" };
+ xmlIgnore.add("src/assembly/bin.xml");
- javaIgnore = new String[] {
/*
* ASL1.1. Taken from Maven JRCS. See NOTICE.txt
*/
- "src/main/java/org/apache/wicket/util/diff/AddDelta.java",
- "src/main/java/org/apache/wicket/util/diff/ChangeDelta.java",
- "src/main/java/org/apache/wicket/util/diff/Chunk.java",
- "src/main/java/org/apache/wicket/util/diff/DeleteDelta.java",
- "src/main/java/org/apache/wicket/util/diff/Delta.java",
- "src/main/java/org/apache/wicket/util/diff/Diff.java",
- "src/main/java/org/apache/wicket/util/diff/DiffAlgorithm.java",
- "src/main/java/org/apache/wicket/util/diff/DifferentiationFailedException.java",
- "src/main/java/org/apache/wicket/util/diff/DiffException.java",
- "src/main/java/org/apache/wicket/util/diff/PatchFailedException.java",
- "src/main/java/org/apache/wicket/util/diff/Revision.java",
- "src/main/java/org/apache/wicket/util/diff/RevisionVisitor.java",
- "src/main/java/org/apache/wicket/util/diff/ToString.java",
- "src/main/java/org/apache/wicket/util/diff/myers/DiffNode.java",
- "src/main/java/org/apache/wicket/util/diff/myers/MyersDiff.java",
- "src/main/java/org/apache/wicket/util/diff/myers/PathNode.java",
- "src/main/java/org/apache/wicket/util/diff/myers/Snake.java",
- /*
- * Needs to be resolved (rewritten or NOTICE)
- */
- "src/main/java/org/apache/wicket/util/concurrent/ConcurrentReaderHashMap.java",
- "src/main/java/org/apache/wicket/util/concurrent/ConcurrentHashMap.java",
- "src/main/java/org/apache/wicket/util/concurrent/CopyOnWriteArrayList.java" };
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/AddDelta.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/ChangeDelta.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/Chunk.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/DeleteDelta.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/Delta.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/Diff.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/DiffAlgorithm.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/DifferentiationFailedException.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/DiffException.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/PatchFailedException.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/Revision.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/RevisionVisitor.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/ToString.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/myers/DiffNode.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/myers/MyersDiff.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/myers/PathNode.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/diff/myers/Snake.java");
+ /*
+ * Needs to be resolved (rewritten or NOTICE)
+ */
+ javaIgnore.add("src/main/java/org/apache/wicket/util/concurrent/ConcurrentReaderHashMap.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/concurrent/ConcurrentHashMap.java");
+ javaIgnore.add("src/main/java/org/apache/wicket/util/concurrent/CopyOnWriteArrayList.java");
+
+ javaScriptIgnore.add("src/site/xdoc/onestat.js");
- javaScriptIgnore = new String[] { "src/site/xdoc/onestat.js",
/*
* .js in test is very test specific and a license header would confuse and make it unclear
* what the test is about.
*/
- "src/test/java",
+ javaScriptIgnore.add("src/test/java");
/*
* See NOTICE.txt
*/
- "src/main/java/org/apache/wicket/ajax/wicket-ajax-debug-drag.js",
- "src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js" };
-
- propertiesIgnore = new String[] {
- /*
- * .properties in test is very test specific and a license header would confuse and make it
- * unclear what the test is about.
- */
- "src/test/java", };
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/ajax/wicket-ajax-debug-drag.js");
+ javaScriptIgnore.add("src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js");
}
}