Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
8299849: Revert JDK-8294461: wrong effectively final determination by…
Browse files Browse the repository at this point in the history
… javac

Reviewed-by: vromero
  • Loading branch information
lahodaj committed Jan 11, 2023
1 parent 0abb87a commit 636976a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
Expand Up @@ -2027,13 +2027,14 @@ void newVar(JCVariableDecl varDecl) {
void letInit(DiagnosticPosition pos, VarSymbol sym) {
if (sym.adr >= firstadr && trackable(sym)) {
if ((sym.flags() & EFFECTIVELY_FINAL) != 0) {
if (inits.isMember(sym.adr) || !uninits.isMember(sym.adr)) {
//assignment targeting an effectively final variable makes the
//variable lose its status of effectively final if the variable
//is definitely assigned or _not_ definitively unassigned
if (!uninits.isMember(sym.adr)) {
//assignment targeting an effectively final variable
//makes the variable lose its status of effectively final
//if the variable is _not_ definitively unassigned
sym.flags_field &= ~EFFECTIVELY_FINAL;
} else {
uninit(sym);
}
uninit(sym);
}
else if ((sym.flags() & FINAL) != 0) {
if ((sym.flags() & PARAMETER) != 0) {
Expand Down

This file was deleted.

This file was deleted.

1 comment on commit 636976a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.