Skip to content

Commit

Permalink
refactor: refactor bad smell UnusedLabel
Browse files Browse the repository at this point in the history
# Repairing Code Style Issues
<!-- laughing-train-refactor -->
## UnusedLabel
A label is a named statement that can be used to jump to it from other parts of the code. If a label is not used, it is better to remove it.

<!-- fingerprint:-1777244990 -->
# Repairing Code Style Issues
* UnusedLabel (1)

Fixes #3519

COPYBARA_INTEGRATE_REVIEW=#3519 from MartinWitt:laughing-train/Qodana/-331951670 c4fdf9c
PiperOrigin-RevId: 499314932
  • Loading branch information
MartinWitt authored and Error Prone Team committed Jan 3, 2023
1 parent dbd0475 commit c1cb001
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState
// update or add a catch block to handle the new exceptions
private static boolean fixExceptions(VisitorState state, SuggestedFix.Builder fix) {
TryTree tryTree = null;
OUTER:
for (TreePath path = state.getPath(); path != null; path = path.getParentPath()) {
if (path.getLeaf() instanceof CatchTree) {
// don't add more catch blocks if newInstance() was called in a catch block
Expand Down

0 comments on commit c1cb001

Please sign in to comment.