Skip to content

Commit d1392ed

Browse files
tbreisacherbrad4d
tbreisacher
authored andcommitted
Add @CheckReturnValue to help prevent useless (and potentially expensive) toStringTree calls
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=152753986
1 parent fbe41ac commit d1392ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/com/google/javascript/rhino/Node.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import java.util.Iterator;
5555
import java.util.NoSuchElementException;
5656
import java.util.Set;
57+
import javax.annotation.CheckReturnValue;
5758
import javax.annotation.Nullable;
5859

5960
/**
@@ -1203,7 +1204,7 @@ private void toString(
12031204
}
12041205
}
12051206

1206-
1207+
@CheckReturnValue
12071208
public String toStringTree() {
12081209
return toStringTreeImpl();
12091210
}

0 commit comments

Comments
 (0)