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 2013/05/03 10:58:25 UTC
[06/27] git commit: WICKET-4664 Formatting
WICKET-4664 Formatting
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2a77821a
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2a77821a
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2a77821a
Branch: refs/heads/wicket-4774
Commit: 2a77821ae08cb5880060e885ffaf1934891d79a0
Parents: c2d271b
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed May 1 11:29:28 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu May 2 15:56:46 2013 +0200
----------------------------------------------------------------------
.../apache/wicket/protocol/http/RequestUtils.java | 2 +-
.../wicket/protocol/http/RequestUtilsTest.java | 116 +++++++-------
2 files changed, 59 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/2a77821a/wicket-core/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java
index 023c7d3..9c16040 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/RequestUtils.java
@@ -94,7 +94,7 @@ public final class RequestUtils
public static String removeDoubleDots(String path)
{
String[] segments = Strings.split(path, '/');
- List<String> newcomponents = new ArrayList<String>(Arrays.asList(segments));
+ List<String> newcomponents = new ArrayList<>(Arrays.asList(segments));
for (int i = 0; i < newcomponents.size(); i++)
{
http://git-wip-us.apache.org/repos/asf/wicket/blob/2a77821a/wicket-core/src/test/java/org/apache/wicket/protocol/http/RequestUtilsTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/protocol/http/RequestUtilsTest.java b/wicket-core/src/test/java/org/apache/wicket/protocol/http/RequestUtilsTest.java
index c800e87..bfcfa14 100644
--- a/wicket-core/src/test/java/org/apache/wicket/protocol/http/RequestUtilsTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/protocol/http/RequestUtilsTest.java
@@ -29,9 +29,9 @@ import org.junit.Test;
public class RequestUtilsTest extends Assert
{
- public static final Charset UTF_8_CHARSET = Charset.forName("UTF-8");
+ public static final Charset UTF_8_CHARSET = Charset.forName("UTF-8");
- /**
+ /**
*
*/
@Test
@@ -104,71 +104,71 @@ public class RequestUtilsTest extends Assert
}
- /**
- * WICKET-4664 - remove leading ? if present
- */
- @Test
+ /**
+ * WICKET-4664 - remove leading ? if present
+ */
+ @Test
public void removeLeadingQuestionMark_simpleParam()
{
- final PageParameters params = new PageParameters();
+ final PageParameters params = new PageParameters();
RequestUtils.decodeParameters("?key=value", params, UTF_8_CHARSET);
- assertEquals("value", params.get("key").toString());
+ assertEquals("value", params.get("key").toString());
}
- /**
- * WICKET-4664 - remove leading ? if present
- */
- @Test
+ /**
+ * WICKET-4664 - remove leading ? if present
+ */
+ @Test
public void removeLeadingQuestionMark_simpleParamWithoutValueAndAnotherParam()
{
final PageParameters params = new PageParameters();
RequestUtils.decodeParameters("?123&key=value", params, UTF_8_CHARSET);
- assertEquals("", params.get("123").toString());
- assertEquals("value", params.get("key").toString());
+ assertEquals("", params.get("123").toString());
+ assertEquals("value", params.get("key").toString());
+ }
+
+ /**
+ * WICKET-4664 - remove leading ? if present
+ */
+ @Test
+ public void removeLeadingQuestionMark_simpleParamWithoutValue()
+ {
+ final PageParameters params = new PageParameters();
+ RequestUtils.decodeParameters("?123", params, UTF_8_CHARSET);
+ assertEquals("", params.get("123").toString());
}
- /**
- * WICKET-4664 - remove leading ? if present
- */
- @Test
- public void removeLeadingQuestionMark_simpleParamWithoutValue()
- {
- final PageParameters params = new PageParameters();
- RequestUtils.decodeParameters("?123", params, UTF_8_CHARSET);
- assertEquals("", params.get("123").toString());
- }
-
- /**
- *
- */
- @Test
- public void decodeParam_simpleParam_noQuestionMark()
- {
- final PageParameters params = new PageParameters();
- RequestUtils.decodeParameters("key=value", params, UTF_8_CHARSET);
- assertEquals("value", params.get("key").toString());
- }
-
- /**
- *
- */
- @Test
- public void decodeParam_simpleParamWithoutValueAndAnotherParam_NoQuestionMark()
- {
- final PageParameters params = new PageParameters();
- RequestUtils.decodeParameters("123&key=value", params, UTF_8_CHARSET);
- assertEquals("", params.get("123").toString());
- assertEquals("value", params.get("key").toString());
- }
-
- /**
- *
- */
- @Test
- public void decodeParam_simpleParamWithoutValue_NoQuestionMark()
- {
- final PageParameters params = new PageParameters();
- RequestUtils.decodeParameters("123", params, UTF_8_CHARSET);
- assertEquals("", params.get("123").toString());
- }
+ /**
+ *
+ */
+ @Test
+ public void decodeParam_simpleParam_noQuestionMark()
+ {
+ final PageParameters params = new PageParameters();
+ RequestUtils.decodeParameters("key=value", params, UTF_8_CHARSET);
+ assertEquals("value", params.get("key").toString());
+ }
+
+ /**
+ *
+ */
+ @Test
+ public void decodeParam_simpleParamWithoutValueAndAnotherParam_NoQuestionMark()
+ {
+ final PageParameters params = new PageParameters();
+ RequestUtils.decodeParameters("123&key=value", params, UTF_8_CHARSET);
+ assertEquals("", params.get("123").toString());
+ assertEquals("value", params.get("key").toString());
+ }
+
+ /**
+ *
+ */
+ @Test
+ public void decodeParam_simpleParamWithoutValue_NoQuestionMark()
+ {
+ final PageParameters params = new PageParameters();
+ RequestUtils.decodeParameters("123", params, UTF_8_CHARSET);
+ assertEquals("", params.get("123").toString());
+ }
}