You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pe...@apache.org on 2012/05/23 00:18:11 UTC
git commit: javadoc corrections (via
https://github.com/apache/wicket/pull/11.patch)
Updated Branches:
refs/heads/master 256d4fff5 -> 02224b730
javadoc corrections (via https://github.com/apache/wicket/pull/11.patch)
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/02224b73
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/02224b73
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/02224b73
Branch: refs/heads/master
Commit: 02224b7300bb469705ff1f8e736979404fc3b97c
Parents: 256d4ff
Author: Thomas Götz <to...@decoded.de>
Authored: Wed May 23 00:15:14 2012 +0200
Committer: Peter Ertl <pe...@apache.org>
Committed: Wed May 23 00:17:48 2012 +0200
----------------------------------------------------------------------
.../apache/wicket/IComponentAwareEventSink.java | 84 +-
.../org/apache/wicket/ajax/json/JSONWriter.java | 654 +++++++-------
.../wicket/core/request/handler/IPageProvider.java | 5 +-
.../request/handler/PageAndComponentProvider.java | 4 +-
.../wicket/core/request/mapper/PackageMapper.java | 8 +-
.../locator/OsgiResourceStreamLocator.java | 2 +-
.../apache/wicket/markup/html/border/Border.java | 4 +-
.../wicket/markup/html/border/BorderPanel.java | 262 +++---
.../wicket/markup/html/form/RangeTextField.java | 4 +-
.../image/resource/DefaultButtonImageResource.java | 2 +-
.../wicket/markup/html/pages/BrowserInfoPage.java | 2 +-
.../markup/repeater/data/EmptyDataProvider.java | 2 +-
.../wicket/markup/repeater/data/IDataProvider.java | 2 +-
.../org/apache/wicket/pageStore/IPageStore.java | 2 -
.../pageStore/memory/HttpSessionDataStore.java | 2 +-
.../cycle/RequestCycleListenerCollection.java | 426 +++++-----
.../resource/loader/ClassStringResourceLoader.java | 2 +-
.../apache/wicket/util/template/TextTemplate.java | 2 +-
18 files changed, 734 insertions(+), 735 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/IComponentAwareEventSink.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/IComponentAwareEventSink.java b/wicket-core/src/main/java/org/apache/wicket/IComponentAwareEventSink.java
index 6e3c4e3..9b8fc36 100644
--- a/wicket-core/src/main/java/org/apache/wicket/IComponentAwareEventSink.java
+++ b/wicket-core/src/main/java/org/apache/wicket/IComponentAwareEventSink.java
@@ -1,42 +1,42 @@
-/*
- * 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;
-
-import org.apache.wicket.behavior.Behavior;
-import org.apache.wicket.event.IEvent;
-import org.apache.wicket.event.IEventSink;
-
-/**
- * A specialization of {@link IEventSink} that adds component as an additional parameter to the
- * {@link #onEvent(IEvent, Component)} method. This interface is useful for component plugins which
- * wish to participate in event processing, for example {@link Behavior}s
- *
- * @author igor
- */
-public interface IComponentAwareEventSink
-{
- /**
- * Called when an event is sent to this behavior sink
- *
- * @param component
- * component that owns this sink. For example, if the implementation of this
- * interface is a {@link Behavior} then component parameter will contain the
- * component to which the behavior is attached.
- * @param event
- */
- void onEvent(Component component, IEvent<?> event);
-}
+/*
+ * 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;
+
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.event.IEventSink;
+
+/**
+ * A specialization of {@link IEventSink} that adds component as an additional parameter to the
+ * {@link #onEvent(Component, IEvent)} method. This interface is useful for component plugins which
+ * wish to participate in event processing, for example {@link Behavior}s
+ *
+ * @author igor
+ */
+public interface IComponentAwareEventSink
+{
+ /**
+ * Called when an event is sent to this behavior sink
+ *
+ * @param component
+ * component that owns this sink. For example, if the implementation of this
+ * interface is a {@link Behavior} then component parameter will contain the
+ * component to which the behavior is attached.
+ * @param event
+ */
+ void onEvent(Component component, IEvent<?> event);
+}
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/ajax/json/JSONWriter.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/json/JSONWriter.java b/wicket-core/src/main/java/org/apache/wicket/ajax/json/JSONWriter.java
index 7762383..136370a 100755
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/json/JSONWriter.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/json/JSONWriter.java
@@ -1,327 +1,327 @@
-package org.apache.wicket.ajax.json;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/*
-Copyright (c) 2006 JSON.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-The Software shall be used for Good, not Evil.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-/**
- * JSONWriter provides a quick and convenient way of producing JSON text.
- * The texts produced strictly conform to JSON syntax rules. No whitespace is
- * added, so the results are ready for transmission or storage. Each instance of
- * JSONWriter can produce one JSON text.
- * <p>
- * A JSONWriter instance provides a <code>value</code> method for appending
- * values to the
- * text, and a <code>key</code>
- * method for adding keys before values in objects. There are <code>array</code>
- * and <code>endArray</code> methods that make and bound array values, and
- * <code>object</code> and <code>endObject</code> methods which make and bound
- * object values. All of these methods return the JSONWriter instance,
- * permitting a cascade style. For example, <pre>
- * new JSONWriter(myWriter)
- * .object()
- * .key("JSON")
- * .value("Hello, World!")
- * .endObject();</pre> which writes <pre>
- * {"JSON":"Hello, World!"}</pre>
- * <p>
- * The first method called must be <code>array</code> or <code>object</code>.
- * There are no methods for adding commas or colons. JSONWriter adds them for
- * you. Objects and arrays can be nested up to 20 levels deep.
- * <p>
- * This can sometimes be easier than using a JSONObject to build a string.
- * @author JSON.org
- * @version 2011-11-24
- */
-public class JSONWriter {
- private static final int maxdepth = 200;
-
- /**
- * The comma flag determines if a comma should be output before the next
- * value.
- */
- private boolean comma;
-
- /**
- * The current mode. Values:
- * 'a' (array),
- * 'd' (done),
- * 'i' (initial),
- * 'k' (key),
- * 'o' (object).
- */
- protected char mode;
-
- /**
- * The object/array stack.
- */
- private final JSONObject stack[];
-
- /**
- * The stack top index. A value of 0 indicates that the stack is empty.
- */
- private int top;
-
- /**
- * The writer that will receive the output.
- */
- protected Writer writer;
-
- /**
- * Make a fresh JSONWriter. It can be used to build one JSON text.
- */
- public JSONWriter(Writer w) {
- this.comma = false;
- this.mode = 'i';
- this.stack = new JSONObject[maxdepth];
- this.top = 0;
- this.writer = w;
- }
-
- /**
- * Append a value.
- * @param string A string value.
- * @return this
- * @throws JSONException If the value is out of sequence.
- */
- private JSONWriter append(String string) throws JSONException {
- if (string == null) {
- throw new JSONException("Null pointer");
- }
- if (this.mode == 'o' || this.mode == 'a') {
- try {
- if (this.comma && this.mode == 'a') {
- this.writer.write(',');
- }
- this.writer.write(string);
- } catch (IOException e) {
- throw new JSONException(e);
- }
- if (this.mode == 'o') {
- this.mode = 'k';
- }
- this.comma = true;
- return this;
- }
- throw new JSONException("Value out of sequence.");
- }
-
- /**
- * Begin appending a new array. All values until the balancing
- * <code>endArray</code> will be appended to this array. The
- * <code>endArray</code> method must be called to mark the array's end.
- * @return this
- * @throws JSONException If the nesting is too deep, or if the object is
- * started in the wrong place (for example as a key or after the end of the
- * outermost array or object).
- */
- public JSONWriter array() throws JSONException {
- if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
- this.push(null);
- this.append("[");
- this.comma = false;
- return this;
- }
- throw new JSONException("Misplaced array.");
- }
-
- /**
- * End something.
- * @param mode Mode
- * @param c Closing character
- * @return this
- * @throws JSONException If unbalanced.
- */
- private JSONWriter end(char mode, char c) throws JSONException {
- if (this.mode != mode) {
- throw new JSONException(mode == 'a'
- ? "Misplaced endArray."
- : "Misplaced endObject.");
- }
- this.pop(mode);
- try {
- this.writer.write(c);
- } catch (IOException e) {
- throw new JSONException(e);
- }
- this.comma = true;
- return this;
- }
-
- /**
- * End an array. This method most be called to balance calls to
- * <code>array</code>.
- * @return this
- * @throws JSONException If incorrectly nested.
- */
- public JSONWriter endArray() throws JSONException {
- return this.end('a', ']');
- }
-
- /**
- * End an object. This method most be called to balance calls to
- * <code>object</code>.
- * @return this
- * @throws JSONException If incorrectly nested.
- */
- public JSONWriter endObject() throws JSONException {
- return this.end('k', '}');
- }
-
- /**
- * Append a key. The key will be associated with the next value. In an
- * object, every value must be preceded by a key.
- * @param string A key string.
- * @return this
- * @throws JSONException If the key is out of place. For example, keys
- * do not belong in arrays or if the key is null.
- */
- public JSONWriter key(String string) throws JSONException {
- if (string == null) {
- throw new JSONException("Null key.");
- }
- if (this.mode == 'k') {
- try {
- this.stack[this.top - 1].putOnce(string, Boolean.TRUE);
- if (this.comma) {
- this.writer.write(',');
- }
- this.writer.write(JSONObject.quote(string));
- this.writer.write(':');
- this.comma = false;
- this.mode = 'o';
- return this;
- } catch (IOException e) {
- throw new JSONException(e);
- }
- }
- throw new JSONException("Misplaced key.");
- }
-
-
- /**
- * Begin appending a new object. All keys and values until the balancing
- * <code>endObject</code> will be appended to this object. The
- * <code>endObject</code> method must be called to mark the object's end.
- * @return this
- * @throws JSONException If the nesting is too deep, or if the object is
- * started in the wrong place (for example as a key or after the end of the
- * outermost array or object).
- */
- public JSONWriter object() throws JSONException {
- if (this.mode == 'i') {
- this.mode = 'o';
- }
- if (this.mode == 'o' || this.mode == 'a') {
- this.append("{");
- this.push(new JSONObject());
- this.comma = false;
- return this;
- }
- throw new JSONException("Misplaced object.");
-
- }
-
-
- /**
- * Pop an array or object scope.
- * @param c The scope to close.
- * @throws JSONException If nesting is wrong.
- */
- private void pop(char c) throws JSONException {
- if (this.top <= 0) {
- throw new JSONException("Nesting error.");
- }
- char m = this.stack[this.top - 1] == null ? 'a' : 'k';
- if (m != c) {
- throw new JSONException("Nesting error.");
- }
- this.top -= 1;
- this.mode = this.top == 0
- ? 'd'
- : this.stack[this.top - 1] == null
- ? 'a'
- : 'k';
- }
-
- /**
- * Push an array or object scope.
- * @param c The scope to open.
- * @throws JSONException If nesting is too deep.
- */
- private void push(JSONObject jo) throws JSONException {
- if (this.top >= maxdepth) {
- throw new JSONException("Nesting too deep.");
- }
- this.stack[this.top] = jo;
- this.mode = jo == null ? 'a' : 'k';
- this.top += 1;
- }
-
-
- /**
- * Append either the value <code>true</code> or the value
- * <code>false</code>.
- * @param b A boolean.
- * @return this
- * @throws JSONException
- */
- public JSONWriter value(boolean b) throws JSONException {
- return this.append(b ? "true" : "false");
- }
-
- /**
- * Append a double value.
- * @param d A double.
- * @return this
- * @throws JSONException If the number is not finite.
- */
- public JSONWriter value(double d) throws JSONException {
- return this.value(new Double(d));
- }
-
- /**
- * Append a long value.
- * @param l A long.
- * @return this
- * @throws JSONException
- */
- public JSONWriter value(long l) throws JSONException {
- return this.append(Long.toString(l));
- }
-
-
- /**
- * Append an object value.
- * @param object The object to append. It can be null, or a Boolean, Number,
- * String, JSONObject, or JSONArray, or an object that implements JSONString.
- * @return this
- * @throws JSONException If the value is out of sequence.
- */
- public JSONWriter value(Object object) throws JSONException {
- return this.append(JSONObject.valueToString(object));
- }
-}
+package org.apache.wicket.ajax.json;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/*
+Copyright (c) 2006 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * JSONWriter provides a quick and convenient way of producing JSON text.
+ * The texts produced strictly conform to JSON syntax rules. No whitespace is
+ * added, so the results are ready for transmission or storage. Each instance of
+ * JSONWriter can produce one JSON text.
+ * <p>
+ * A JSONWriter instance provides a <code>value</code> method for appending
+ * values to the
+ * text, and a <code>key</code>
+ * method for adding keys before values in objects. There are <code>array</code>
+ * and <code>endArray</code> methods that make and bound array values, and
+ * <code>object</code> and <code>endObject</code> methods which make and bound
+ * object values. All of these methods return the JSONWriter instance,
+ * permitting a cascade style. For example, <pre>
+ * new JSONWriter(myWriter)
+ * .object()
+ * .key("JSON")
+ * .value("Hello, World!")
+ * .endObject();</pre> which writes <pre>
+ * {"JSON":"Hello, World!"}</pre>
+ * <p>
+ * The first method called must be <code>array</code> or <code>object</code>.
+ * There are no methods for adding commas or colons. JSONWriter adds them for
+ * you. Objects and arrays can be nested up to 20 levels deep.
+ * <p>
+ * This can sometimes be easier than using a JSONObject to build a string.
+ * @author JSON.org
+ * @version 2011-11-24
+ */
+public class JSONWriter {
+ private static final int maxdepth = 200;
+
+ /**
+ * The comma flag determines if a comma should be output before the next
+ * value.
+ */
+ private boolean comma;
+
+ /**
+ * The current mode. Values:
+ * 'a' (array),
+ * 'd' (done),
+ * 'i' (initial),
+ * 'k' (key),
+ * 'o' (object).
+ */
+ protected char mode;
+
+ /**
+ * The object/array stack.
+ */
+ private final JSONObject stack[];
+
+ /**
+ * The stack top index. A value of 0 indicates that the stack is empty.
+ */
+ private int top;
+
+ /**
+ * The writer that will receive the output.
+ */
+ protected Writer writer;
+
+ /**
+ * Make a fresh JSONWriter. It can be used to build one JSON text.
+ */
+ public JSONWriter(Writer w) {
+ this.comma = false;
+ this.mode = 'i';
+ this.stack = new JSONObject[maxdepth];
+ this.top = 0;
+ this.writer = w;
+ }
+
+ /**
+ * Append a value.
+ * @param string A string value.
+ * @return this
+ * @throws JSONException If the value is out of sequence.
+ */
+ private JSONWriter append(String string) throws JSONException {
+ if (string == null) {
+ throw new JSONException("Null pointer");
+ }
+ if (this.mode == 'o' || this.mode == 'a') {
+ try {
+ if (this.comma && this.mode == 'a') {
+ this.writer.write(',');
+ }
+ this.writer.write(string);
+ } catch (IOException e) {
+ throw new JSONException(e);
+ }
+ if (this.mode == 'o') {
+ this.mode = 'k';
+ }
+ this.comma = true;
+ return this;
+ }
+ throw new JSONException("Value out of sequence.");
+ }
+
+ /**
+ * Begin appending a new array. All values until the balancing
+ * <code>endArray</code> will be appended to this array. The
+ * <code>endArray</code> method must be called to mark the array's end.
+ * @return this
+ * @throws JSONException If the nesting is too deep, or if the object is
+ * started in the wrong place (for example as a key or after the end of the
+ * outermost array or object).
+ */
+ public JSONWriter array() throws JSONException {
+ if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
+ this.push(null);
+ this.append("[");
+ this.comma = false;
+ return this;
+ }
+ throw new JSONException("Misplaced array.");
+ }
+
+ /**
+ * End something.
+ * @param mode Mode
+ * @param c Closing character
+ * @return this
+ * @throws JSONException If unbalanced.
+ */
+ private JSONWriter end(char mode, char c) throws JSONException {
+ if (this.mode != mode) {
+ throw new JSONException(mode == 'a'
+ ? "Misplaced endArray."
+ : "Misplaced endObject.");
+ }
+ this.pop(mode);
+ try {
+ this.writer.write(c);
+ } catch (IOException e) {
+ throw new JSONException(e);
+ }
+ this.comma = true;
+ return this;
+ }
+
+ /**
+ * End an array. This method most be called to balance calls to
+ * <code>array</code>.
+ * @return this
+ * @throws JSONException If incorrectly nested.
+ */
+ public JSONWriter endArray() throws JSONException {
+ return this.end('a', ']');
+ }
+
+ /**
+ * End an object. This method most be called to balance calls to
+ * <code>object</code>.
+ * @return this
+ * @throws JSONException If incorrectly nested.
+ */
+ public JSONWriter endObject() throws JSONException {
+ return this.end('k', '}');
+ }
+
+ /**
+ * Append a key. The key will be associated with the next value. In an
+ * object, every value must be preceded by a key.
+ * @param string A key string.
+ * @return this
+ * @throws JSONException If the key is out of place. For example, keys
+ * do not belong in arrays or if the key is null.
+ */
+ public JSONWriter key(String string) throws JSONException {
+ if (string == null) {
+ throw new JSONException("Null key.");
+ }
+ if (this.mode == 'k') {
+ try {
+ this.stack[this.top - 1].putOnce(string, Boolean.TRUE);
+ if (this.comma) {
+ this.writer.write(',');
+ }
+ this.writer.write(JSONObject.quote(string));
+ this.writer.write(':');
+ this.comma = false;
+ this.mode = 'o';
+ return this;
+ } catch (IOException e) {
+ throw new JSONException(e);
+ }
+ }
+ throw new JSONException("Misplaced key.");
+ }
+
+
+ /**
+ * Begin appending a new object. All keys and values until the balancing
+ * <code>endObject</code> will be appended to this object. The
+ * <code>endObject</code> method must be called to mark the object's end.
+ * @return this
+ * @throws JSONException If the nesting is too deep, or if the object is
+ * started in the wrong place (for example as a key or after the end of the
+ * outermost array or object).
+ */
+ public JSONWriter object() throws JSONException {
+ if (this.mode == 'i') {
+ this.mode = 'o';
+ }
+ if (this.mode == 'o' || this.mode == 'a') {
+ this.append("{");
+ this.push(new JSONObject());
+ this.comma = false;
+ return this;
+ }
+ throw new JSONException("Misplaced object.");
+
+ }
+
+
+ /**
+ * Pop an array or object scope.
+ * @param c The scope to close.
+ * @throws JSONException If nesting is wrong.
+ */
+ private void pop(char c) throws JSONException {
+ if (this.top <= 0) {
+ throw new JSONException("Nesting error.");
+ }
+ char m = this.stack[this.top - 1] == null ? 'a' : 'k';
+ if (m != c) {
+ throw new JSONException("Nesting error.");
+ }
+ this.top -= 1;
+ this.mode = this.top == 0
+ ? 'd'
+ : this.stack[this.top - 1] == null
+ ? 'a'
+ : 'k';
+ }
+
+ /**
+ * Push an array or object scope.
+ * @param jo the JSON object
+ * @throws JSONException If nesting is too deep.
+ */
+ private void push(JSONObject jo) throws JSONException {
+ if (this.top >= maxdepth) {
+ throw new JSONException("Nesting too deep.");
+ }
+ this.stack[this.top] = jo;
+ this.mode = jo == null ? 'a' : 'k';
+ this.top += 1;
+ }
+
+
+ /**
+ * Append either the value <code>true</code> or the value
+ * <code>false</code>.
+ * @param b A boolean.
+ * @return this
+ * @throws JSONException
+ */
+ public JSONWriter value(boolean b) throws JSONException {
+ return this.append(b ? "true" : "false");
+ }
+
+ /**
+ * Append a double value.
+ * @param d A double.
+ * @return this
+ * @throws JSONException If the number is not finite.
+ */
+ public JSONWriter value(double d) throws JSONException {
+ return this.value(new Double(d));
+ }
+
+ /**
+ * Append a long value.
+ * @param l A long.
+ * @return this
+ * @throws JSONException
+ */
+ public JSONWriter value(long l) throws JSONException {
+ return this.append(Long.toString(l));
+ }
+
+
+ /**
+ * Append an object value.
+ * @param object The object to append. It can be null, or a Boolean, Number,
+ * String, JSONObject, or JSONArray, or an object that implements JSONString.
+ * @return this
+ * @throws JSONException If the value is out of sequence.
+ */
+ public JSONWriter value(Object object) throws JSONException {
+ return this.append(JSONObject.valueToString(object));
+ }
+}
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
index 5b6ef55..3618050 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/IPageProvider.java
@@ -38,8 +38,9 @@ public interface IPageProvider
* @throws StalePageException
* if render count has been specified in constructor and the render count of page
* does not match the value
- * @throws {@link PageExpiredException} if the specified page could not have been found and the
- * constructor used did not provide enough information to create new page instance
+ * @throws {@link org.apache.wicket.protocol.http.PageExpiredException} if the specified page
+ * could not have been found and the constructor used did not provide enough information
+ * to create new page instance
*/
IRequestablePage getPageInstance();
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageAndComponentProvider.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageAndComponentProvider.java b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageAndComponentProvider.java
index f4230c2..a2723b3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageAndComponentProvider.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageAndComponentProvider.java
@@ -149,7 +149,7 @@ public class PageAndComponentProvider extends PageProvider implements IPageAndCo
}
/**
- * @see org.apache.wicket.request.handler.IPageAndComponentProvider#getComponent()
+ * @see org.apache.wicket.core.request.handler.IPageAndComponentProvider#getComponent()
*/
@Override
public IRequestableComponent getComponent()
@@ -186,7 +186,7 @@ public class PageAndComponentProvider extends PageProvider implements IPageAndCo
}
/**
- * @see org.apache.wicket.request.handler.IPageAndComponentProvider#getComponentPath()
+ * @see org.apache.wicket.core.request.handler.IPageAndComponentProvider#getComponentPath()
*/
@Override
public String getComponentPath()
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/PackageMapper.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/PackageMapper.java b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/PackageMapper.java
index 37b9166..54729e9 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/PackageMapper.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/PackageMapper.java
@@ -96,7 +96,7 @@ public class PackageMapper extends AbstractBookmarkableMapper
}
/**
- * @see org.apache.wicket.request.mapper.AbstractBookmarkableMapper#buildUrl(org.apache.wicket.request.mapper.AbstractBookmarkableMapper.UrlInfo)
+ * @see org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper#buildUrl(UrlInfo)
*/
@Override
protected Url buildUrl(UrlInfo info)
@@ -124,7 +124,7 @@ public class PackageMapper extends AbstractBookmarkableMapper
}
/**
- * @see org.apache.wicket.request.mapper.AbstractBookmarkableMapper#parseRequest(org.apache.wicket.request.Request)
+ * @see org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper#parseRequest(org.apache.wicket.request.Request)
*/
@Override
protected UrlInfo parseRequest(Request request)
@@ -211,7 +211,7 @@ public class PackageMapper extends AbstractBookmarkableMapper
}
/**
- * @see org.apache.wicket.request.mapper.AbstractBookmarkableMapper#pageMustHaveBeenCreatedBookmarkable()
+ * @see org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper#pageMustHaveBeenCreatedBookmarkable()
*/
@Override
protected boolean pageMustHaveBeenCreatedBookmarkable()
@@ -220,7 +220,7 @@ public class PackageMapper extends AbstractBookmarkableMapper
}
/**
- * @see org.apache.wicket.request.mapper.AbstractBookmarkableMapper#getCompatibilityScore(org.apache.wicket.request.Request)
+ * @see org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper#getCompatibilityScore(org.apache.wicket.request.Request)
*/
@Override
public int getCompatibilityScore(Request request)
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/core/util/resource/locator/OsgiResourceStreamLocator.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/locator/OsgiResourceStreamLocator.java b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/locator/OsgiResourceStreamLocator.java
index 9037c8a..8f1ae20 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/locator/OsgiResourceStreamLocator.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/locator/OsgiResourceStreamLocator.java
@@ -45,7 +45,7 @@ public class OsgiResourceStreamLocator extends ResourceStreamLocator
/**
*
- * @see org.apache.wicket.util.resource.locator.ResourceStreamLocator#locate(java.lang.Class,
+ * @see org.apache.wicket.core.util.resource.locator.ResourceStreamLocator#locate(java.lang.Class,
* java.lang.String)
*/
@Override
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index af5f0f3..37bdd23 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -127,8 +127,8 @@ import org.apache.wicket.util.lang.Args;
* Other methods like {@link #remove()}, {@link #get(int)}, {@link #iterator()}, etc. are not
* aliased to work on the border's body and attention must be paid when they need to be used.
*
- * @see PanelBorder An alternative implementation based on Panel
- * @see BorderBehavior A behavior which add (raw) markup before and after the component
+ * @see BorderPanel An alternative implementation based on Panel
+ * @see BorderBehavior A behavior which adds (raw) markup before and after the component
*
* @author Jonathan Locke
* @author Juergen Donnerstag
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java
index 57600fe..c194333 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/BorderPanel.java
@@ -1,131 +1,131 @@
-/*
- * 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.markup.html.border;
-
-import org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy;
-import org.apache.wicket.model.IModel;
-
-/**
- * Whereas a Panel replaces the body markup with the associated markup file, a BorderPanel assumes a
- * that Body component renders the body markup including any number of Wicket Components.
- * <p>
- * Example:
- *
- * <pre>
- * <u>MyPage.html</u>
- * ...
- * <div wicket:id="myPanel">
- * ...
- * <div wicket:id="componentInBody"/>
- * ...
- * </div>
- *
- * <u>MyPage.java</u>
- * ...
- * public MyPage extends WebPage {
- * ...
- * public MyPage() {
- * ...
- * MyPanel border = new MyPanel("myPanel");
- * add(border);
- * border.getBodyContainer().add(new MyComponent("componentInBody"));
- * ...
- * }
- * ...
- * }
- *
- * <u>MyPanel.java</u>
- * ...
- * public MyPanel extends BorderPanel {
- * ...
- * public MyPanel(final String id) {
- * super(id);
- * ...
- * add(newBodyContainer("body"));
- * ...
- * }
- * }
- * </pre>
- *
- * @see BorderBehavior A behavior which add (raw) markup before and after the component
- *
- * @author Juergen Donnerstag
- */
-public abstract class BorderPanel extends Panel
-{
- private static final long serialVersionUID = 1L;
-
- private Body body;
-
- /**
- * @see org.apache.wicket.Component#Component(String)
- */
- public BorderPanel(final String id)
- {
- this(id, null);
- }
-
- /**
- * @see org.apache.wicket.Component#Component(String, IModel)
- */
- public BorderPanel(final String id, final IModel<?> model)
- {
- super(id, model);
- }
-
- @Override
- protected IMarkupSourcingStrategy newMarkupSourcingStrategy()
- {
- return new PanelMarkupSourcingStrategy(true);
- }
-
- /**
- * Sets the body container
- *
- * @param body
- * @return The body component
- */
- public final Body setBodyContainer(final Body body)
- {
- this.body = body;
- return body;
- }
-
- /**
- * Provide easy access to the Body component.
- *
- * @return The body container
- */
- public final Body getBodyContainer()
- {
- return body;
- }
-
- /**
- * Create a new body container identified by id in the panel's markup
- *
- * @param id
- * @return Body component
- */
- public final Body newBodyContainer(final String id)
- {
- body = new Body(id, this);
- return body;
- }
-}
+/*
+ * 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.markup.html.border;
+
+import org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy;
+import org.apache.wicket.model.IModel;
+
+/**
+ * Whereas a Panel replaces the body markup with the associated markup file, a BorderPanel assumes a
+ * that Body component renders the body markup including any number of Wicket Components.
+ * <p>
+ * Example:
+ *
+ * <pre>
+ * <u>MyPage.html</u>
+ * ...
+ * <div wicket:id="myPanel">
+ * ...
+ * <div wicket:id="componentInBody"/>
+ * ...
+ * </div>
+ *
+ * <u>MyPage.java</u>
+ * ...
+ * public MyPage extends WebPage {
+ * ...
+ * public MyPage() {
+ * ...
+ * MyPanel border = new MyPanel("myPanel");
+ * add(border);
+ * border.getBodyContainer().add(new MyComponent("componentInBody"));
+ * ...
+ * }
+ * ...
+ * }
+ *
+ * <u>MyPanel.java</u>
+ * ...
+ * public MyPanel extends BorderPanel {
+ * ...
+ * public MyPanel(final String id) {
+ * super(id);
+ * ...
+ * add(newBodyContainer("body"));
+ * ...
+ * }
+ * }
+ * </pre>
+ *
+ * @see BorderBehavior A behavior which adds (raw) markup before and after the component
+ *
+ * @author Juergen Donnerstag
+ */
+public abstract class BorderPanel extends Panel
+{
+ private static final long serialVersionUID = 1L;
+
+ private Body body;
+
+ /**
+ * @see org.apache.wicket.Component#Component(String)
+ */
+ public BorderPanel(final String id)
+ {
+ this(id, null);
+ }
+
+ /**
+ * @see org.apache.wicket.Component#Component(String, IModel)
+ */
+ public BorderPanel(final String id, final IModel<?> model)
+ {
+ super(id, model);
+ }
+
+ @Override
+ protected IMarkupSourcingStrategy newMarkupSourcingStrategy()
+ {
+ return new PanelMarkupSourcingStrategy(true);
+ }
+
+ /**
+ * Sets the body container
+ *
+ * @param body
+ * @return The body component
+ */
+ public final Body setBodyContainer(final Body body)
+ {
+ this.body = body;
+ return body;
+ }
+
+ /**
+ * Provide easy access to the Body component.
+ *
+ * @return The body container
+ */
+ public final Body getBodyContainer()
+ {
+ return body;
+ }
+
+ /**
+ * Create a new body container identified by id in the panel's markup
+ *
+ * @param id
+ * @return Body component
+ */
+ public final Body newBodyContainer(final String id)
+ {
+ body = new Body(id, this);
+ return body;
+ }
+}
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/markup/html/form/RangeTextField.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/RangeTextField.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/RangeTextField.java
index deaabcb..4f3b023 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/RangeTextField.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/RangeTextField.java
@@ -22,8 +22,8 @@ import org.apache.wicket.model.IModel;
* A {@link TextField} for HTML5 <input> with type <em>range</em>.
*
* <p>
- * Automatically validates the input against the configured {@link #setMinimum(Double) min} and
- * {@link #setMaximum(Double) max} attributes. If any of them is <code>null</code> then
+ * Automatically validates the input against the configured {@link #setMinimum(Number)} min} and
+ * {@link #setMaximum(Number)} max} attributes. If any of them is <code>null</code> then
* {@link Double#MIN_VALUE} and {@link Double#MAX_VALUE} are used respectfully.
*
* @param <N>
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java
index a53a910..b39331f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java
@@ -229,7 +229,7 @@ public class DefaultButtonImageResource extends RenderedDynamicImageResource
/**
* Renders button image.
*
- * @see RenderedDynamicImageResource#render(Graphics2D)
+ * @see RenderedDynamicImageResource#render(java.awt.Graphics2D, Attributes)
*/
@Override
protected boolean render(Graphics2D graphics, Attributes attributes)
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.java
index 1a64941..3f5452b 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.java
@@ -34,7 +34,7 @@ import org.apache.wicket.settings.IRequestCycleSettings;
* <p>
* This page uses a form post right after the page has loaded in the browser, using JavaScript or
* alternative means to detect and pass on settings to the embedded form. The form submit method
- * updates this session's {@link org.apache.wicket.request.ClientInfo} object and then redirects to
+ * updates this session's {@link org.apache.wicket.core.request.ClientInfo} object and then redirects to
* the original location as was passed in as a URL argument in the constructor.
* </p>
* <p>
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/EmptyDataProvider.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/EmptyDataProvider.java b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/EmptyDataProvider.java
index 29ba057..eac95b2 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/EmptyDataProvider.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/EmptyDataProvider.java
@@ -46,7 +46,7 @@ public class EmptyDataProvider<T> implements IDataProvider<T>
}
/**
- * @see IDataProvider#iterator(int, int)
+ * @see IDataProvider#iterator(long, long)
*/
@Override
public Iterator<T> iterator(long first, long count)
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/IDataProvider.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/IDataProvider.java b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/IDataProvider.java
index 870afc9..c98938d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/IDataProvider.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/IDataProvider.java
@@ -84,7 +84,7 @@ public interface IDataProvider<T> extends IDetachable
/**
* Callback used by the consumer of this data provider to wrap objects retrieved from
- * {@link #iterator(int, int)} with a model (usually a detachable one).
+ * {@link #iterator(long, long)} with a model (usually a detachable one).
*
* @param object
* the object that needs to be wrapped
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/pageStore/IPageStore.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/pageStore/IPageStore.java b/wicket-core/src/main/java/org/apache/wicket/pageStore/IPageStore.java
index 5953e64..5fe3cf6 100644
--- a/wicket-core/src/main/java/org/apache/wicket/pageStore/IPageStore.java
+++ b/wicket-core/src/main/java/org/apache/wicket/pageStore/IPageStore.java
@@ -90,8 +90,6 @@ public interface IPageStore
* This method should restore the serialized page to intermediate object that can be converted
* to real page instance using {@link #convertToPage(Object)}.
*
- * @param sessionId
- * The session of the page that must be removed
* @param serializable
* @return Page
*/
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java b/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java
index ffcf643..39907d3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java
+++ b/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java
@@ -25,7 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * A {@link DataStore} which stores the pages in the {@link HttpSession}. Uses
+ * A {@link IDataStore} which stores the pages in the {@link HttpSession}. Uses
* {@link IDataStoreEvictionStrategy} to keep the memory footprint reasonable.
*
* <p>
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycleListenerCollection.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycleListenerCollection.java b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycleListenerCollection.java
index c856313..0434913 100644
--- a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycleListenerCollection.java
+++ b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycleListenerCollection.java
@@ -1,213 +1,213 @@
-/*
- * 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.cycle;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.wicket.request.IRequestHandler;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.util.listener.ListenerCollection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Composite {@link IRequestCycleListener} that notifies all registered listeners with each
- * IRequestCycleListener event.
- * <p>
- * <h3>Order of notification</h3>
- * <p>
- * {@link #onBeginRequest(RequestCycle)}, {@link #onRequestHandlerScheduled(IRequestHandler)} and
- * {@link #onRequestHandlerResolved(IRequestHandler)} are notified in first in, first out order.
- * <p>
- * {@link #onEndRequest(RequestCycle)} and {@link #onDetach(RequestCycle)} are notified in last in
- * first out order (i.e. reversed order). So for these events the collection functions as a stack.
- * <p>
- * <h3>Exception handling</h3>
- * <p>
- * The {@code RequestCycleListenerCollection} will use the first exception handler that is returned
- * from all listeners in {@link #onException(RequestCycle, Exception)}
- */
-public class RequestCycleListenerCollection extends ListenerCollection<IRequestCycleListener>
- implements
- IRequestCycleListener
-{
- private static final Logger logger = LoggerFactory.getLogger(RequestCycleListenerCollection.class);
- private static final long serialVersionUID = 1L;
-
- /**
- * Notifies all registered listeners of the onBeginRequest event in first in first out order,
- * i.e. the listener that is the first element of this collection is the first listener to be
- * notified of {@code onBeginRequest}.
- */
- @Override
- public void onBeginRequest(final RequestCycle cycle)
- {
- notify(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- listener.onBeginRequest(cycle);
- }
- });
- }
-
- /**
- * Notifies all registered listeners of the {@code onEndRequest} event in first in last out
- * order (i.e. the last listener that received an {@code #onBeginRequest} will be the first to
- * get notified of an {@code onEndRequest}.
- *
- * @see IRequestCycleListener#onEndRequest(RequestCycle)
- */
- @Override
- public void onEndRequest(final RequestCycle cycle)
- {
- reversedNotify(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- listener.onEndRequest(cycle);
- }
- });
- }
-
- /**
- * Notifies all registered listeners of the {@code onDetach} event in first in last out order
- * (i.e. the last listener that received an {@code #onBeginRequest} will be the first to get
- * notified of an {@code onDetach}.
- *
- * @see IRequestCycleListener#onDetach(RequestCycle)
- */
- @Override
- public void onDetach(final RequestCycle cycle)
- {
- reversedNotifyIgnoringExceptions(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- listener.onDetach(cycle);
- }
- });
- }
-
- /**
- * Notifies all registered listeners of the exception and calls the first handler that was
- * returned by the listeners.
- *
- * @see IRequestCycleListener#onException(RequestCycle, Exception)
- */
- @Override
- public IRequestHandler onException(final RequestCycle cycle, final Exception ex)
- {
- final List<IRequestHandler> handlers = new ArrayList<IRequestHandler>();
-
- notify(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- IRequestHandler handler = listener.onException(cycle, ex);
- if (handler != null)
- {
- handlers.add(handler);
- }
- }
- });
-
- if (handlers.isEmpty())
- {
- return null;
- }
- if (handlers.size() > 1)
- {
- logger.debug(
- "{} exception handlers available for exception {}, using the first handler",
- handlers.size(), ex);
- }
- return handlers.get(0);
- }
-
- @Override
- public void onRequestHandlerResolved(final RequestCycle cycle, final IRequestHandler handler)
- {
- notify(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- listener.onRequestHandlerResolved(cycle, handler);
- }
- });
- }
-
- @Override
- public void onExceptionRequestHandlerResolved(final RequestCycle cycle,
- final IRequestHandler handler, final Exception exception)
- {
- notify(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- listener.onExceptionRequestHandlerResolved(cycle, handler, exception);
- }
- });
- }
-
- @Override
- public void onRequestHandlerScheduled(final RequestCycle cycle, final IRequestHandler handler)
- {
- notify(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- listener.onRequestHandlerScheduled(cycle, handler);
- }
- });
- }
-
- @Override
- public void onRequestHandlerExecuted(final RequestCycle cycle, final IRequestHandler handler)
- {
- notify(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- listener.onRequestHandlerExecuted(cycle, handler);
- }
- });
- }
-
- @Override
- public void onUrlMapped(final RequestCycle cycle, final IRequestHandler handler, final Url url)
- {
- notify(new INotifier<IRequestCycleListener>()
- {
- @Override
- public void notify(IRequestCycleListener listener)
- {
- listener.onUrlMapped(cycle, handler, url);
- }
- });
-
- }
-}
+/*
+ * 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.cycle;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.wicket.request.IRequestHandler;
+import org.apache.wicket.request.Url;
+import org.apache.wicket.util.listener.ListenerCollection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Composite {@link IRequestCycleListener} that notifies all registered listeners with each
+ * IRequestCycleListener event.
+ * <p>
+ * <h3>Order of notification</h3>
+ * <p>
+ * {@link #onBeginRequest(RequestCycle)}, {@link #onRequestHandlerScheduled(RequestCycle, IRequestHandler)} and
+ * {@link #onRequestHandlerResolved(RequestCycle, IRequestHandler)} are notified in first in, first out order.
+ * <p>
+ * {@link #onEndRequest(RequestCycle)} and {@link #onDetach(RequestCycle)} are notified in last in
+ * first out order (i.e. reversed order). So for these events the collection functions as a stack.
+ * <p>
+ * <h3>Exception handling</h3>
+ * <p>
+ * The {@code RequestCycleListenerCollection} will use the first exception handler that is returned
+ * from all listeners in {@link #onException(RequestCycle, Exception)}
+ */
+public class RequestCycleListenerCollection extends ListenerCollection<IRequestCycleListener>
+ implements
+ IRequestCycleListener
+{
+ private static final Logger logger = LoggerFactory.getLogger(RequestCycleListenerCollection.class);
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Notifies all registered listeners of the onBeginRequest event in first in first out order,
+ * i.e. the listener that is the first element of this collection is the first listener to be
+ * notified of {@code onBeginRequest}.
+ */
+ @Override
+ public void onBeginRequest(final RequestCycle cycle)
+ {
+ notify(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ listener.onBeginRequest(cycle);
+ }
+ });
+ }
+
+ /**
+ * Notifies all registered listeners of the {@code onEndRequest} event in first in last out
+ * order (i.e. the last listener that received an {@code #onBeginRequest} will be the first to
+ * get notified of an {@code onEndRequest}.
+ *
+ * @see IRequestCycleListener#onEndRequest(RequestCycle)
+ */
+ @Override
+ public void onEndRequest(final RequestCycle cycle)
+ {
+ reversedNotify(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ listener.onEndRequest(cycle);
+ }
+ });
+ }
+
+ /**
+ * Notifies all registered listeners of the {@code onDetach} event in first in last out order
+ * (i.e. the last listener that received an {@code #onBeginRequest} will be the first to get
+ * notified of an {@code onDetach}.
+ *
+ * @see IRequestCycleListener#onDetach(RequestCycle)
+ */
+ @Override
+ public void onDetach(final RequestCycle cycle)
+ {
+ reversedNotifyIgnoringExceptions(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ listener.onDetach(cycle);
+ }
+ });
+ }
+
+ /**
+ * Notifies all registered listeners of the exception and calls the first handler that was
+ * returned by the listeners.
+ *
+ * @see IRequestCycleListener#onException(RequestCycle, Exception)
+ */
+ @Override
+ public IRequestHandler onException(final RequestCycle cycle, final Exception ex)
+ {
+ final List<IRequestHandler> handlers = new ArrayList<IRequestHandler>();
+
+ notify(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ IRequestHandler handler = listener.onException(cycle, ex);
+ if (handler != null)
+ {
+ handlers.add(handler);
+ }
+ }
+ });
+
+ if (handlers.isEmpty())
+ {
+ return null;
+ }
+ if (handlers.size() > 1)
+ {
+ logger.debug(
+ "{} exception handlers available for exception {}, using the first handler",
+ handlers.size(), ex);
+ }
+ return handlers.get(0);
+ }
+
+ @Override
+ public void onRequestHandlerResolved(final RequestCycle cycle, final IRequestHandler handler)
+ {
+ notify(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ listener.onRequestHandlerResolved(cycle, handler);
+ }
+ });
+ }
+
+ @Override
+ public void onExceptionRequestHandlerResolved(final RequestCycle cycle,
+ final IRequestHandler handler, final Exception exception)
+ {
+ notify(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ listener.onExceptionRequestHandlerResolved(cycle, handler, exception);
+ }
+ });
+ }
+
+ @Override
+ public void onRequestHandlerScheduled(final RequestCycle cycle, final IRequestHandler handler)
+ {
+ notify(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ listener.onRequestHandlerScheduled(cycle, handler);
+ }
+ });
+ }
+
+ @Override
+ public void onRequestHandlerExecuted(final RequestCycle cycle, final IRequestHandler handler)
+ {
+ notify(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ listener.onRequestHandlerExecuted(cycle, handler);
+ }
+ });
+ }
+
+ @Override
+ public void onUrlMapped(final RequestCycle cycle, final IRequestHandler handler, final Url url)
+ {
+ notify(new INotifier<IRequestCycleListener>()
+ {
+ @Override
+ public void notify(IRequestCycleListener listener)
+ {
+ listener.onUrlMapped(cycle, handler, url);
+ }
+ });
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java b/wicket-core/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java
index 6e24c09..57fb235 100644
--- a/wicket-core/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java
+++ b/wicket-core/src/main/java/org/apache/wicket/resource/loader/ClassStringResourceLoader.java
@@ -67,7 +67,7 @@ public class ClassStringResourceLoader extends ComponentStringResourceLoader
/**
* @see org.apache.wicket.resource.loader.ComponentStringResourceLoader#loadStringResource(org.apache.wicket.Component,
- * java.lang.String, java.util.Locale, java.lang.String)
+ * String, java.util.Locale, String, String)
*/
@Override
public String loadStringResource(final Component component, final String key,
http://git-wip-us.apache.org/repos/asf/wicket/blob/02224b73/wicket-core/src/main/java/org/apache/wicket/util/template/TextTemplate.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/util/template/TextTemplate.java b/wicket-core/src/main/java/org/apache/wicket/util/template/TextTemplate.java
index f35d0c6..2b4b5e3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/template/TextTemplate.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/template/TextTemplate.java
@@ -75,7 +75,7 @@ public abstract class TextTemplate extends AbstractStringResourceStream
}
/**
- * @see org.apache.wicket.util.resource.AbstractResourceStream#asString()
+ * @see org.apache.wicket.util.resource.AbstractStringResourceStream#asString()
*/
@Override
public String asString()