You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by sg...@apache.org on 2008/05/12 17:31:42 UTC

svn commit: r655528 - /incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java

Author: sgala
Date: Mon May 12 08:31:42 2008
New Revision: 655528

URL: http://svn.apache.org/viewvc?rev=655528&view=rev
Log:
SHINDIG-257 uncovered an error in tests

A couple of tests were using default locale, instead of
Locale.US, for the dateformat. This was breaking the build
for those of us in the colonies, outside of the Empire ;-)
This small fix fixes the broken tests.

Modified:
    incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java

Modified: incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java?rev=655528&r1=655527&r2=655528&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java (original)
+++ incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java Mon May 12 08:31:42 2008
@@ -26,6 +26,7 @@
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 /**
@@ -36,7 +37,7 @@
    * Used to parse Expires: header.
    */
   private final static DateFormat dateFormat
-      = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");
+      = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.US);
 
   private ContentCache cache;
 



Re: svn commit: r655528 - /incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java

Posted by Vincent Siveton <vi...@gmail.com>.
Hi

2008/5/12, Kevin Brown <et...@google.com>:
> Ahh, good catch! I thought there was already a separate patch to force the
>  date locale. We really should look for a better date handling library.

Yes see or vote SHINDIG-226

Cheers,

Vincent

>
>  On Mon, May 12, 2008 at 8:31 AM, <sg...@apache.org> wrote:
>
>  > Author: sgala
>  > Date: Mon May 12 08:31:42 2008
>  > New Revision: 655528
>  >
>  > URL: http://svn.apache.org/viewvc?rev=655528&view=rev
>  > Log:
>  > SHINDIG-257 uncovered an error in tests
>  >
>  > A couple of tests were using default locale, instead of
>  > Locale.US, for the dateformat. This was breaking the build
>  > for those of us in the colonies, outside of the Empire ;-)
>  > This small fix fixes the broken tests.
>  >
>  > Modified:
>  >
>  >  incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
>  >
>  > Modified:
>  > incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
>  > URL:
>  > http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java?rev=655528&r1=655527&r2=655528&view=diff
>  >
>  > ==============================================================================
>  > ---
>  > incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
>  > (original)
>  > +++
>  > incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
>  > Mon May 12 08:31:42 2008
>  > @@ -26,6 +26,7 @@
>  >  import java.util.Date;
>  >  import java.util.HashMap;
>  >  import java.util.List;
>  > +import java.util.Locale;
>  >  import java.util.Map;
>  >
>  >  /**
>  > @@ -36,7 +37,7 @@
>  >    * Used to parse Expires: header.
>  >    */
>  >   private final static DateFormat dateFormat
>  > -      = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");
>  > +      = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.US);
>  >
>  >   private ContentCache cache;
>  >
>  >
>  >
>  >
>

Re: svn commit: r655528 - /incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java

Posted by Kevin Brown <et...@google.com>.
Ahh, good catch! I thought there was already a separate patch to force the
date locale. We really should look for a better date handling library.

On Mon, May 12, 2008 at 8:31 AM, <sg...@apache.org> wrote:

> Author: sgala
> Date: Mon May 12 08:31:42 2008
> New Revision: 655528
>
> URL: http://svn.apache.org/viewvc?rev=655528&view=rev
> Log:
> SHINDIG-257 uncovered an error in tests
>
> A couple of tests were using default locale, instead of
> Locale.US, for the dateformat. This was breaking the build
> for those of us in the colonies, outside of the Empire ;-)
> This small fix fixes the broken tests.
>
> Modified:
>
>  incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
>
> Modified:
> incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
> URL:
> http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java?rev=655528&r1=655527&r2=655528&view=diff
>
> ==============================================================================
> ---
> incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
> (original)
> +++
> incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/BasicContentCacheTest.java
> Mon May 12 08:31:42 2008
> @@ -26,6 +26,7 @@
>  import java.util.Date;
>  import java.util.HashMap;
>  import java.util.List;
> +import java.util.Locale;
>  import java.util.Map;
>
>  /**
> @@ -36,7 +37,7 @@
>    * Used to parse Expires: header.
>    */
>   private final static DateFormat dateFormat
> -      = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");
> +      = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.US);
>
>   private ContentCache cache;
>
>
>
>