sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1652371 - in /sling/trunk/bundles/commons/json/src: main/java/org/apache/sling/commons/json/sling/JsonObjectCreator.java test/java/org/apache/sling/commons/json/sling/JsonObjectCreatorTest.java
Date Fri, 16 Jan 2015 09:12:07 GMT
Author: bdelacretaz
Date: Fri Jan 16 09:12:06 2015
New Revision: 1652371

URL: http://svn.apache.org/r1652371
Log:
SLING-4258 - reuse JsonObjectCreator locale in test

Modified:
    sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/sling/JsonObjectCreator.java
    sling/trunk/bundles/commons/json/src/test/java/org/apache/sling/commons/json/sling/JsonObjectCreatorTest.java

Modified: sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/sling/JsonObjectCreator.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/sling/JsonObjectCreator.java?rev=1652371&r1=1652370&r2=1652371&view=diff
==============================================================================
--- sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/sling/JsonObjectCreator.java
(original)
+++ sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/sling/JsonObjectCreator.java
Fri Jan 16 09:12:06 2015
@@ -116,8 +116,8 @@ public abstract class JsonObjectCreator
     /** Used to format date values */
     private static final String ECMA_DATE_FORMAT = "EEE MMM dd yyyy HH:mm:ss 'GMT'Z";
 
-    /** Used to format date values */
-    private static final Locale DATE_FORMAT_LOCALE = Locale.US;
+    /** The Locale used to format date values */
+    static final Locale DATE_FORMAT_LOCALE = Locale.US;
 
     private static final DateFormat CALENDAR_FORMAT = new SimpleDateFormat(ECMA_DATE_FORMAT,
DATE_FORMAT_LOCALE);
 

Modified: sling/trunk/bundles/commons/json/src/test/java/org/apache/sling/commons/json/sling/JsonObjectCreatorTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/json/src/test/java/org/apache/sling/commons/json/sling/JsonObjectCreatorTest.java?rev=1652371&r1=1652370&r2=1652371&view=diff
==============================================================================
--- sling/trunk/bundles/commons/json/src/test/java/org/apache/sling/commons/json/sling/JsonObjectCreatorTest.java
(original)
+++ sling/trunk/bundles/commons/json/src/test/java/org/apache/sling/commons/json/sling/JsonObjectCreatorTest.java
Fri Jan 16 09:12:06 2015
@@ -152,7 +152,7 @@ public class JsonObjectCreatorTest {
     public void testCalendar() throws JSONException {
         final Calendar nowCalendar = Calendar.getInstance();
         final String ECMA_DATE_FORMAT = "EEE MMM dd yyyy HH:mm:ss 'GMT'Z";
-        final String nowString = new SimpleDateFormat(ECMA_DATE_FORMAT, Locale.ENGLISH).format(nowCalendar.getTime());
+        final String nowString = new SimpleDateFormat(ECMA_DATE_FORMAT, JsonObjectCreator.DATE_FORMAT_LOCALE).format(nowCalendar.getTime());
         assertGet(nowCalendar, nowString);
     }
 



Mime
View raw message