Bug 122186 - The PrintStream printf method produces an error
Summary: The PrintStream printf method produces an error
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-27 20:01 EST by David Johnson CLA
Modified: 2005-12-30 08:38 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Johnson CLA 2005-12-27 20:01:48 EST
The code:   double pi = Math.PI;
            System.out.printf("pi = %5.3f%n", pi);

underlines printf and reports: The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, String, double)

However, this same piece of code compiles using BlueJ on the same machine.  I have Java 5.0 version 6 installed as both my development kit and runtime environment.

This code also works on my Mac using Eclipse.  It only fails on my PC.
Comment 1 Olivier Thomann CLA 2005-12-28 14:07:44 EST
Are you sure that you're compiler settings are 1.5?
Comment 2 David Johnson CLA 2005-12-28 15:16:02 EST
Compiler settings must be set to 5.0
Comment 3 Frederic Fusier CLA 2005-12-29 08:43:28 EST
Reopen to change resolution
Comment 4 Frederic Fusier CLA 2005-12-29 08:44:27 EST
This was an invalid usage not a fix in the code...
Comment 5 David Johnson CLA 2005-12-29 16:47:00 EST
I had failed to set the compliler compliance to 5.0.  When that was done, there is no problem.  Thus there is no bug.
Comment 6 David Johnson CLA 2005-12-29 16:49:42 EST
Fixed when the complier compliance was set to 5.0.
Comment 7 Frederic Fusier CLA 2005-12-30 08:34:08 EST
Reopen to set as invalid (again...)
Comment 8 Frederic Fusier CLA 2005-12-30 08:38:23 EST
As I said in comment 4 and as you agreed in comment 5, this was an invalid usage, _NOT_ a bug => we must set resolution to INVALID.

Resolution FIXED is _only_ used when we modify our code to fix a real bug. There was no code change and this was not a bug => FIXED _cannot_ be used in this case.

Please, do NOT reopen again this bug, thanks