pivot-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gbr...@apache.org
Subject svn commit: r909840 - in /pivot/trunk: charts/.settings/ core/.settings/ core/src/org/apache/pivot/serialization/ core/src/org/apache/pivot/util/ core/test/org/apache/pivot/util/test/ demos/.settings/ tests/.settings/ tools/.settings/ tutorials/.settin...
Date Sat, 13 Feb 2010 16:11:16 GMT
Author: gbrown
Date: Sat Feb 13 16:11:13 2010
New Revision: 909840

URL: http://svn.apache.org/viewvc?rev=909840&view=rev
Log:
Resolve PIVOT-413.

Added:
    pivot/trunk/charts/.settings/
    pivot/trunk/charts/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/core/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/demos/.settings/
    pivot/trunk/demos/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/tests/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/tools/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/web-server/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/web/.settings/
    pivot/trunk/web/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/wtk-terra/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/wtk/.settings/org.eclipse.core.resources.prefs
Modified:
    pivot/trunk/core/src/org/apache/pivot/serialization/CSVSerializer.java
    pivot/trunk/core/src/org/apache/pivot/serialization/JSONSerializer.java
    pivot/trunk/core/src/org/apache/pivot/util/Resources.java
    pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java
    pivot/trunk/tutorials/.settings/org.eclipse.core.resources.prefs
    pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java

