Java Deprecated Class using a Deprecated Class -- Can I turn off the compiler warning?
I am working on deprecating a set of Java classes so they aren't used anymore. I don't want to turn off the compiler warnings for deprecated usage, but I'm finding that if one of my deprecated classes imports another deprecated class I get a warning on that, too. I don't want to modify the code I'm deprecating, but I also don't want the warning for those cases. Is there a way to (a) annotate / comment the code to disable the warning (b) turn off compiler warnings in these cases? I'm using NetBeans, so if there is a NetBeans specific way, that works, too.

Here is a quick example:

First class:

    /**
     * @deprecated No longer in use.
     **/
    @Deprecated
    public class OldSubClass {
    }

Second class:

    import com.old.package.OldSubClass; // Don't want this to create a warning

    /**
     * @deprecated No longer in use.
     **/    
    @Deprecated
    public class OldClass {
           // code that makes use of OldSubClass that I don't want to change ...
           // Any methods that use OldSubClass are also deprecated ...
    }



Java Deprecated Class using a Deprecated Class -- Can I turn off the compiler warning?
===

I am working on deprecating a set of Java classes so they aren't used anymore. I don't want to turn off the compiler warnings for deprecated usage, but I'm finding that if one of my deprecated classes imports another deprecated class I get a warning on that, too. I don't want to modify the code I'm deprecating, but I also don't want the warning for those cases. Is there a way to (a) annotate / comment the code to disable the warning (b) turn off compiler warnings in these cases? I'm using NetBeans, so if there is a NetBeans specific way, that works, too.

Here is a quick example:

First class:

    /**
     * @deprecated No longer in use.
     **/
    @Deprecated
    public class OldSubClass {
    }

Second class:

    import com.old.package.OldSubClass; // Don't want this to create a warning

    /**
     * @deprecated No longer in use.
     **/    
    @Deprecated
    public class OldClass {
           // code that makes use of OldSubClass that I don't want to change ...
           // Any methods that use OldSubClass are also deprecated ...
    }


