New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java: Add support for java.util.StringJoiner #10533
base: main
Are you sure you want to change the base?
Conversation
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,585,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,588,130,28,,,7,,,10
- Totals,,217,8428,1524,129,6,10,107,33,1,86
+ Totals,,217,8431,1524,129,6,10,107,33,1,86
- java.util,44,,461,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,464,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,39,425 |
Add tests
|
Hey @pwntester, thanks for this! I added some more CSV rows for the fluent methods of |
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,585,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,591,130,28,,,7,,,10
- Totals,,217,8428,1524,129,6,10,107,33,1,86
+ Totals,,217,8434,1524,129,6,10,107,33,1,86
- java.util,44,,461,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,467,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,39,428 |
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,585,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,592,130,28,,,7,,,10
- Totals,,217,8428,1524,129,6,10,107,33,1,86
+ Totals,,217,8435,1524,129,6,10,107,33,1,86
- java.util,44,,461,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,468,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,40,428 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully these comments are useful.
Feel free to consider them only as suggestions since I am not a project member.
| "java.util;StringJoiner;true;merge;;;Argument[0];Argument[-1];taint;manual", | ||
| "java.util;StringJoiner;true;merge;;;Argument[-1];ReturnValue;value;manual", | ||
| "java.util;StringJoiner;true;setEmptyValue;;;Argument[-1];ReturnValue;value;manual", | ||
| "java.util;StringJoiner;true;toString;;;Argument[-1];ReturnValue;taint;manual" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be useful to add a trailing comma to avoid a diff for this line when new lines are added:
| "java.util;StringJoiner;true;toString;;;Argument[-1];ReturnValue;taint;manual" | |
| "java.util;StringJoiner;true;toString;;;Argument[-1];ReturnValue;taint;manual", |
| @@ -64,7 +64,14 @@ private class StringSummaryCsv extends SummaryModelCsv { | |||
| "java.lang;StringBuilder;true;StringBuilder;;;Argument[0];Argument[-1];taint;manual", | |||
| "java.lang;CharSequence;true;charAt;;;Argument[-1];ReturnValue;taint;manual", | |||
| "java.lang;CharSequence;true;subSequence;;;Argument[-1];ReturnValue;taint;manual", | |||
| "java.lang;CharSequence;true;toString;;;Argument[-1];ReturnValue;taint;manual" | |||
| "java.lang;CharSequence;true;toString;;;Argument[-1];ReturnValue;taint;manual", | |||
| "java.util;StringJoiner;true;StringJoiner;;;Argument[0..2];Argument[-1];taint;manual", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it matters, but I think these could all be false because StringJoiner is final.
| "java.util;StringJoiner;true;StringJoiner;;;Argument[0..2];Argument[-1];taint;manual", | |
| "java.util;StringJoiner;false;StringJoiner;;;Argument[0..2];Argument[-1];taint;manual", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atorralba, not sure if this is relevant, but the tests still have comments with java.util;StringJoiner;true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's better that we stay accurate
| "java.util;StringJoiner;true;add;;;Argument[-1];ReturnValue;value;manual", | ||
| "java.util;StringJoiner;true;merge;;;Argument[0];Argument[-1];taint;manual", | ||
| "java.util;StringJoiner;true;merge;;;Argument[-1];ReturnValue;value;manual", | ||
| "java.util;StringJoiner;true;setEmptyValue;;;Argument[-1];ReturnValue;value;manual", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there also be taint from the setEmptyValue argument to the StringJoiner instance?
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,585,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,593,130,28,,,7,,,10
- Totals,,217,8428,1524,129,6,10,107,33,1,86
+ Totals,,217,8436,1524,129,6,10,107,33,1,86
- java.util,44,,461,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,469,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,41,428 |
|
Thanks @Marcono1234, those are good suggestions. I had doubts about Applied in e849acb. |
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,585,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,593,130,28,,,7,,,10
- Totals,,217,8428,1524,129,6,10,107,33,1,86
+ Totals,,217,8436,1524,129,6,10,107,33,1,86
- java.util,44,,461,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,469,,,,,,,,,,,34,,,,,,5,2,,1,2,,,,,,,,,,,,,,41,428 |
No description provided.