Skip to content

Commit

Permalink
fix(gui): forbid rename method args in fallback mode (#1558)
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Jun 29, 2022
1 parent b282d97 commit e7a86a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jadx-core/src/main/java/jadx/api/JavaVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.List;

import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;

import jadx.api.metadata.ICodeAnnotation;
import jadx.api.metadata.annotations.VarNode;
Expand Down Expand Up @@ -32,7 +33,7 @@ public int getSsa() {
}

@Override
public String getName() {
public @Nullable String getName() {
return varNode.getName();
}

Expand Down
2 changes: 1 addition & 1 deletion jadx-gui/src/main/java/jadx/gui/treemodel/JVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ public String getTooltip() {

@Override
public boolean canRename() {
return true;
return var.getName() != null;
}
}

0 comments on commit e7a86a2

Please sign in to comment.