[ 
https://issues.apache.org/jira/browse/WICKET-6794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17896295#comment-17896295
 ] 

ASF GitHub Bot commented on WICKET-6794:
----------------------------------------

dougdonohoe commented on code in PR #436:
URL: https://github.com/apache/wicket/pull/436#discussion_r1832612129


##########
wicket-util/src/main/java/org/apache/wicket/util/encoding/UrlDecoder.java:
##########
@@ -16,25 +16,24 @@
  */
 package org.apache.wicket.util.encoding;
 
+import java.io.ByteArrayOutputStream;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.nio.charset.IllegalCharsetNameException;
 import java.nio.charset.UnsupportedCharsetException;
 
 import org.apache.wicket.util.lang.Args;
-import org.apache.wicket.util.string.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Adapted from java.net.URLDecoder, but defines instances for query string 
decoding versus URL path
+ * Adapted from Spring Framework's UriUtils class, but defines instances for 
query string decoding versus URL path
  * component decoding.
  * <p/>
  * The difference is important because a space is encoded as a + in a query 
string, but this is a
  * valid value in a path component (and is therefore not decode back to a 
space).
- * 
- * @author Doug Donohoe
- * @see java.net.URLDecoder
+ *
+ * @author Thomas Heigl

Review Comment:
   I happened to be looking at Wicket source code again and noticed this 
change.  I'm the original author of the UrlDecode, originating back in 2008 in 
https://issues.apache.org/jira/browse/WICKET-1627.
   
   This @author change is not cool.  It should at least be:
   
   ```
   @author Doug Donohoe
   @author Thomas Heigl
   ```
   
   CC: @theigl 





> Improve performance of UrlEncoder and UrlDecoder
> ------------------------------------------------
>
>                 Key: WICKET-6794
>                 URL: https://issues.apache.org/jira/browse/WICKET-6794
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-core
>    Affects Versions: 9.0.0-M5
>            Reporter: Thomas Heigl
>            Assignee: Thomas Heigl
>            Priority: Minor
>             Fix For: 9.0.0
>
>
> Wicket's {{UrlEncoder}} and {{UrlDecoder}} are customized versions of 
> {{java.net.URLEncoder}} adapted to support conditional encoding of space for 
> paths vs queries.
> The implementation of {{java.net.URLEncoder}} is far from optimal and 
> frameworks such as Spring and Apache HttpClient use their own, much faster 
> implementations.
> Since both of these classes showed up prominently in my production profiler, 
> I would suggest to replace the current implementation with the quite elegant 
> one in Spring's {{UriUtils}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to