Make compatible with jdk1.5

This commit is contained in:
Jan Bartel 2012-06-06 15:41:11 +02:00
parent 468d7da719
commit 0d38d30ff6
1 changed files with 5 additions and 2 deletions

View File

@ -1128,7 +1128,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Server.
return;
}
_protectedTargets = Arrays.copyOf(targets, targets.length);
_protectedTargets = new String[targets.length];
System.arraycopy(targets, 0, _protectedTargets, 0, targets.length);
}
public String[] getProtectedTargets ()
@ -1136,7 +1137,9 @@ public class ContextHandler extends ScopedHandler implements Attributes, Server.
if (_protectedTargets == null)
return null;
return Arrays.copyOf(_protectedTargets, _protectedTargets.length);
String[] tmp = new String[_protectedTargets.length];
System.arraycopy(_protectedTargets, 0, tmp, 0, _protectedTargets.length);
return tmp;
}