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 180419 - API abstract class should not have a deprecated abstract method
Summary: API abstract class should not have a deprecated abstract method
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API, TEST
Depends on:
Blocks:
 
Reported: 2010-02-08 04:36 UTC by Alexander Simon
Modified: 2010-02-08 12:13 UTC (History)
1 user (show)

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 Alexander Simon 2010-02-08 04:36:40 UTC
For example FileObject has two such methods:

    @Deprecated
    public abstract boolean isReadOnly();

    @Deprecated
    public abstract void setImportant(boolean b);

Implementer does not have any chance to avoid deprivations in own code.

Please remove abstract keyword and provide default implementations for abstract depreciated methods.
Comment 1 Jaroslav Tulach 2010-02-08 09:44:54 UTC
@SuppressWarnings("deprecated") does not work? If it does not, try to annotate your override with @Deprecated, that seems to work in AbstractFileObject.
Comment 2 Alexander Simon 2010-02-08 09:57:24 UTC
@SuppressWarnings("deprecated") does not work.
@Deprecated works.

It seems that java hint should take it into account.

Thanks.
Comment 3 Jaroslav Tulach 2010-02-08 12:13:53 UTC
Jan, do you want to improve the "suppress deprecation" Java hint?