mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
The problem: Step 1: `JKSymbolProvider#preBuildTree` runs a visitor over the converted Java PSI, so it is able to visit every field/parameter and create a `JKUniverseFieldSymbol` for them (with unbound `target`). Step 2: `JavaToJKTreeBuilder#buildTree` is only able to build a JK tree for certain entry points. It can't handle some types of incoming PSI elements (for example, `PsiParameterList`), so we can meet a situation when some incomplete code is copy-pasted, and some PSI nodes will not be visited by `JavaToJKTreeBuilder`. In the case of fields/parameters, it means that `JKUniverseFieldSymbol#target` will remain unbound. So, we will get an `UninitializedPropertyAccessException` on accessing it in conversions or JKCodeBuilder. ^KTIJ-30470 Fixed GitOrigin-RevId: ebead0d7f3c1a89a8dcbe4367efa6b0a07e79f85