shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kalle Korhonen <kalle.o.korho...@gmail.com>
Subject Re: svn commit: r1021622 - /shiro/trunk/web/src/main/java/org/apache/shiro/web/util/RedirectView.java
Date Tue, 12 Oct 2010 14:38:29 GMT
On Mon, Oct 11, 2010 at 11:53 PM, Les Hazlewood <lhazlewood@apache.org> wrote:
> Yeah, I made the 2.x comment a day or two ago because changing the
> method signature means that it would not be a backwards compatible
> change.
> I highly doubt that anyone subclassed RedirectView to override that
> method since this class is pretty much used for our own internal
> needs, but if we go forward with this change, I think it needs to be
> specified in the RELEASE_NOTES.txt file at the root of the project to
> ensure it is well documented (and then merged with the complete
> release notes for a release).

Exactly. I was almost going to leave it at first, but after examining
the code I came to exactly the same conclusions and figured no reason
to be that overcautious.

Kalle

> On Mon, Oct 11, 2010 at 9:22 PM,  <kaosko@apache.org> wrote:
>> Author: kaosko
>> Date: Tue Oct 12 04:22:32 2010
>> New Revision: 1021622
>>
>> URL: http://svn.apache.org/viewvc?rev=1021622&view=rev
>> Log:
>> RESOLVED - issue SHIRO-191: Change all StringBuffer usages to StringBuilder
>> https://issues.apache.org/jira/browse/SHIRO-191
>> - Fixed the only remaining use of StringBuffer (Javadoc stated the fix is for 2.x
and comments talk about JDK 1.3 compatibility which is likely not relevant anymore)
>>
>> Modified:
>>    shiro/trunk/web/src/main/java/org/apache/shiro/web/util/RedirectView.java
>>
>> Modified: shiro/trunk/web/src/main/java/org/apache/shiro/web/util/RedirectView.java
>> URL: http://svn.apache.org/viewvc/shiro/trunk/web/src/main/java/org/apache/shiro/web/util/RedirectView.java?rev=1021622&r1=1021621&r2=1021622&view=diff
>> ==============================================================================
>> --- shiro/trunk/web/src/main/java/org/apache/shiro/web/util/RedirectView.java (original)
>> +++ shiro/trunk/web/src/main/java/org/apache/shiro/web/util/RedirectView.java Tue
Oct 12 04:22:32 2010
>> @@ -191,7 +191,7 @@ public class RedirectView {
>>             Map model, HttpServletRequest request, HttpServletResponse response)
throws IOException {
>>
>>         // Prepare name URL.
>> -        StringBuffer targetUrl = new StringBuffer();
>> +        StringBuilder targetUrl = new StringBuilder();
>>         if (this.contextRelative && getUrl().startsWith("/")) {
>>             // Do not apply context path to relative URLs.
>>             targetUrl.append(request.getContextPath());
>> @@ -214,12 +214,8 @@ public class RedirectView {
>>      * @see #urlEncode
>>      * @see #queryProperties
>>      * @see #urlEncode(String, String)
>> -     * @deprecated this method accepts a less-than-ideal StringBuffer argument
and will be replaced by
>> -     * a StringBuilder argument in the next major version (2.x) of Shiro.  It
remains in place to retain
>> -     * 1.0 -> 1.1 backwards compatibility.  See <a href="https://issues.apache.org/jira/browse/SHIRO-196">SHIRO-196</a>.
>>      */
>> -    @Deprecated
>> -    protected void appendQueryProperties(StringBuffer targetUrl, Map model, String
encodingScheme)
>> +    protected void appendQueryProperties(StringBuilder targetUrl, Map model, String
encodingScheme)
>>             throws UnsupportedEncodingException {
>>
>>         // Extract anchor fragment, if any.
>>
>>
>>
>

Mime
View raw message