harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r463705 - in /incubator/harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/ main/java/common/javax/swing/plaf/basic/ main/java/common/javax/swing/table/ main/java/common/javax/swing/text/ main/java/common/javax/...
Date Fri, 13 Oct 2006 15:19:38 GMT
Author: hindessm
Date: Fri Oct 13 08:19:36 2006
New Revision: 463705

URL: http://svn.apache.org/viewvc?view=rev&rev=463705
Log:
Applied patch from "[#HARMONY-1803] [classlib][swing] Generification of the
javax.swing.table, javax.swing.text.*, javax.swing.tree".

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDirectoryModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableColumnModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AttributeSet.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultStyledDocument.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/MutableAttributeSet.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleContext.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormSubmitEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLDocument.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ContentModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DTD.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/AbstractLayoutCache.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultMutableTreeNode.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultCaretTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_SerializeTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JTable.java
Fri Oct 13 08:19:36 2006
@@ -1152,7 +1152,7 @@
         return getModel().getColumnName(convertColumnIndexToModel(viewIndex));
     }
 
-    public Class getColumnClass(final int viewIndex) {
+    public Class<?> getColumnClass(final int viewIndex) {
         return getModel().getColumnClass(convertColumnIndexToModel(viewIndex));
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDirectoryModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDirectoryModel.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDirectoryModel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicDirectoryModel.java
Fri Oct 13 08:19:36 2006
@@ -42,12 +42,6 @@
         }
     };
 
-    private final class FileComparator<T extends File> implements Comparator<T>
{
-        public int compare(final T o1, final T o2) {
-            return lt(o1, o2) ? -1 : 1;
-        }
-    };
-
     public Vector<java.io.File> getFiles() {
         return fileList;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java
Fri Oct 13 08:19:36 2006
@@ -82,7 +82,7 @@
         return (TableModelListener[])listenerList.getListeners(TableModelListener.class);
     }
 
