You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2015/11/14 11:22:47 UTC

[1/2] wicket git commit: WICKET-5997 Compatibility problem with Websphere liberty profile

Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 19f32b689 -> dbd0fa83e


WICKET-5997 Compatibility problem with Websphere liberty profile

Use ServiceLoader instead of collecting the wicket.properties files in the classpath with custom logic


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/3af54977
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/3af54977
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/3af54977

Branch: refs/heads/wicket-6.x
Commit: 3af549777a7ca81f5494525d8075fb2a050bd4be
Parents: 19f32b6
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Sun Oct 18 12:02:10 2015 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sat Nov 14 11:21:39 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/wicket/Application.java | 12 +++++++++---
 wicket-core/src/main/java/wicket.properties          | 15 ---------------
 .../META-INF/services/org.apache.wicket.IInitializer |  1 +
 wicket-devutils/src/main/java/wicket.properties      | 15 ---------------
 .../META-INF/services/org.apache.wicket.IInitializer |  1 +
 .../META-INF/services/org.apache.wicket.IInitializer |  1 +
 .../src/main/resources/wicket.properties             | 15 ---------------
 wicket-extensions/src/main/java/wicket.properties    | 15 ---------------
 .../META-INF/services/org.apache.wicket.IInitializer |  1 +
 wicket-jmx/src/main/java/wicket.properties           | 15 ---------------
 .../META-INF/services/org.apache.wicket.IInitializer |  1 +
 wicket-velocity/src/main/java/wicket.properties      | 15 ---------------
 .../META-INF/services/org.apache.wicket.IInitializer |  1 +
 13 files changed, 15 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-core/src/main/java/org/apache/wicket/Application.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.java b/wicket-core/src/main/java/org/apache/wicket/Application.java
index 5c53d63..8e8ed0f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Application.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Application.java
@@ -25,6 +25,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import java.util.ServiceLoader;
 import java.util.Set;
 
 import org.apache.wicket.application.ComponentOnConfigureListenerCollection;
@@ -78,7 +79,6 @@ import org.apache.wicket.request.cycle.IRequestCycleListener;
 import org.apache.wicket.request.cycle.RequestCycle;
 import org.apache.wicket.request.cycle.RequestCycleContext;
 import org.apache.wicket.request.cycle.RequestCycleListenerCollection;
-import org.apache.wicket.request.mapper.CompoundRequestMapper;
 import org.apache.wicket.request.mapper.ICompoundRequestMapper;
 import org.apache.wicket.request.resource.ResourceReferenceRegistry;
 import org.apache.wicket.response.filter.EmptySrcAttributeCheckFilter;
@@ -485,7 +485,6 @@ public abstract class Application implements UnboundListener, IEventSink
 	{
 	}
 
