You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/09/24 10:14:08 UTC

svn commit: r1627250 - /tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

Author: kkolinko
Date: Wed Sep 24 08:14:08 2014
New Revision: 1627250

URL: http://svn.apache.org/r1627250
Log:
Followup to r1623704: Restore deleted protected field and mark it as deprecated.

Modified:
    tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1627250&r1=1627249&r2=1627250&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Wed Sep 24 08:14:08 2014
@@ -21,6 +21,7 @@ import java.io.StringReader;
 import java.io.StringWriter;
 import java.io.Writer;
 import java.nio.charset.StandardCharsets;
+import java.security.MessageDigest;
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.Hashtable;
@@ -189,6 +190,13 @@ public class WebdavServlet
                 TimeZone.getTimeZone("GMT"));
 
 
+    /**
+     * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards.
+     */
+    @Deprecated
+    protected static MessageDigest md5Helper;
+
+
     // ----------------------------------------------------- Instance Variables
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1627250 - /tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-09-24 12:36 GMT+04:00 Mark Thomas <ma...@apache.org>:
> On 24/09/2014 09:14, kkolinko@apache.org wrote:
>> Author: kkolinko
>> Date: Wed Sep 24 08:14:08 2014
>> New Revision: 1627250
>>
>> URL: http://svn.apache.org/r1627250
>> Log:
>> Followup to r1623704: Restore deleted protected field and mark it as deprecated.
>
> First of all, this is not part of the public API and falls under the
> category of things we reserve the right to change between point releases.
>
> Secondly, prior to this commit someone depending on this would see a
> compile time error when they tried to build their code or (I think) a
> linking error if they tried to load their class if they compiled against
> an older Tomcat version. Now they will get an NPE at runtime.
>
> If you are going to restore this field (and I don't think it is worth it
> but neither do I think it is worth vetoing) then you need to initialise
> it as well.
>

I think people may subclass DefaultServlet or WebdavServlet.

My though was that this would allow 3rd party to initialize the field
by themselves if they need it, and so have a code that works both in
8.0.13 and in previous versions.

>From second look, it was a bit of over-engineering. An alternative and
better strategy for them would be to create their own instance of
MessageDigest and store it in their own variable, or use some other
solution.


I also do not see much worth is restoring this field and will revert
this commit.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1627250 - /tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

Posted by Mark Thomas <ma...@apache.org>.
On 24/09/2014 09:14, kkolinko@apache.org wrote:
> Author: kkolinko
> Date: Wed Sep 24 08:14:08 2014
> New Revision: 1627250
> 
> URL: http://svn.apache.org/r1627250
> Log:
> Followup to r1623704: Restore deleted protected field and mark it as deprecated.

First of all, this is not part of the public API and falls under the
category of things we reserve the right to change between point releases.

Secondly, prior to this commit someone depending on this would see a
compile time error when they tried to build their code or (I think) a
linking error if they tried to load their class if they compiled against
an older Tomcat version. Now they will get an NPE at runtime.

If you are going to restore this field (and I don't think it is worth it
but neither do I think it is worth vetoing) then you need to initialise
it as well.

Mark

> 
> Modified:
>     tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
> 
> Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1627250&r1=1627249&r2=1627250&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Wed Sep 24 08:14:08 2014
> @@ -21,6 +21,7 @@ import java.io.StringReader;
>  import java.io.StringWriter;
>  import java.io.Writer;
>  import java.nio.charset.StandardCharsets;
> +import java.security.MessageDigest;
>  import java.util.Date;
>  import java.util.Enumeration;
>  import java.util.Hashtable;
> @@ -189,6 +190,13 @@ public class WebdavServlet
>                  TimeZone.getTimeZone("GMT"));
>  
>  
> +    /**
> +     * @deprecated Unused. Will be removed in Tomcat 9.0.x onwards.
> +     */
> +    @Deprecated
> +    protected static MessageDigest md5Helper;
> +
> +
>      // ----------------------------------------------------- Instance Variables
>  
>      /**
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org