This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 170296 - Output windows displayed strange result for System.out.format statement
Summary: Output windows displayed strange result for System.out.format statement
Status: RESOLVED DUPLICATE of bug 167279
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: t_h
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-12 21:29 UTC by shche123
Modified: 2009-08-17 09:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shche123 2009-08-12 21:29:21 UTC
Output windows displayed strange result for System.out.format statement:

public class Test {

    public static void main(String[] args) {
        System.out.println("Number1: " + 11);
        System.out.format("Number2: %d ", 11);
    }
}


Output:

Number1: 11
Number2: 11 Number2: 11 

Using JDK 1.6_15; also tried with JDK 1.6_14 with the same result.
Comment 1 Jiri Prox 2009-08-13 09:48:14 UTC
I can reproduce it in 6.7, but in 6.8 all work fine
Comment 2 shche123 2009-08-13 13:43:37 UTC
Any possibility of patching 6.7.1?
Comment 3 Jiri Prox 2009-08-13 13:59:45 UTC
I'm not sure what fixed it - reassigning to ant, maybe someone there knows ...
Comment 4 Jesse Glick 2009-08-13 16:13:09 UTC
If reproducible in 6.7 then it is not WORKSFORME.
Comment 5 Jesse Glick 2009-08-13 16:13:36 UTC
Tomas' area.
Comment 6 Jesse Glick 2009-08-13 16:14:27 UTC
Probably FIXED in 6.8 but fixed by what? Duplicate of something else? Certainly a patch candidate if there was an
intentional fix.
Comment 7 shche123 2009-08-14 15:52:30 UTC
System.out.format("Number2: %d%n ", 11);

(adding %n) produces a better result...

Comment 8 Jesse Glick 2009-08-14 16:05:07 UTC
Yes, handling nonterminated lines in Ant output is a frequent source of issues.
Comment 9 t_h 2009-08-17 09:57:46 UTC
The problem was with printing strings that matched hyperlink pattern.

*** This issue has been marked as a duplicate of 167279 ***