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/d062ac55
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d062ac55
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d062ac55

Branch: refs/heads/master
Commit: d062ac55dd83b0cf4c262295ff504687daaa4c29
Parents: b16b075
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:53:00 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/wicket/blob/d062ac55/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