6453837: PartialCompositeContext.allEmpty is buggy

Reviewed-by: weijun
This commit is contained in:
Xue-Lei Andrew Fan 2009-07-13 23:01:03 +08:00
parent 1b9d35f50c
commit cbb1a71a10

View File

@ -493,9 +493,9 @@ public abstract class PartialCompositeContext implements Context, Resolver {
* Tests whether a name contains a nonempty component.
*/
protected static boolean allEmpty(Name name) {
Enumeration enum_ = name.getAll();
Enumeration<String> enum_ = name.getAll();
while (enum_.hasMoreElements()) {
if (!enum_.equals("")) {
if (!enum_.nextElement().isEmpty()) {
return false;
}
}