src/share/classes/javax/naming/CompositeName.java
Print this page
@@ -392,11 +392,11 @@
* the range [0,posn).
* @exception ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
*/
public Name getPrefix(int posn) {
- Enumeration comps = impl.getPrefix(posn);
+ Enumeration<String> comps = impl.getPrefix(posn);
return (new CompositeName(comps));
}
/**
* Creates a composite name whose components consist of a suffix of the
@@ -410,11 +410,11 @@
* size(), an empty composite name is returned.
* @exception ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
*/
public Name getSuffix(int posn) {
- Enumeration comps = impl.getSuffix(posn);
+ Enumeration<String> comps = impl.getSuffix(posn);
return (new CompositeName(comps));
}
/**
* Determines whether a composite name is a prefix of this composite name.
@@ -561,11 +561,11 @@
* the individual components (each a <tt>String</tt>).
*/
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
s.writeInt(size());
- Enumeration comps = getAll();
+ Enumeration<String> comps = getAll();
while (comps.hasMoreElements()) {
s.writeObject(comps.nextElement());
}
}