Cannot stop ant from generating compiler Sun proprietary API warnings

前端 未结 6 919
栀梦
栀梦 2020-12-07 01:13

I call javac from my ant script like this:



        
6条回答
  •  佛祖请我去吃肉
    2020-12-07 01:37

    To prevent deprecation warnings I tried to do it using JDK 6 and JDK 7.

    With JDK 7, @Deprecated annotation does the work

    With JDK 6, it does not work, neither adding -Xlint:-deprecation param works for me. The only way I managed to remove the warning was using the @deprecated Javadoc Tag:

      /**
       * @deprecated
       */
      @Override
      public void removeValue(String arg0) {
        // TODO Auto-generated method stub
      }
    

提交回复
热议问题