-
Notifications
You must be signed in to change notification settings - Fork 162
Closed
Description
I'm using this code pattern:
public class TestUnusedMethod {
enum SampleEnum {
A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, a, b, c, d, e, f, g, h, i, j, k,
l, m, n, o, p, q, r, s, t, u, v, w, x, y;
}
void methodWithSwitches(SampleEnum input) {
switch (input) {
case A:
}
switch (input) {
case B:
}
}
private void unusedMethod() {
}
}Eclipse didn't notice unusedMethod was unused.
If I do any of the below actions, Eclipse instantly notices unusedMethod is unused and marks it as yellow :
- remove one of the 2 switch blocks
- remove one of the enum constants
Eclipse version:
2025-12
Java version:
21
Metadata
Metadata
Assignees
Labels
No labels