public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/39481] New: StringTokenizer.hasMoreTokens() can screw up tokens
@ 2009-03-17 12:41 receive-spam at yandex dot ru
2009-03-17 12:42 ` [Bug libgcj/39481] " receive-spam at yandex dot ru
0 siblings, 1 reply; 2+ messages in thread
From: receive-spam at yandex dot ru @ 2009-03-17 12:41 UTC (permalink / raw)
To: java-prs
Test program:
*import java.util.StringTokenizer;
public class gcjbug {
public static void main(String[] args) {
StringTokenizer t = new StringTokenizer("#a=1 #b=2");
for (int i = 0; i < 2; i++) {
if (t.hasMoreTokens())
System.out.println(t.nextToken("=") + t.nextToken("#"));
}
}
}
Expected output:
#a=1
#b=2
Actual output:
#a=1
b=2
Reproduced with 2009/03/16 snapshot of gcc 4.4. After commenting out line "if
(t.hasMoreTokens())" output becomes correct.
--
Summary: StringTokenizer.hasMoreTokens() can screw up tokens
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: receive-spam at yandex dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39481
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libgcj/39481] StringTokenizer.hasMoreTokens() can screw up tokens
2009-03-17 12:41 [Bug libgcj/39481] New: StringTokenizer.hasMoreTokens() can screw up tokens receive-spam at yandex dot ru
@ 2009-03-17 12:42 ` receive-spam at yandex dot ru
0 siblings, 0 replies; 2+ messages in thread
From: receive-spam at yandex dot ru @ 2009-03-17 12:42 UTC (permalink / raw)
To: java-prs
------- Comment #1 from receive-spam at yandex dot ru 2009-03-17 12:42 -------
Oops, asterisk before "import" should be removed
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39481
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-17 12:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-17 12:41 [Bug libgcj/39481] New: StringTokenizer.hasMoreTokens() can screw up tokens receive-spam at yandex dot ru
2009-03-17 12:42 ` [Bug libgcj/39481] " receive-spam at yandex dot ru
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).