You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2010/07/30 05:51:03 UTC

svn commit: r980647 - in /pivot/trunk: core/src/org/apache/pivot/json/JSON.java tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java

Author: tvolkert
Date: Fri Jul 30 03:51:02 2010
New Revision: 980647

URL: http://svn.apache.org/viewvc?rev=980647&view=rev
Log:
Fixed broken build

Modified:
    pivot/trunk/core/src/org/apache/pivot/json/JSON.java
    pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java

Modified: pivot/trunk/core/src/org/apache/pivot/json/JSON.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/json/JSON.java?rev=980647&r1=980646&r2=980647&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/json/JSON.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/json/JSON.java Fri Jul 30 03:51:02 2010
@@ -39,6 +39,7 @@ public class JSON {
      *
      * @see #get(Object, Sequence)
      */
+    @SuppressWarnings("unchecked")
     public static <T> T get(Object root, String path) {
         if (root == null) {
             throw new IllegalArgumentException("root is null.");
@@ -48,7 +49,7 @@ public class JSON {
             throw new IllegalArgumentException("path is null.");
         }
 
-        return get(root, parse(path));
+        return (T)get(root, parse(path));
     }
 
     /**

Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java?rev=980647&r1=980646&r2=980647&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java Fri Jul 30 03:51:02 2010
@@ -238,7 +238,7 @@ public class ExpensesWindow extends Wind
     @SuppressWarnings("unchecked")
     private void updateSelectedExpense() {
         Object expense = expenseTableView.getSelectedRow();
-        final int id = JSON.get(expense, "id");
+        final Integer id = JSON.get(expense, "id");
 
         expenseSheet.load(expense);
         expenseSheet.open(this, new SheetCloseListener() {
@@ -291,7 +291,7 @@ public class ExpensesWindow extends Wind
     @SuppressWarnings("unchecked")
     private void deleteSelectedExpense() {
         Object expense = expenseTableView.getSelectedRow();
-        final int id = JSON.get(expense, "id");
+        final Integer id = JSON.get(expense, "id");
 
         deleteConfirmationPrompt.open(this, new SheetCloseListener() {
             @Override

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java?rev=980647&r1=980646&r2=980647&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java Fri Jul 30 03:51:02 2010
@@ -258,10 +258,10 @@ public final class GraphicsUtilities {
             }
 
             case GRADIENT: {
-                float startX = JSON.get(dictionary, START_X_KEY);
-                float startY = JSON.get(dictionary, START_Y_KEY);
-                float endX = JSON.get(dictionary, END_X_KEY);
-                float endY = JSON.get(dictionary, END_Y_KEY);
+                Float startX = JSON.get(dictionary, START_X_KEY);
+                Float startY = JSON.get(dictionary, START_Y_KEY);
+                Float endX = JSON.get(dictionary, END_X_KEY);
+                Float endY = JSON.get(dictionary, END_Y_KEY);
                 Color startColor = decodeColor((String)JSON.get(dictionary, START_COLOR_KEY));
                 Color endColor = decodeColor((String)JSON.get(dictionary, END_COLOR_KEY));
                 paint = new GradientPaint(startX, startY, startColor, endX, endY, endColor);
@@ -269,10 +269,10 @@ public final class GraphicsUtilities {
             }
 
             case LINEAR_GRADIENT: {
-                float startX = JSON.get(dictionary, START_X_KEY);
-                float startY = JSON.get(dictionary, START_Y_KEY);
-                float endX = JSON.get(dictionary, END_X_KEY);
-                float endY = JSON.get(dictionary, END_Y_KEY);
+                Float startX = JSON.get(dictionary, START_X_KEY);
+                Float startY = JSON.get(dictionary, START_Y_KEY);
+                Float endX = JSON.get(dictionary, END_X_KEY);
+                Float endY = JSON.get(dictionary, END_Y_KEY);
 
                 List<Dictionary<String, ?>> stops =
                     (List<Dictionary<String, ?>>)JSON.get(dictionary, STOPS_KEY);
@@ -283,7 +283,7 @@ public final class GraphicsUtilities {
                 for (int i = 0; i < n; i++) {
                     Dictionary<String, ?> stop = stops.get(i);
 
-                    float offset = JSON.get(stop, OFFSET_KEY);
+                    Float offset = JSON.get(stop, OFFSET_KEY);
                     fractions[i] = offset;
 
                     Color color = decodeColor((String)JSON.get(stop, COLOR_KEY));
@@ -295,9 +295,9 @@ public final class GraphicsUtilities {
             }
 
             case RADIAL_GRADIENT: {
-                float centerX = JSON.get(dictionary, CENTER_X_KEY);
-                float centerY = JSON.get(dictionary, CENTER_Y_KEY);
-                float radius = JSON.get(dictionary, RADIUS_KEY);
+                Float centerX = JSON.get(dictionary, CENTER_X_KEY);
+                Float centerY = JSON.get(dictionary, CENTER_Y_KEY);
+                Float radius = JSON.get(dictionary, RADIUS_KEY);
 
                 List<Dictionary<String, ?>> stops =
                     (List<Dictionary<String, ?>>)JSON.get(dictionary, STOPS_KEY);
@@ -308,7 +308,7 @@ public final class GraphicsUtilities {
                 for (int i = 0; i < n; i++) {
                     Dictionary<String, ?> stop = stops.get(i);
 
-                    float offset = JSON.get(stop, OFFSET_KEY);
+                    Float offset = JSON.get(stop, OFFSET_KEY);
                     fractions[i] = offset;
 
                     Color color = decodeColor((String)JSON.get(stop, COLOR_KEY));