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/06 22:59:19 UTC
wicket git commit: WICKET-6132 AbstractChoice#getChoices() should be
final
Repository: wicket
Updated Branches:
refs/heads/master 530ddc1b4 -> 7b10fa39a
WICKET-6132 AbstractChoice#getChoices() should be final
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7b10fa39
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7b10fa39
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7b10fa39
Branch: refs/heads/master
Commit: 7b10fa39a6496c1d0eb22adf794c8bb6ea1c785f
Parents: 530ddc1
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Apr 6 22:58:29 2016 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Apr 6 22:58:29 2016 +0200
----------------------------------------------------------------------
.../apache/wicket/markup/html/form/AbstractChoice.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/7b10fa39/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
index ee566db..523116e 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
@@ -53,7 +53,7 @@ public abstract class AbstractChoice<T, E> extends FormComponent<T>
/**
* An enumeration of possible positions of the label for a choice
*/
- public static enum LabelPosition
+ public enum LabelPosition
{
/**
* will render the label before the choice
@@ -134,7 +134,7 @@ public abstract class AbstractChoice<T, E> extends FormComponent<T>
*/
public AbstractChoice(final String id, IModel<T> model, final List<? extends E> choices)
{
- this(id, model, new ListModel<>(choices), new ChoiceRenderer<E>());
+ this(id, model, new ListModel<>(choices), new ChoiceRenderer<>());
}
/**
@@ -199,7 +199,7 @@ public abstract class AbstractChoice<T, E> extends FormComponent<T>
public AbstractChoice(final String id, IModel<T> model,
final IModel<? extends List<? extends E>> choices)
{
- this(id, model, choices, new ChoiceRenderer<E>());
+ this(id, model, choices, new ChoiceRenderer<>());
}
/**
@@ -225,9 +225,10 @@ public abstract class AbstractChoice<T, E> extends FormComponent<T>
/**
* @return The collection of object that this choice has
*/
- public List<? extends E> getChoices()
+ public final List<? extends E> getChoices()
{
- List<? extends E> choices = (this.choices != null) ? this.choices.getObject() : null;
+ IModel<? extends List<? extends E>> choicesModel = getChoicesModel();
+ List<? extends E> choices = (choicesModel != null) ? choicesModel.getObject() : null;
if (choices == null)
{
throw new NullPointerException(