Repository: wicket Updated Branches: refs/heads/master d1b73281d -> b82e5e88a
Removed lambda factory method from StatelessLink (see WICKET-6322) Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b82e5e88 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b82e5e88 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b82e5e88 Branch: refs/heads/master Commit: b82e5e88a596f6c945ac3045cfa7b109c50d4380 Parents: d1b7328 Author: Andrea Del Bene <[email protected]> Authored: Wed Jun 14 14:41:38 2017 +0200 Committer: Andrea Del Bene <[email protected]> Committed: Wed Jun 14 14:41:38 2017 +0200 ---------------------------------------------------------------------- .../wicket/markup/html/link/StatelessLink.java | 29 -------------------- 1 file changed, 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/b82e5e88/wicket-core/src/main/java/org/apache/wicket/markup/html/link/StatelessLink.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/link/StatelessLink.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/link/StatelessLink.java index 05d1fc9..41b670a 100644 --- a/wicket-core/src/main/java/org/apache/wicket/markup/html/link/StatelessLink.java +++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/link/StatelessLink.java @@ -16,10 +16,6 @@ */ package org.apache.wicket.markup.html.link; - -import org.apache.wicket.util.lang.Args; -import org.danekja.java.util.function.serializable.SerializableConsumer; - /** * This link is stateless that means that the url to this link could generate a new page before the * link onClick is called. Because of this you can't depend on model data in the onClick method. @@ -56,29 +52,4 @@ public abstract class StatelessLink<T> extends Link<T> { return urlForListener(getPage().getPageParameters()); } - - /** - * Creates a {@link Link} based on lambda expressions - * - * @param id - * the id of the link - * @param onClick - * the {@code SerializableConsumer} which accepts the {@link Void} - * @return the {@link Link} - */ - public static <T> StatelessLink<T> onClick(String id, SerializableConsumer<Link<T>> onClick) - { - Args.notNull(onClick, "onClick"); - - return new StatelessLink<T>(id) - { - private static final long serialVersionUID = 1L; - - @Override - public void onClick() - { - onClick.accept(this); - } - }; - } }
