Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
JBuilder
Browser
Build System
Code Insight
Compiler
Dependency Checker
Inner Classes
JIT
Repository
Components
Database
Db Tools
DD Editor
Debugger
Designers
Editor
EJB
Extreme Programming
Help System
Install
Mobile Development
Open Tools
Runtime System
Samples
Startup
Team Development
Together - Studio
Tools
Unit Test - EJB
Web Development
Web Services
Wizards
XML
You are not logged in.
Help
Print
Public Report
Report From:
JBuilder/Compiler
[ Add a report in this area ]
Report #:
9977
Status:
Closed
Invalid deprecation warnings
Project:
JBuilder
Build #:
11.0.280.0
Version:
2005
Submitted By:
Geoff Granum
Report Type:
Minor failure / Design problem
Date Reported:
12/21/2004 5:54:57 PM
Severity:
Infrequently encountered problem
Last Updated:
5/28/2005 10:21:40 AM
Platform:
All versions
Internal Tracking #:
Resolution:
As Designed
(Resolution Comments)
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
(2 Total Ratings)
3.00 out of 5
Total Votes:
1
Description
When extending 'javax.swing.JDialog' and implementing 'show()' JBuilder will incorrectly respond with a deprecation warning as follows:
'"PasswordDialog.java": [deprecation] show() in java.awt.Component has been deprecated at line 44, column 3'
Obviously seeing the Component version of 'show()' instead of the shallower instance in JDialog.
Steps to Reproduce:
Paste following code into Untitled1.java:
----
import javax.swing.JDialog;
public class Untitled1 extends JDialog{
public Untitled1(){
}
public void show(){
}
}
----
Compile in JBuilder
Compile using javac.
Workarounds
Code compiles and is workable without any extra effort.
The warnings could be confusing, and are certainly annoying for those unlikely to be confused by them.
Attachment
None
Comments
John McGrath at 1/8/2005 10:56:09 PM
-
I cannot reproduce this. Please provide some additional information:
What JDK are you using?
What compiler and compiler settings are you using? (under Project Properties | Build | Java )
Where are you seeing this message? In the message pane or the structure pane?
What is the exact message you get when you compile the example code you posted. The message given obviously does not match the code.
If you compile your code from the command line with Sun's javac (from the same JDK) compiler, do you see the same messages?
Geoff Granum at 1/31/2005 7:55:31 AM
-
Re-reading my initial post and correlating it to your comment I realize that you meant I used the warning message from my PasswordDialog instead of from the Untitled1 code. I apologize for the confusion wholeheartedly. I should have been more careful in submitting the bug report.
Geoff Granum at 1/31/2005 7:52:03 AM
-
Third try is a charm? Hopefully this attempt will actually post:
All compiler settings are defaults. The JDK is that which is shipped with 2005; java version 1.4.2_04-b05
I see the message as a purple underlined squiggly underneath the methed declarations 'public' flag: eg in:
public void show(){}
On compile, but ONLY IN JBUILDER, I get the message
----------
"Untitled1.java": [deprecation] show() in java.awt.Component has been deprecated at line 6, column 3
There have been deprecation warnings. Please consult the documentation for a better alternative.
----------
Obviously I understand that the message does not match the code; hence the title of this bug report 'Invalid Deprecation Warnings'.
Compiling from the command line using the same JDK gives no warnings.
Here is the exact code (excepting the company name):
package com.xx.temp;
import javax.swing.JDialog;
public class Untitled1 extends JDialog
{
public Untitled1(){ super(); }
public void show(){}
}
cheers,
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us