You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2015/06/19 18:06:56 UTC

svn commit: r1686442 - /tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java

Author: remm
Date: Fri Jun 19 16:06:55 2015
New Revision: 1686442

URL: http://svn.apache.org/r1686442
Log:
Add IAE, although it cannot happen.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java?rev=1686442&r1=1686441&r2=1686442&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java Fri Jun 19 16:06:55 2015
@@ -145,6 +145,9 @@ public final class FastHttpDateFormat {
         if (cachedDate != null) {
             return cachedDate.longValue();
         }
+        if (threadLocalformats == null) {
+            throw new IllegalArgumentException();
+        }
 
         Long date = null;
         if (threadLocalformats != null) {



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


Re: svn commit: r1686442 - /tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java

Posted by sebb <se...@gmail.com>.
On 19 June 2015 at 17:06,  <re...@apache.org> wrote:
> Author: remm
> Date: Fri Jun 19 16:06:55 2015
> New Revision: 1686442
>
> URL: http://svn.apache.org/r1686442
> Log:
> Add IAE, although it cannot happen.
>
> Modified:
>     tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
>
> Modified: tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java?rev=1686442&r1=1686441&r2=1686442&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java (original)
> +++ tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java Fri Jun 19 16:06:55 2015
> @@ -145,6 +145,9 @@ public final class FastHttpDateFormat {
>          if (cachedDate != null) {
>              return cachedDate.longValue();
>          }
> +        if (threadLocalformats == null) {
> +            throw new IllegalArgumentException();
> +        }
>
>          Long date = null;
>          if (threadLocalformats != null) {

The condition will now always be true, so can be eliminated.

>
>
> ---------------------------------------------------------------------
> 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