mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Compare commits
2 Commits
website
...
rossendrij
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ba4f872be | ||
|
|
3d5678e20e |
@@ -244,4 +244,11 @@ final class StringRules {
|
||||
return Utf8.encodedLength(str);
|
||||
}
|
||||
}
|
||||
|
||||
// Rewrite `String#copyValueOf(char[])` to `new String(char[])`.
|
||||
// Example:
|
||||
// String.copyValueOf(new char[]);
|
||||
// -->
|
||||
// new String(new char[]);
|
||||
|
||||
}
|
||||
|
||||
@@ -96,4 +96,8 @@ final class StringRulesTest implements RefasterRuleCollectionTestCase {
|
||||
int testUtf8EncodedLength() {
|
||||
return "foo".getBytes(UTF_8).length;
|
||||
}
|
||||
|
||||
String testNewStringChar() {
|
||||
return String.copyValueOf(new char[] {'f', 'o', 'o'});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,4 +96,8 @@ final class StringRulesTest implements RefasterRuleCollectionTestCase {
|
||||
int testUtf8EncodedLength() {
|
||||
return Utf8.encodedLength("foo");
|
||||
}
|
||||
|
||||
String testNewStringChar() {
|
||||
return new String(new char[] {'f', 'o', 'o'});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user