summaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/naming/CompoundName.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/naming/CompoundName.java')
-rw-r--r--libjava/classpath/javax/naming/CompoundName.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/libjava/classpath/javax/naming/CompoundName.java b/libjava/classpath/javax/naming/CompoundName.java
index 703d44e4700..f345d3efd50 100644
--- a/libjava/classpath/javax/naming/CompoundName.java
+++ b/libjava/classpath/javax/naming/CompoundName.java
@@ -68,14 +68,14 @@ public class CompoundName implements Name, Cloneable, Serializable
private CompoundName (Properties syntax)
{
- elts = new Vector ();
+ elts = new Vector<String> ();
mySyntax = syntax;
initializeSyntax ();
}
protected CompoundName (Enumeration<String> comps, Properties syntax)
{
- elts = new Vector ();
+ elts = new Vector<String> ();
mySyntax = syntax;
initializeSyntax ();
try
@@ -91,7 +91,7 @@ public class CompoundName implements Name, Cloneable, Serializable
public CompoundName (String n, Properties syntax)
throws InvalidNameException
{
- elts = new Vector ();
+ elts = new Vector<String> ();
mySyntax = syntax;
initializeSyntax ();
@@ -186,7 +186,7 @@ public class CompoundName implements Name, Cloneable, Serializable
int len = elts.size ();
for (i = 0; i < len / 2; ++i)
{
- Object t = elts.set (i, elts.get (len - i - 1));
+ String t = elts.set (i, elts.get (len - i - 1));
elts.set (len - i - 1, t);
}
}
@@ -210,7 +210,7 @@ public class CompoundName implements Name, Cloneable, Serializable
public Name addAll (int posn, Name n) throws InvalidNameException
{
- Enumeration e = n.getAll ();
+ Enumeration<String> e = n.getAll ();
try
{
while (e.hasMoreElements ())
@@ -227,7 +227,7 @@ public class CompoundName implements Name, Cloneable, Serializable
public Name addAll (Name suffix) throws InvalidNameException
{
- Enumeration e = suffix.getAll ();
+ Enumeration<String> e = suffix.getAll ();
try
{
while (e.hasMoreElements ())
@@ -252,8 +252,8 @@ public class CompoundName implements Name, Cloneable, Serializable
int last = Math.min (cn.elts.size (), elts.size ());
for (int i = 0; i < last; ++i)
{
- String f = canonicalize ((String) elts.get (i));
- int comp = f.compareTo (canonicalize ((String) cn.elts.get (i)));
+ String f = canonicalize (elts.get (i));
+ int comp = f.compareTo (canonicalize (cn.elts.get (i)));
if (comp != 0)
return comp;
}
@@ -270,8 +270,8 @@ public class CompoundName implements Name, Cloneable, Serializable
int delta = elts.size () - cn.elts.size ();
for (int i = 0; i < cn.elts.size (); ++i)
{
- String f = canonicalize ((String) elts.get (delta + i));
- if (! f.equals (canonicalize ((String) cn.elts.get (i))))
+ String f = canonicalize (elts.get (delta + i));
+ if (! f.equals (canonicalize (cn.elts.get (i))))
return false;
}
return true;
@@ -286,7 +286,7 @@ public class CompoundName implements Name, Cloneable, Serializable
public String get (int posn)
{
- return (String) elts.get (posn);
+ return elts.get (posn);
}
public Enumeration<String> getAll ()
@@ -316,7 +316,7 @@ public class CompoundName implements Name, Cloneable, Serializable
{
int h = 0;
for (int i = 0; i < elts.size (); ++i)
- h += canonicalize ((String) elts.get (i)).hashCode ();
+ h += canonicalize (elts.get (i)).hashCode ();
return h;
}
@@ -344,8 +344,8 @@ public class CompoundName implements Name, Cloneable, Serializable
return false;
for (int i = 0; i < cn.elts.size (); ++i)
{
- String f = canonicalize ((String) elts.get (i));
- if (! f.equals (canonicalize ((String) cn.elts.get (i))))
+ String f = canonicalize (elts.get (i));
+ if (! f.equals (canonicalize (cn.elts.get (i))))
return false;
}
return true;
@@ -383,7 +383,7 @@ public class CompoundName implements Name, Cloneable, Serializable
// Find the appropriate element. FIXME: not clear what FLAT
// means.
int offset = (direction == RIGHT_TO_LEFT) ? (size - i - 1) : i;
- String element = (String) elts.get (offset);
+ String element = elts.get (offset);
if (i > 0
|| (i == size - 1 && element.equals ("")))
result.append (separator);
@@ -478,7 +478,7 @@ public class CompoundName implements Name, Cloneable, Serializable
{
mySyntax = (Properties) s.readObject();
int count = s.readInt();
- elts = new Vector(count);
+ elts = new Vector<String>(count);
for (int i = 0; i < count; i++)
elts.addElement((String) s.readObject());
}
@@ -499,7 +499,7 @@ public class CompoundName implements Name, Cloneable, Serializable
protected transient Properties mySyntax;
// The actual elements.
- private transient Vector elts;
+ private transient Vector<String> elts;
// The following are all used for syntax.
private transient int direction;