commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1130713 - in /commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert: Row.java RowInserterRule.java
Date Thu, 02 Jun 2011 18:38:17 GMT
Author: simonetripodi
Date: Thu Jun  2 18:38:17 2011
New Revision: 1130713

URL: http://svn.apache.org/viewvc?rev=1130713&view=rev
Log:
added generic to collections

Modified:
    commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/Row.java
    commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/RowInserterRule.java

Modified: commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/Row.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/Row.java?rev=1130713&r1=1130712&r2=1130713&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/Row.java
(original)
+++ commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/Row.java
Thu Jun  2 18:38:17 2011
@@ -56,7 +56,7 @@ public class Row
         }
     }
 
-    private LinkedList columns = new LinkedList();
+    private LinkedList<Column> columns = new LinkedList<Column>();
 
     public Row()
     {
@@ -67,7 +67,7 @@ public class Row
         columns.add( new Column( name, value ) );
     }
 
-    public List getColumns()
+    public List<Column> getColumns()
     {
         return columns;
     }

Modified: commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/RowInserterRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/RowInserterRule.java?rev=1130713&r1=1130712&r2=1130713&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/RowInserterRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/examples/api/dbinsert/src/main/java/org/apache/commons/digester3/examples/api/dbinsert/RowInserterRule.java
Thu Jun  2 18:38:17 2011
@@ -21,6 +21,7 @@ import java.sql.Connection;
 import java.util.Iterator;
 
 import org.apache.commons.digester3.Rule;
+import org.apache.commons.digester3.examples.api.dbinsert.Row.Column;
 
 /**
  * See Main.java.
@@ -79,9 +80,9 @@ public class RowInserterRule
         StringBuilder colnames = new StringBuilder();
         StringBuilder colvalues = new StringBuilder();
 
-        for ( Iterator i = row.getColumns().iterator(); i.hasNext(); )
+        for ( Iterator<Column> i = row.getColumns().iterator(); i.hasNext(); )
         {
-            Row.Column column = (Row.Column) i.next();
+            Column column = i.next();
 
             if ( colnames.length() > 0 )
             {



Mime
View raw message