Avoid exposing testing method in public API

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@279979 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2005-09-10 09:36:15 +00:00
parent 7c818a9f22
commit bf54dcd449
2 changed files with 2 additions and 2 deletions

View File

@ -1067,7 +1067,7 @@ public class StrTokenizer implements ListIterator, Cloneable {
* *
* @return a new instance of this Tokenizer which has been reset. * @return a new instance of this Tokenizer which has been reset.
*/ */
protected Object cloneReset() throws CloneNotSupportedException { Object cloneReset() throws CloneNotSupportedException {
StrTokenizer cloned = (StrTokenizer) super.clone(); StrTokenizer cloned = (StrTokenizer) super.clone();
if (cloned.chars != null) { if (cloned.chars != null) {
cloned.chars = (char[]) cloned.chars.clone(); cloned.chars = (char[]) cloned.chars.clone();

View File

@ -548,7 +548,7 @@ public class StrTokenizerTest extends TestCase {
*/ */
public void testCloneNotSupportedException() { public void testCloneNotSupportedException() {
Object notCloned = (new StrTokenizer() { Object notCloned = (new StrTokenizer() {
public Object cloneReset() throws CloneNotSupportedException { Object cloneReset() throws CloneNotSupportedException {
throw new CloneNotSupportedException("test"); throw new CloneNotSupportedException("test");
} }
}).clone(); }).clone();