-
 	/**
 	 * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL.
 	 * 
@@ -613,9 +612,16 @@ public abstract class Application implements UnboundListener, IEventSink
 	{
 		for (IInitializer initializer : initializers)
 		{
-			log.info("[" + getName() + "] init: " + initializer);
+			log.info("[{}] init: {}", getName(), initializer);
 			initializer.init(this);
 		}
+
+		final ServiceLoader<IInitializer> serviceLoaderInitializers = ServiceLoader.load(IInitializer.class);
+		for (IInitializer serviceLoaderInitializer : serviceLoaderInitializers) {
+			log.info("[{}] init: {}", getName(), serviceLoaderInitializer);
+			serviceLoaderInitializer.init(this);
+			initializers.add(serviceLoaderInitializer);
+		}
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-core/src/main/java/wicket.properties
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/wicket.properties b/wicket-core/src/main/java/wicket.properties
deleted file mode 100644
index d004034..0000000
--- a/wicket-core/src/main/java/wicket.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You under the Apache License, Version 2.0
-#  (the "License"); you may not use this file except in compliance with
-#  the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-initializer=org.apache.wicket.Initializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-core/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/resources/META-INF/services/org.apache.wicket.IInitializer b/wicket-core/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
new file mode 100644
index 0000000..1c52f2d
--- /dev/null
+++ b/wicket-core/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
@@ -0,0 +1 @@
+org.apache.wicket.Initializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-devutils/src/main/java/wicket.properties
----------------------------------------------------------------------
diff --git a/wicket-devutils/src/main/java/wicket.properties b/wicket-devutils/src/main/java/wicket.properties
deleted file mode 100644
index 406c79f..0000000
--- a/wicket-devutils/src/main/java/wicket.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You under the Apache License, Version 2.0
-#  (the "License"); you may not use this file except in compliance with
-#  the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-initializer=org.apache.wicket.devutils.debugbar.DebugBarInitializer
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-devutils/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
----------------------------------------------------------------------
diff --git a/wicket-devutils/src/main/resources/META-INF/services/org.apache.wicket.IInitializer b/wicket-devutils/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
new file mode 100644
index 0000000..0672d71
--- /dev/null
+++ b/wicket-devutils/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
@@ -0,0 +1 @@
+org.apache.wicket.devutils.debugbar.DebugBarInitializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-experimental/wicket-atmosphere/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-atmosphere/src/main/resources/META-INF/services/org.apache.wicket.IInitializer b/wicket-experimental/wicket-atmosphere/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
new file mode 100644
index 0000000..69885be
--- /dev/null
+++ b/wicket-experimental/wicket-atmosphere/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
@@ -0,0 +1 @@
+org.apache.wicket.atmosphere.Initializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-experimental/wicket-atmosphere/src/main/resources/wicket.properties
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-atmosphere/src/main/resources/wicket.properties b/wicket-experimental/wicket-atmosphere/src/main/resources/wicket.properties
deleted file mode 100644
index c07947f..0000000
--- a/wicket-experimental/wicket-atmosphere/src/main/resources/wicket.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You under the Apache License, Version 2.0
-#  (the "License"); you may not use this file except in compliance with
-#  the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-initializer=org.apache.wicket.atmosphere.Initializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-extensions/src/main/java/wicket.properties
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/wicket.properties b/wicket-extensions/src/main/java/wicket.properties
deleted file mode 100644
index 7874436..0000000
--- a/wicket-extensions/src/main/java/wicket.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You under the Apache License, Version 2.0
-#  (the "License"); you may not use this file except in compliance with
-#  the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-initializer=org.apache.wicket.extensions.Initializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-extensions/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/resources/META-INF/services/org.apache.wicket.IInitializer b/wicket-extensions/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
new file mode 100644
index 0000000..31d1a35
--- /dev/null
+++ b/wicket-extensions/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
@@ -0,0 +1 @@
+org.apache.wicket.extensions.Initializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-jmx/src/main/java/wicket.properties
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/wicket.properties b/wicket-jmx/src/main/java/wicket.properties
deleted file mode 100644
index 534efb7..0000000
--- a/wicket-jmx/src/main/java/wicket.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You under the Apache License, Version 2.0
-#  (the "License"); you may not use this file except in compliance with
-#  the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-initializer=org.apache.wicket.jmx.Initializer
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-jmx/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/resources/META-INF/services/org.apache.wicket.IInitializer b/wicket-jmx/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
new file mode 100644
index 0000000..b8439d4
--- /dev/null
+++ b/wicket-jmx/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
@@ -0,0 +1 @@
+org.apache.wicket.jmx.Initializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-velocity/src/main/java/wicket.properties
----------------------------------------------------------------------
diff --git a/wicket-velocity/src/main/java/wicket.properties b/wicket-velocity/src/main/java/wicket.properties
deleted file mode 100644
index 0b36808..0000000
--- a/wicket-velocity/src/main/java/wicket.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You under the Apache License, Version 2.0
-#  (the "License"); you may not use this file except in compliance with
-#  the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-initializer=org.apache.wicket.velocity.Initializer

http://git-wip-us.apache.org/repos/asf/wicket/blob/3af54977/wicket-velocity/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
----------------------------------------------------------------------
diff --git a/wicket-velocity/src/main/resources/META-INF/services/org.apache.wicket.IInitializer b/wicket-velocity/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
new file mode 100644
index 0000000..da1ab61
--- /dev/null
+++ b/wicket-velocity/src/main/resources/META-INF/services/org.apache.wicket.IInitializer
@@ -0,0 +1 @@
+org.apache.wicket.velocity.Initializer


[2/2] wicket git commit: WICKET-6017 Tests fail when executed with not expected locale

Posted by mg...@apache.org.
WICKET-6017 Tests fail when executed with not expected locale

Use a random locale that has both a country and a language


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/dbd0fa83
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/dbd0fa83
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/dbd0fa83

Branch: refs/heads/wicket-6.x
Commit: dbd0fa83eea755fbf64bca17065762899ceffc7a
Parents: 3af5497
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Sat Nov 14 11:21:59 2015 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sat Nov 14 11:21:59 2015 +0100

----------------------------------------------------------------------
 .../wicket/util/resource/locator/ResourceNameIteratorTest.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/dbd0fa83/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/ResourceNameIteratorTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/ResourceNameIteratorTest.java b/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/ResourceNameIteratorTest.java
index cd9283f..5533b76 100644
--- a/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/ResourceNameIteratorTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/ResourceNameIteratorTest.java
@@ -151,7 +151,7 @@ public class ResourceNameIteratorTest extends WicketTestCase
 		String path = "patch.extension";
 		String style = null;
 		String var = "var";
-		Locale locale = Locale.getDefault();
+		Locale locale = Locale.CANADA_FRENCH;
 		Iterable<String> extensions = null;
 		boolean strict = false;
 		Iterator<String> iterator = new ResourceNameIterator(path, style, var, locale, extensions, strict);