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 2016/04/24 15:51:06 UTC
[1/4] wicket git commit: Add serializable BiFunction
Repository: wicket
Updated Branches:
refs/heads/master 69f2d0ad9 -> f2f0ba067
Add serializable BiFunction
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fbb00607
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fbb00607
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fbb00607
Branch: refs/heads/master
Commit: fbb0060754b0450d1b9a011b70c0a494ae745e0d
Parents: 69f2d0a
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Sun Apr 24 13:07:45 2016 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sun Apr 24 13:07:45 2016 +0200
----------------------------------------------------------------------
.../apache/wicket/lambda/WicketBiFunction.java | 36 ++++++++++++++++++++
1 file changed, 36 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/fbb00607/wicket-core/src/main/java/org/apache/wicket/lambda/WicketBiFunction.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/lambda/WicketBiFunction.java b/wicket-core/src/main/java/org/apache/wicket/lambda/WicketBiFunction.java
new file mode 100644
index 0000000..f5f66a6
--- /dev/null
+++ b/wicket-core/src/main/java/org/apache/wicket/lambda/WicketBiFunction.java
@@ -0,0 +1,36 @@
+/*
+ * 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.lambda;
+
+import java.io.Serializable;
+import java.util.function.BiFunction;
+
+import org.apache.wicket.util.io.IClusterable;
+
+/**
+ * A {@link Serializable} {@link BiFunction}.
+ *
+ * @param <T>
+ * - the type of the first input to the function
+ * @param <U>
+ * - the type of the second input to the function
+ * @param <R>
+ * - the type of the result of the function
+ */
+public interface WicketBiFunction<T, U, R> extends BiFunction<T, U, R>, IClusterable
+{
+}
[4/4] wicket git commit: Fix generics related warnings
Posted by mg...@apache.org.
Fix generics related warnings
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f2f0ba06
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f2f0ba06
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f2f0ba06
Branch: refs/heads/master
Commit: f2f0ba067e9cf3a4f31eb3c387d6244c3c06c44b
Parents: 48f663d
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Sun Apr 24 13:09:56 2016 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sun Apr 24 13:11:05 2016 +0200
----------------------------------------------------------------------
.../core/util/objects/checker/AbstractObjectCheckerTest.java | 4 ++--
.../org/apache/wicket/stateless/StatelessFormUrlTest.java | 7 +++----
.../org/apache/wicket/examples/breadcrumb/SecondPanel.java | 7 ++-----
.../markup/html/tabs/TabbedPanelVisibilityTestPage.java | 2 +-
4 files changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/f2f0ba06/wicket-core/src/test/java/org/apache/wicket/core/util/objects/checker/AbstractObjectCheckerTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/core/util/objects/checker/AbstractObjectCheckerTest.java b/wicket-core/src/test/java/org/apache/wicket/core/util/objects/checker/AbstractObjectCheckerTest.java
index 6f8182c..20cd873 100644
--- a/wicket-core/src/test/java/org/apache/wicket/core/util/objects/checker/AbstractObjectCheckerTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/core/util/objects/checker/AbstractObjectCheckerTest.java
@@ -16,7 +16,7 @@
*/
package org.apache.wicket.core.util.objects.checker;
-import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import org.junit.Assert;
@@ -30,7 +30,7 @@ public class AbstractObjectCheckerTest extends Assert
@Test
public void doCheckIsNotCalledForExcludedTypes()
{
- List exclusions = Arrays.asList(CharSequence.class);
+ List<Class<?>> exclusions = Collections.singletonList(CharSequence.class);
IObjectChecker checker = new AbstractObjectChecker(exclusions)
{
http://git-wip-us.apache.org/repos/asf/wicket/blob/f2f0ba06/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessFormUrlTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessFormUrlTest.java b/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessFormUrlTest.java
index af6ba9d..17b3f8d 100644
--- a/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessFormUrlTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessFormUrlTest.java
@@ -29,7 +29,6 @@ import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.util.resource.IResourceStream;
import org.apache.wicket.util.resource.StringResourceStream;
-import org.apache.wicket.util.tester.FormTester;
import org.apache.wicket.util.tester.WicketTestCase;
import org.junit.Test;
@@ -82,9 +81,9 @@ public class StatelessFormUrlTest extends WicketTestCase
public TestPage(PageParameters pageParameters)
{
super(pageParameters);
- StatelessForm<Void> form = new StatelessForm<Void>("form");
+ StatelessForm<Void> form = new StatelessForm<>("form");
add(form);
- TextField textField = new TextField("text", Model.of("textValue"));
+ TextField<String> textField = new TextField<>("text", Model.of("textValue"));
form.add(textField);
SubmitLink submitLink = new SubmitLink("submitLink");
form.add(submitLink);
@@ -99,4 +98,4 @@ public class StatelessFormUrlTest extends WicketTestCase
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/wicket/blob/f2f0ba06/wicket-examples/src/main/java/org/apache/wicket/examples/breadcrumb/SecondPanel.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/breadcrumb/SecondPanel.java b/wicket-examples/src/main/java/org/apache/wicket/examples/breadcrumb/SecondPanel.java
index 8146b33..4b20b28 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/breadcrumb/SecondPanel.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/breadcrumb/SecondPanel.java
@@ -36,7 +36,7 @@ import org.apache.wicket.model.Model;
public class SecondPanel extends BreadCrumbPanel
{
/** Test form. */
- private final class InputForm extends Form
+ private final class InputForm extends Form<InputForm>
{
/** test input string. */
private String input;
@@ -50,7 +50,7 @@ public class SecondPanel extends BreadCrumbPanel
public InputForm(String id)
{
super(id);
- setDefaultModel(new CompoundPropertyModel(this));
+ setDefaultModel(new CompoundPropertyModel<>(this));
add(new TextField("input"));
add(new Button("normalButton"));
@@ -110,9 +110,6 @@ public class SecondPanel extends BreadCrumbPanel
add(new InputForm("form"));
}
- /**
- * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbParticipant#getTitle()
- */
@Override
public IModel<String> getTitle()
{
http://git-wip-us.apache.org/repos/asf/wicket/blob/f2f0ba06/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanelVisibilityTestPage.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanelVisibilityTestPage.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanelVisibilityTestPage.java
index cdb2a3d..a7475be 100644
--- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanelVisibilityTestPage.java
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanelVisibilityTestPage.java
@@ -40,7 +40,7 @@ public class TabbedPanelVisibilityTestPage extends WebPage
tabs.add(new DummyTab(i < nbTabsVisible));
}
- tabbedPanel = new TabbedPanel("tabbedPanel", tabs);
+ tabbedPanel = new TabbedPanel<>("tabbedPanel", tabs);
add(tabbedPanel);
}
[2/4] wicket git commit: Fix javadoc error
Posted by mg...@apache.org.
Fix javadoc error
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1df79c4d
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1df79c4d
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1df79c4d
Branch: refs/heads/master
Commit: 1df79c4d1ed7b648212039a9f0432bb7b57d6ef1
Parents: fbb0060
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Sun Apr 24 13:08:17 2016 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sun Apr 24 13:08:17 2016 +0200
----------------------------------------------------------------------
wicket-core/src/main/java/org/apache/wicket/model/Model.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/1df79c4d/wicket-core/src/main/java/org/apache/wicket/model/Model.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/model/Model.java b/wicket-core/src/main/java/org/apache/wicket/model/Model.java
index b9c8cec..3894faf 100644
--- a/wicket-core/src/main/java/org/apache/wicket/model/Model.java
+++ b/wicket-core/src/main/java/org/apache/wicket/model/Model.java
@@ -190,7 +190,6 @@ public class Model<T extends Serializable> implements IObjectClassAwareModel<T>
*
* @param <T>
* @param getter Used for the getObject() method.
- * @param setter Used for the setObject(T object) method.
* @return Model that contains <code>object</code>
*/
public static <T> IModel<T> loadableDetachable(WicketSupplier<T> getter)
[3/4] wicket git commit: Simplify and use non-deprecated contructor
of org.junit.rules.Timeout rule
Posted by mg...@apache.org.
Simplify and use non-deprecated contructor of org.junit.rules.Timeout rule
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/48f663d2
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/48f663d2
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/48f663d2
Branch: refs/heads/master
Commit: 48f663d2ac3e86d0c46bf317ff0d3c476bfe5456
Parents: 1df79c4
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Sun Apr 24 13:08:37 2016 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sun Apr 24 13:08:37 2016 +0200
----------------------------------------------------------------------
.../java/org/apache/wicket/page/PageAccessSynchronizerTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/48f663d2/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java b/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java
index b5f7967..e2053df 100644
--- a/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java
@@ -20,6 +20,7 @@ import java.util.Random;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.wicket.MockPage;
@@ -46,7 +47,7 @@ public class PageAccessSynchronizerTest extends Assert
/** */
@Rule
- public Timeout globalTimeout = new Timeout((int)Duration.seconds(30).getMilliseconds());
+ public Timeout globalTimeout = new Timeout(30, TimeUnit.SECONDS);
/**
* @throws Exception