Ticket #330 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Rename method in complex hierarchy misses some

Reported by: stephan Owned by: stephan
Priority: major Milestone: OTDT_1.4.0_M2
Component: refactoring Version: 1.4.0M1
Keywords: Cc:

Description

This was observed in jdt.core when renaming method TypeReference.checkResolveUsingBaseImportScope: The refactoring missed the declarations within the non-public classes of IAlienScopeTypeReference.

Interestingly, the super calls within those missed methods were correctly renamed.

I was not able to exactly reproduce this in a test case. Sometimes declarations were renamed correctly, but some super calls were missed instead.

Change History

Changed 2 years ago by stephan

  • status changed from new to closed
  • resolution set to fixed
  • component changed from compiler to refactoring

Fixed in r23163:

  • while we don't yet have a region based OT-hierarchy we were using the first element of an unsorted list (RippleMethodFinder2.fDeclarations), which produced random results
  • it's safer to use fMethod instead.

This causes also a change in #76.

Changed 2 years ago by stephan

r23163 caused three regressions in BinaryReferencesTests which revealed a flow in the use of OTTypeHierarchy by refactorings:

  • must not use a project scope for building the hierarchy

Fixed in r23166 by adding option to create OTTypeHierarchy with workspace scope and using this scope during building including TypeHierarchyConnector.

Note: See TracTickets for help on using tickets.