diff options
Diffstat (limited to 'tests/BugTok.java')
-rw-r--r-- | tests/BugTok.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/BugTok.java b/tests/BugTok.java index c5bc445..004ac8b 100644 --- a/tests/BugTok.java +++ b/tests/BugTok.java @@ -1,3 +1,14 @@ +/** + * BugTok. + * + * @author Yannick Jestin <mailto:jestin@cena.fr> + * + * (c) CENA + * + * 1.2.3: + * - replace Vector.add by Vector.addElement() to maintain jdk1.1 + * compatibility + */ import java.util.Vector ; class BugTok { @@ -7,10 +18,10 @@ class BugTok { if (length!=0) while (true) { index=s.indexOf(sep,last); if (index==-1) { - v.add(s.substring(last,length)); + v.addElement(s.substring(last,length)); break; } else if (index<s.length()) { - v.add(s.substring(last,index)); + v.addElement(s.substring(last,index)); last=index+1; } else { break; |