Added: pivot/trunk/charts/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/charts/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/charts/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/charts/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:52:28 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Added: pivot/trunk/core/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/core/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/core/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/core/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:52:35 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Modified: pivot/trunk/core/src/org/apache/pivot/serialization/CSVSerializer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/serialization/CSVSerializer.java?rev=909840&r1=909839&r2=909840&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/serialization/CSVSerializer.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/serialization/CSVSerializer.java Sat Feb 13 16:11:13
2010
@@ -142,11 +142,7 @@
 
 
     public CSVSerializer() {
-        this(DEFAULT_CHARSET_NAME);
-    }
-
-    public CSVSerializer(String charsetName) {
-        this(charsetName == null ? Charset.defaultCharset() : Charset.forName(charsetName));
+        this(Charset.forName(DEFAULT_CHARSET_NAME));
     }
 
     public CSVSerializer(Charset charset) {

Modified: pivot/trunk/core/src/org/apache/pivot/serialization/JSONSerializer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/serialization/JSONSerializer.java?rev=909840&r1=909839&r2=909840&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/serialization/JSONSerializer.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/serialization/JSONSerializer.java Sat Feb 13 16:11:13
2010
@@ -55,11 +55,7 @@
     public static final int BUFFER_SIZE = 2048;
 
     public JSONSerializer() {
-        this(DEFAULT_CHARSET_NAME);
-    }
-
-    public JSONSerializer(String charsetName) {
-        this(charsetName == null ? Charset.defaultCharset() : Charset.forName(charsetName));
+        this(Charset.forName(DEFAULT_CHARSET_NAME));
     }
 
     public JSONSerializer(Charset charset) {

Modified: pivot/trunk/core/src/org/apache/pivot/util/Resources.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Resources.java?rev=909840&r1=909839&r2=909840&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Resources.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Resources.java Sat Feb 13 16:11:13 2010
@@ -40,33 +40,25 @@
 
     private Map<String, Object> resourceMap = null;
 
+    public static final String DEFAULT_CHARSET_NAME = "UTF-8";
+
     public Resources(String baseName) throws IOException, SerializationException {
-        this(null, baseName, Locale.getDefault(), Charset.defaultCharset());
+        this(null, baseName, Locale.getDefault(), Charset.forName(DEFAULT_CHARSET_NAME));
     }
 
     public Resources(Resources parent, String baseName) throws IOException,
         SerializationException {
-        this(parent, baseName, Locale.getDefault(), Charset.defaultCharset());
+        this(parent, baseName, Locale.getDefault(), Charset.forName(DEFAULT_CHARSET_NAME));
     }
 
     public Resources(String baseName, Locale locale) throws IOException,
         SerializationException {
-        this(null, baseName, locale, Charset.defaultCharset());
+        this(null, baseName, locale, Charset.forName(DEFAULT_CHARSET_NAME));
     }
 
     public Resources(Resources parent, String baseName, Locale locale) throws IOException,
         SerializationException {
-        this(parent, baseName, locale, Charset.defaultCharset());
-    }
-
-    public Resources(String baseName, String charsetName) throws IOException,
-        SerializationException {
-        this(baseName, Locale.getDefault(), charsetName);
-    }
-
-    public Resources(Resources parent, String baseName, String charsetName) throws IOException,
-        SerializationException {
-        this(parent, baseName, Locale.getDefault(), charsetName);
+        this(parent, baseName, locale, Charset.forName(DEFAULT_CHARSET_NAME));
     }
 
     public Resources(String baseName, Charset charset) throws IOException,
@@ -79,16 +71,6 @@
         this(parent, baseName, Locale.getDefault(), charset);
     }
 
-    public Resources(String baseName, Locale locale, String charsetName) throws IOException,
-        SerializationException {
-        this(null, baseName, locale, Charset.forName(charsetName));
-    }
-
-    public Resources(Resources parent, String baseName, Locale locale, String charsetName)
-        throws IOException, SerializationException {
-        this(parent, baseName, locale, Charset.forName(charsetName));
-    }
-
     /**
      * Creates a new resource bundle.
      *
@@ -161,9 +143,8 @@
         }
 
         if (resourceMap == null) {
-            throw new MissingResourceException(
-                "Can't find resource for base name " + baseName + ", locale "
-                    + locale, baseName, "");
+            throw new MissingResourceException("Can't find resource for base name "
+                + baseName + ", locale " + locale, baseName, "");
         }
     }
 
@@ -189,6 +170,7 @@
         if (o == null && parent != null) {
             return parent.get(key);
         }
+
         return o;
     }
 
@@ -197,6 +179,7 @@
         if (s == null && parent != null) {
             return parent.getString(key);
         }
+
         return s;
     }
 

Modified: pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java?rev=909840&r1=909839&r2=909840&view=diff
==============================================================================
--- pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java (original)
+++ pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java Sat Feb 13 16:11:13
2010
@@ -135,7 +135,7 @@
         main = new Resources(parent, getClass().getName(), Charset.defaultCharset());
         testString();
 
-        main = new Resources(parent, getClass().getName(), Charset.defaultCharset().name());
+        main = new Resources(parent, getClass().getName(), Charset.defaultCharset());
         testString();
 
         main = new Resources(parent, getClass().getName(), Locale.ENGLISH);
@@ -145,7 +145,7 @@
         testString();
 
         main = new Resources(parent, getClass().getName(), Locale.ENGLISH,
-            Charset.defaultCharset().name());
+            Charset.defaultCharset());
         testString();
 
     }

Added: pivot/trunk/demos/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/demos/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/demos/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/demos/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:52:42 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Added: pivot/trunk/tests/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/tests/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/tests/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/tests/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:52:49 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Added: pivot/trunk/tools/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/tools/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/tools/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/tools/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:52:56 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Modified: pivot/trunk/tutorials/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/.settings/org.eclipse.core.resources.prefs?rev=909840&r1=909839&r2=909840&view=diff
==============================================================================
--- pivot/trunk/tutorials/.settings/org.eclipse.core.resources.prefs (original)
+++ pivot/trunk/tutorials/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -1,6 +1,7 @@
-#Fri Dec 04 08:05:11 EST 2009
+#Sat Feb 13 10:53:04 EST 2010
 eclipse.preferences.version=1
 encoding//src/org/apache/pivot/tutorials/localization/Localization.json=UTF-8
 encoding//src/org/apache/pivot/tutorials/localization/Localization_de.json=UTF-8
 encoding//src/org/apache/pivot/tutorials/stocktracker/StockTracker.json=UTF-8
 encoding//src/org/apache/pivot/tutorials/stocktracker/StockTracker_fr.json=UTF-8
+encoding/<project>=UTF-8

Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java?rev=909840&r1=909839&r2=909840&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTracker.java Sat
Feb 13 16:11:13 2010
@@ -99,7 +99,7 @@
         symbols.add("AMZN");
         symbols.add("GOOG");
         symbols.add("ORCL");
-        symbols.add("JAVA");
+        symbols.add("IBM");
     }
 
     @Override
@@ -112,7 +112,7 @@
         }
 
         // Load and bind to the WTKX source
-        Resources resources = new Resources(getClass().getName(), "UTF-8");
+        Resources resources = new Resources(getClass().getName());
         WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
         window = (Window)wtkxSerializer.readObject(this, "stocktracker.wtkx");
         wtkxSerializer.bind(this, StockTracker.class);

Added: pivot/trunk/web-server/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/web-server/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/web-server/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/web-server/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13
2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:53:18 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Added: pivot/trunk/web/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/web/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/web/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/web/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:53:11 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Added: pivot/trunk/wtk-terra/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/wtk-terra/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/wtk-terra/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:53:32 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

Added: pivot/trunk/wtk/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/.settings/org.eclipse.core.resources.prefs?rev=909840&view=auto
==============================================================================
--- pivot/trunk/wtk/.settings/org.eclipse.core.resources.prefs (added)
+++ pivot/trunk/wtk/.settings/org.eclipse.core.resources.prefs Sat Feb 13 16:11:13 2010
@@ -0,0 +1,3 @@
+#Sat Feb 13 10:53:24 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8



Mime
View raw message