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 2014/02/18 10:31:06 UTC
[2/3] git commit: Java 7 multi-catch
Java 7 multi-catch
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/77cee0a0
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/77cee0a0
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/77cee0a0
Branch: refs/heads/master
Commit: 77cee0a07e2b30c3aaa6229c51d2214ca087e412
Parents: 7f8c672
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue Feb 18 11:02:31 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue Feb 18 11:02:31 2014 +0200
----------------------------------------------------------------------
.../java/org/apache/wicket/util/encoding/UrlEncoder.java | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/77cee0a0/wicket-util/src/main/java/org/apache/wicket/util/encoding/UrlEncoder.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/encoding/UrlEncoder.java b/wicket-util/src/main/java/org/apache/wicket/util/encoding/UrlEncoder.java
index 61e57a6..fb26bc4 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/encoding/UrlEncoder.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/encoding/UrlEncoder.java
@@ -265,11 +265,7 @@ public class UrlEncoder
{
charset = Charset.forName(charsetName);
}
- catch (IllegalCharsetNameException e)
- {
- throw new RuntimeException(new UnsupportedEncodingException(charsetName));
- }
- catch (UnsupportedCharsetException e)
+ catch (IllegalCharsetNameException | UnsupportedCharsetException e)
{
throw new RuntimeException(new UnsupportedEncodingException(charsetName));
}
@@ -285,7 +281,7 @@ public class UrlEncoder
}
// System.out.println("Examining character: " + c);
- if ((stopEncoding == true) || dontNeedEncoding.get(c))
+ if (stopEncoding || dontNeedEncoding.get(c))
{
if (c == ' ')
{
@@ -360,4 +356,4 @@ public class UrlEncoder
return out.toString();
}
-}
\ No newline at end of file
+}