eclipse-jdt / eclipse-jdt/eclipse.jdt.core

[hotcodereplace] fails if removing a variable from an inner function/lambda that was previously used

Open
#1,441 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

I noticed that hot code replace fails whenever a previously "outer" variable get unused.

While this seems reasonable as the scope changes this can be very disruptive and I wonder if JDT in such case not can simply *retain* the reference and therefore will success in code replace?

Current workaround is to be very careful when removing a reference to a variable and simply keep an empty if or system out so the variable do not gets unused.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.