diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-29 10:08:15 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:05 +0200 |
commit | f9fa0dd66b830ff21c4a2dcd201151a4e9ca2de8 (patch) | |
tree | 1c1a421028cbef391af4f2886eac2677f75c5ee7 /bean/com/sun/star | |
parent | Java5 update - convert to use generics (diff) | |
download | core-f9fa0dd66b830ff21c4a2dcd201151a4e9ca2de8.tar.gz core-f9fa0dd66b830ff21c4a2dcd201151a4e9ca2de8.zip |
Java5 updates - update code to use generics
This is all of the code I missed in my first set of patches.
Change-Id: I8c7c9e5ac28dc3c2f3ac062c806fbf0787c997bd
Diffstat (limited to 'bean/com/sun/star')
-rw-r--r-- | bean/com/sun/star/beans/LocalOfficeConnection.java | 8 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/bean/com/sun/star/beans/LocalOfficeConnection.java b/bean/com/sun/star/beans/LocalOfficeConnection.java index 912f5ccc29bc..f999ee432ff2 100644 --- a/bean/com/sun/star/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/beans/LocalOfficeConnection.java @@ -22,7 +22,7 @@ import java.awt.Container; import java.io.File; import java.util.Iterator; import java.util.List; -import java.util.Vector; +import java.util.ArrayList; import com.sun.star.lang.XMultiComponentFactory; import com.sun.star.lang.XEventListener; @@ -55,7 +55,7 @@ public class LocalOfficeConnection private String mProtocol; private String mInitialObject; - private List mComponents = new Vector(); + private List<XEventListener> mComponents = new ArrayList<XEventListener>(); /** * Constructor. @@ -169,10 +169,10 @@ public class LocalOfficeConnection */ public void dispose() { - Iterator itr = mComponents.iterator(); + Iterator<XEventListener> itr = mComponents.iterator(); while (itr.hasNext()) { // ignore runtime exceptions in dispose - try { ((XEventListener)itr.next()).disposing(null); } + try { itr.next().disposing(null); } catch ( RuntimeException aExc ) {} } mComponents.clear(); diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index 9c973fbb8249..7ab8d88befc8 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -22,7 +22,7 @@ import java.awt.Container; import java.io.File; import java.util.Iterator; import java.util.List; -import java.util.Vector; +import java.util.ArrayList; import com.sun.star.lang.XMultiComponentFactory; import com.sun.star.lang.XComponent; @@ -64,7 +64,7 @@ public class LocalOfficeConnection private String mProtocol; private String mInitialObject; - private List mComponents = new Vector(); + private List<XEventListener> mComponents = new ArrayList<XEventListener>(); private static long m_nBridgeCounter = 0; //------------------------------------------------------------------------- @@ -243,10 +243,10 @@ public class LocalOfficeConnection */ public void dispose() { - Iterator itr = mComponents.iterator(); + Iterator<XEventListener> itr = mComponents.iterator(); while (itr.hasNext() == true) { // ignore runtime exceptions in dispose - try { ((XEventListener)itr.next()).disposing(null); } + try { itr.next().disposing(null); } catch ( RuntimeException aExc ) {} } mComponents.clear(); |