Author Topic: SE 24.0.1: Java symbol lookup confused by try-catch block  (Read 992 times)

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
SE 24.0.1: Java symbol lookup confused by try-catch block
« on: February 11, 2020, 08:14:15 PM »
SE can't find the definition of a local variable in a stretch of Java code surrounded by a try-catch block.

In the attached nonsense example, looking for the definition of 'replaceProperty' (line21) triggers a select-symbol popup, even though the definition is just a few lines up (line14).   If you try a refactor-rename on the variable, it won't find all instances.  If you remove the try-catch block, the problem goes away.

The 'replaceProperty' name was carefully chosen (;D) for this example because it exists in a few places in the JDK 13 source tag file and helps to amplify the problem.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: SE 24.0.1: Java symbol lookup confused by try-catch block
« Reply #1 on: February 11, 2020, 08:30:19 PM »
Good catch.  I will put this on my list of things to look into.