-    public EventListener[] getListeners(final Class listenerType) {
+    public <T extends EventListener> T[] getListeners(final Class<T> listenerType)
{
         return listenerList.getListeners(listenerType);
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/DefaultTableColumnModel.java
Fri Oct 13 08:19:36 2006
@@ -39,7 +39,7 @@
 import javax.swing.event.TableColumnModelListener;
 
 public class DefaultTableColumnModel implements TableColumnModel, PropertyChangeListener,
ListSelectionListener, Serializable {
-    protected Vector tableColumns = new Vector();
+    protected Vector<TableColumn> tableColumns = new Vector<TableColumn>();
     protected ListSelectionModel selectionModel;
     protected int columnMargin = 1;
     protected EventListenerList listenerList = new EventListenerList();
@@ -220,7 +220,7 @@
         return (TableColumnModelListener[])listenerList.getListeners(TableColumnModelListener.class);
     }
 
-    public EventListener[] getListeners(final Class listenerType) {
+    public <T extends EventListener> T[] getListeners(final Class<T> listenerType)
{
         return listenerList.getListeners(listenerType);
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableColumnModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableColumnModel.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableColumnModel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableColumnModel.java
Fri Oct 13 08:19:36 2006
@@ -33,7 +33,7 @@
     void setColumnMargin(int margin);
     int getColumnMargin();
     int getColumnCount();
-    public Enumeration getColumns();
+    public Enumeration<TableColumn> getColumns();
     int getColumnIndex(Object columnIdentifier);
     TableColumn getColumn(int columnIndex);
     int getColumnIndexAtX(int xPosition);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableModel.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableModel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/table/TableModel.java
Fri Oct 13 08:19:36 2006
@@ -27,7 +27,7 @@
     int getRowCount();
     int getColumnCount();
     String getColumnName(int columnIndex);
-    Class getColumnClass(int columnIndex);
+    Class<?> getColumnClass(int columnIndex);
     boolean isCellEditable(int rowIndex, int columnIndex);
     Object getValueAt(int rowIndex, int columnIndex);
     void setValueAt(Object value, int rowIndex, int columnIndex);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
Fri Oct 13 08:19:36 2006
@@ -327,7 +327,7 @@
 
         AttributeSet removeAttributes(AttributeSet old, AttributeSet toDelete);
 
-        AttributeSet removeAttributes(AttributeSet old, Enumeration names);
+        AttributeSet removeAttributes(AttributeSet old, Enumeration<?> names);
 
     }
 
@@ -335,7 +335,7 @@
         Element[] elements =  new Element[0];
 
         private final SearchElement searchElem = new SearchElement();
-        private final Comparator comparator = new ElementComparator();
+        private final Comparator<Object> comparator = new ElementComparator();
 
         public BranchElement(final Element parent,
                              final AttributeSet attributes) {
@@ -948,7 +948,7 @@
     private transient AttributeContext context;
     private transient Position docEnd;
     private DocumentFilter docFilter;
-    private Dictionary docProperties = new Hashtable();
+    private Dictionary<Object, Object> docProperties = new Hashtable<Object, Object>();
     private transient Position docStart;
     private transient DocumentFilter.FilterBypass filterBypasser;
 
@@ -1030,7 +1030,7 @@
                 .getListeners(DocumentListener.class);
     }
 
-    public Dictionary getDocumentProperties() {
+    public Dictionary<Object, Object> getDocumentProperties() {
         return docProperties;
     }
 
@@ -1042,7 +1042,7 @@
         return content.length() - 1;
     }
 
-    public EventListener[] getListeners(final Class listenerType) {
+    public <T extends EventListener> T[] getListeners(final Class<T> listenerType)
{
         return listenerList.getListeners(listenerType);
     }
 
@@ -1173,7 +1173,7 @@
         this.docFilter = filter;
     }
 
-    public void setDocumentProperties(final Dictionary properties) {
+    public void setDocumentProperties(final Dictionary<Object, Object> properties)
{
         this.docProperties = properties;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AttributeSet.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AttributeSet.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AttributeSet.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AttributeSet.java
Fri Oct 13 08:19:36 2006
@@ -50,7 +50,7 @@
 
     int getAttributeCount();
 
-    Enumeration getAttributeNames();
+    Enumeration<?> getAttributeNames();
 
     AttributeSet getResolveParent();
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
Fri Oct 13 08:19:36 2006
@@ -627,8 +627,8 @@
         return dotBias;
     }
 
-    public EventListener[] getListeners(final Class c) {
-        EventListener[] evL = null;
+    public <T extends EventListener> T[] getListeners(final Class<T> c) {
+        T[] evL = null;
         try {
             evL = listenerList.getListeners(c);
         } catch (final ClassCastException e) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultFormatter.java
Fri Oct 13 08:19:36 2006
@@ -204,7 +204,7 @@
         return overwriteMode;
     }
 
-    public Class getValueClass() {
+    public Class<?> getValueClass() {
         return valueClass;
     }
 
@@ -230,7 +230,7 @@
         this.overwriteMode = overwriteMode;
     }
 
-    public void setValueClass(final Class valueClass) {
+    public void setValueClass(final Class<?> valueClass) {
         this.valueClass = valueClass;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultStyledDocument.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultStyledDocument.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultStyledDocument.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultStyledDocument.java
Fri Oct 13 08:19:36 2006
@@ -1008,7 +1008,7 @@
         return getStyleContext().getStyle(name);
     }
 
-    public Enumeration getStyleNames() {
+    public Enumeration<?> getStyleNames() {
         return getStyleContext().getStyleNames();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/MutableAttributeSet.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/MutableAttributeSet.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/MutableAttributeSet.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/MutableAttributeSet.java
Fri Oct 13 08:19:36 2006
@@ -32,7 +32,7 @@
 
     void removeAttributes(AttributeSet attrSet);
 
-    void removeAttributes(Enumeration attrNames);
+    void removeAttributes(Enumeration<?> attrNames);
 
     void setResolveParent(AttributeSet parent);
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleContext.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleContext.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleContext.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleContext.java
Fri Oct 13 08:19:36 2006
@@ -119,7 +119,7 @@
                     ChangeListener.class);
         }
 
-        public EventListener[] getListeners(final Class listenerType) {
+        public <T extends EventListener> T[] getListeners(final Class<T> listenerType)
{
             return listenerList.getListeners(listenerType);
         }
 
@@ -582,7 +582,7 @@
         return (Style)styles.getAttribute(name);
     }
 
-    public Enumeration getStyleNames() {
+    public Enumeration<?> getStyleNames() {
         return styles.getAttributeNames();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormSubmitEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormSubmitEvent.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormSubmitEvent.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormSubmitEvent.java
Fri Oct 13 08:19:36 2006
@@ -28,32 +28,7 @@
 
 public class FormSubmitEvent extends HTMLFrameHyperlinkEvent {
 
-    public static class MethodType {
-        // TODO: Uncomment along with transition to 1.5
-        // public static enum MethodType extends Enum<MethodType> {
-
-        public static final MethodType GET = new MethodType();
-        public static final MethodType POST = new MethodType();
-
-        private MethodType() {
-        }
-
-        public static MethodType valueOf(final String name) {
-            if ("GET".equals(name)) {
-                return GET;
-            } else if ("POST".equals(name)) {
-                return POST;
-            }
-            throw new IllegalArgumentException("parameter has to be GET or POST");
-        }
-
-        public static final MethodType[] values() {
-            MethodType[] result = new MethodType[2];
-            result[0] = GET;
-            result[1] = POST;
-            return result;
-        }
-    }
+    public static enum MethodType {GET, POST}
 
     private String data;
     private MethodType method;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLDocument.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLDocument.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLDocument.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLDocument.java
Fri Oct 13 08:19:36 2006
@@ -537,7 +537,9 @@
         }
 
         protected MutableAttributeSet charAttr = new SimpleAttributeSet();
-        protected Vector parseBuffer = new Vector();
+
+        protected Vector<DefaultStyledDocument.ElementSpec> parseBuffer =
+                new Vector<DefaultStyledDocument.ElementSpec>();
 
         private static final String PARAGRAPH_TAG = "_paragraph_tag_";
         private static final int IMPLIED_HTML_DOCUMENT_START_SPECS_NUMBER = 8;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
Fri Oct 13 08:19:36 2006
@@ -29,7 +29,7 @@
 
     public int type;
 
-    public Vector values;
+    public Vector<?> values;
 
     public int modifier;
 
@@ -41,7 +41,7 @@
                          final int type,
                          final int modifier,
                          final String value,
-                         final Vector values,
+                         final Vector<?> values,
                          final AttributeList next) {
         this.name = name;
         this.type = type;
@@ -137,7 +137,7 @@
         return value;
     }
 
-    public Enumeration getValues() {
+    public Enumeration<?> getValues() {
         return values.elements();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ContentModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ContentModel.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ContentModel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ContentModel.java
Fri Oct 13 08:19:36 2006
@@ -247,9 +247,9 @@
      * If content is null, nothing will be added to elemVec.
      */
 
-    public void getElements(final Vector elemVec) {
+    public void getElements(final Vector<Element> elemVec) {
         if (content instanceof Element) {
-            elemVec.add(content);
+            elemVec.add((Element)content);
         } else if (content != null) {
             ((ContentModel)content).getElements(elemVec);
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DTD.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DTD.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DTD.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DTD.java
Fri Oct 13 08:19:36 2006
@@ -32,10 +32,10 @@
 
     public String name;
 
-    public Vector elements = new Vector();
+    public Vector<Element> elements = new Vector<Element>();
 
-    public Hashtable elementHash = new Hashtable();
-    public Hashtable entityHash = new Hashtable();
+    public Hashtable<String, Element> elementHash = new Hashtable<String, Element>();
+    public Hashtable<Object, Entity> entityHash = new Hashtable<Object, Entity>();
 
     public final Element pcdata;
     public final Element html;
@@ -161,8 +161,8 @@
     public void read(final DataInputStream stream) throws IOException {
         ObjectInputStream is = new ObjectInputStream(stream);
         try {
-            elementHash = (Hashtable)is.readObject();
-            elements = (Vector)is.readObject();
+            elementHash = (Hashtable<String, Element>)is.readObject();
+            elements = (Vector<Element>)is.readObject();
             int size = is.readInt();
             for (int i = 0; i < size; i ++) {
                 String name = (String)is.readObject();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/AbstractLayoutCache.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/AbstractLayoutCache.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/AbstractLayoutCache.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/AbstractLayoutCache.java
Fri Oct 13 08:19:36 2006
@@ -340,7 +340,7 @@
     public abstract TreePath getPathForRow(int row);
     public abstract int getRowForPath(TreePath path);
     public abstract TreePath getPathClosestTo(int x, int y);
-    public abstract Enumeration getVisiblePathsFrom(TreePath path);
+    public abstract Enumeration<TreePath> getVisiblePathsFrom(TreePath path);
     public abstract int getVisibleChildCount(TreePath path);
     public abstract void setExpandedState(TreePath path, boolean isExpanded);
     public abstract boolean getExpandedState(TreePath path);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultMutableTreeNode.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultMutableTreeNode.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultMutableTreeNode.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultMutableTreeNode.java
Fri Oct 13 08:19:36 2006
@@ -29,7 +29,7 @@
 import java.util.Vector;
 
 public class DefaultMutableTreeNode implements Cloneable, MutableTreeNode, Serializable {
-    public static final Enumeration EMPTY_ENUMERATION = new Vector().elements();
+    public static final Enumeration<TreeNode> EMPTY_ENUMERATION = new Vector<TreeNode>().elements();
 
     protected MutableTreeNode parent;
     protected Vector children;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeModel.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeModel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeModel.java
Fri Oct 13 08:19:36 2006
@@ -67,7 +67,7 @@
         return (TreeModelListener[])listenerList.getListeners(TreeModelListener.class);
     }
 
-    public EventListener[] getListeners(final Class listenerType) {
+    public <T extends EventListener> T[] getListeners(final Class<T> listenerType)
{
         return listenerList.getListeners(listenerType);
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/tree/DefaultTreeSelectionModel.java
Fri Oct 13 08:19:36 2006
@@ -76,7 +76,7 @@
                                        : new PropertyChangeListener[0];
     }
 
-    public EventListener[] getListeners(final Class listenerType) {
+    public <T extends EventListener> T[] getListeners(final Class<T> listenerType)
{
         return listenerList.getListeners(listenerType);
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultCaretTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultCaretTest.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultCaretTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultCaretTest.java
Fri Oct 13 08:19:36 2006
@@ -467,12 +467,6 @@
             assertEquals(EvLList.length, dc.getChangeListeners().length);
         //dc.addChangeListener(ChL1);
         //dc.addChangeListener(ChL2);
-        try {
-            EvLList = dc.getListeners(JFrame.class);
-            assertTrue(false);
-        } catch (ClassCastException e) {
-            assertTrue(true);
-        }
     }
 
     /*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_SerializeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_SerializeTest.java?view=diff&rev=463705&r1=463704&r2=463705
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_SerializeTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_SerializeTest.java
Fri Oct 13 08:19:36 2006
@@ -52,13 +52,7 @@
         WeakReference  wr = new WeakReference(pos);
         assertEquals(5, pos.getOffset());
         restored.insertString(0, "aStr");
-        assertEquals(9, pos.getOffset());
-
-        // Test garbage collection
-        for (int i = 0; i < 5; i++) {
-                System.gc();
-        }
-        assertNull("Position object hasn't been garbage collected", wr.get());
+        assertEquals(9, pos.getOffset());        
     }
 
 }



Mime
View raw message