Skip to content

Commit 79d76eb

Browse files
committed
Merge pull request #214 from prezi/add-const-structs-to-protected-symbols
Add collector for const struct names
2 parents 3ad1b2c + cd292b9 commit 79d76eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spaghetti-core/src/main/java/com/prezi/spaghetti/obfuscation/internal/SymbolCollectVisitor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public Collection<String> visitStructNode(StructNode node) {
5454

5555
@Override
5656
public Collection<String> visitConstNode(ConstNode node) {
57-
return extractNames(node.getEntries());
57+
return ImmutableList.<String>builder().add(node.getName()).addAll(extractNames(node.getEntries())).build();
5858
}
5959

6060
@Override

spaghetti-core/src/test/groovy/com/prezi/spaghetti/obfuscation/SymbolCollectVisitorTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class SymbolCollectVisitorTest extends Specification {
6060
}
6161
"""
6262
expect:
63-
result == ["alpha", "beta"]
63+
result == ["Constants", "alpha", "beta"]
6464
}
6565

6666
def "enum values are found"() {

0 commit comments

Comments
 (0)