Skip to content

Commit

Permalink
Increase IAST propagation to StringBuffer subSequence (#8038)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariovido authored Dec 12, 2024
1 parent 3d8130d commit 9918d21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public static String afterSubstring(
}

@CallSite.After("java.lang.CharSequence java.lang.StringBuilder.subSequence(int, int)")
@CallSite.After("java.lang.CharSequence java.lang.StringBuffer.subSequence(int, int)")
public static CharSequence afterSubSequence(
@CallSite.This final CharSequence self,
@CallSite.Argument final int beginIndex,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class StringBuilderCallSiteTest extends AgentTestRunner {
where:
type | suite | param | beginIndex | endIndex | expected
"builder" | new TestStringBuilderSuite() | sb('012345') | 1 | 5 | '1234'
"buffer" | new TestStringBufferSuite() | sbf('012345') | 1 | 5 | '1234'
}
private static class BrokenToString {
Expand Down

0 comments on commit 9918d21

Please sign in to comment.