pedro-w opened a new issue, #4604:
URL: https://github.com/apache/netbeans/issues/4604

   ### Apache NetBeans version
   
   Apache NetBeans 15 release candidate
   
   ### What happened
   
   I wanted to find uses of deprecated API in a Java (Maven) project. But 
running the Inspect... item did not give any output in the Inspector window.
   
   
   ### How to reproduce
   
   I have a minimal test case
   ``` java
   public class Mavenproject2 {
   
       public static void main(String[] args) {
           Mavenproject2 it  = new Mavenproject2();
           System.out.println(it.test(123));
           System.out.println(it.test("Hello World!"));
       }
       /**
        * Test a number
        * @param x a number
        * @return another number
        */
       public int test(int x) {
           return x;
       }
       /**
        * Test a String
        * @param x
        * @return a number
        * @deprecated Use Support#test(int) instead
        */
       @Deprecated()
       public int test(String x) {
           return x.length();
       }
   }
   ```
   With this code in a maven project, select menu Source | Inspect... and 
choose Scope: current file and Use: single inspection deprecated. I believe 
this should cite use of deprecated `test(String)` in the Inspector panel but it 
does not.
   
   ![Screenshot 2022-09-09 
110241](https://user-images.githubusercontent.com/22172519/189326314-7748f0fd-c81b-4912-9d75-dc9e52399104.png)
   
   Note the IDE does show strikethrough on both the declaration and use of that 
method.
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10 version 10.0 running on amd64; Cp1252; en_GB (nb)
   
   ### JDK
   
   11.0.9.1; OpenJDK 64-Bit Server VM 11.0.9.1+1
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   Log file attached, as far as I can no relevant entries.
   [ide-log.txt](https://github.com/apache/netbeans/files/9534464/ide-log.txt)
   
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to