Small code cleaning to BasicResourceReferenceMapper

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1408c944
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1408c944
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1408c944

Branch: refs/heads/master
Commit: 1408c9444408001be150aa11c45d1f6865f105d0
Parents: ffeb024
Author: Andrea Del Bene <adelb...@apache.org>
Authored: Sat Aug 5 12:43:43 2017 +0200
Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
Committed: Sun Aug 6 14:59:34 2017 +0300

----------------------------------------------------------------------
 .../mapper/BasicResourceReferenceMapper.java        | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/1408c944/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java
index d0f1375..2c533bc 100755
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java
@@ -204,19 +204,9 @@ public class BasicResourceReferenceMapper extends 
AbstractResourceReferenceMappe
                        segments.add(getClassName(reference.getScope()));
 
                        // setup resource parameters
-                       PageParameters parameters = 
referenceRequestHandler.getPageParameters();
-
-                       if (parameters == null)
-                       {
-                               parameters = new PageParameters();
-                       }
-                       else
-                       {
-                               parameters = new PageParameters(parameters);
-
-                               // need to remove indexed parameters otherwise 
the URL won't be able to decode
-                               parameters.clearIndexed();
-                       }
+                       PageParameters parameters = new 
PageParameters(referenceRequestHandler.getPageParameters());
+                       // need to remove indexed parameters otherwise the URL 
won't be able to decode
+                       parameters.clearIndexed();
 
                        ResourceUtil.encodeResourceReferenceAttributes(url, 
reference);
 

Reply via email to