MCPcopy Create free account
hub / github.com/evernat/dead-code-detector / reportDeadLocalVariables

Method reportDeadLocalVariables

src/main/java/dcd/Report.java:145–155  ·  view source on GitHub ↗
(String className, MethodNode methodNode,
			Set<LocalVariableNode> localVariables)

Source from the content-addressed store, hash-verified

143 }
144
145 void reportDeadLocalVariables(String className, MethodNode methodNode,
146 Set<LocalVariableNode> localVariables) throws XMLStreamException {
147 final Set<String> names = new LinkedHashSet<>(localVariables.size());
148 for (final LocalVariableNode localVariable : localVariables) {
149 names.add(localVariable.name);
150 }
151 final String msg = "Local suspects in class " + className + " in method "
152 + getMethodDescription(methodNode) + ':';
153 final String msg2 = '\t' + names.toString();
154 reportWarning("deadLocalVariable", className, msg, msg2);
155 }
156
157 void reportSelfAssignments(String className, MethodNode methodNode, Set<String> selfAssignments)
158 throws XMLStreamException {

Callers 1

Calls 3

getMethodDescriptionMethod · 0.95
reportWarningMethod · 0.95
toStringMethod · 0.80

Tested by

no test coverage detected