mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 07:40:42 +07:00
Java: Don't specify visibility for extracted method declared in an interface (IDEA-196426)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
interface TweetParser {
|
||||
static String getTweetMessageFrom(String fullTweet) {
|
||||
String fieldName = "\"text\":\"";
|
||||
<selection>int indexOfField = fullTweet.indexOf(fieldName) + fieldName.length();
|
||||
int indexOfEndOfField = fullTweet.indexOf("\"", indexOfField);
|
||||
return fullTweet.substring(indexOfField, indexOfEndOfField);</selection>
|
||||
}
|
||||
|
||||
static String getTwitterHandleFromTweet(String fullTweet) {
|
||||
String twitterHandleFieldName = "\"screen_name\":\"";
|
||||
int indexOfTwitterHandleField = fullTweet.indexOf(twitterHandleFieldName) + twitterHandleFieldName.length();
|
||||
int indexOfEndOfTwitterHandle = fullTweet.indexOf("\"", indexOfTwitterHandleField);
|
||||
return fullTweet.substring(indexOfTwitterHandleField, indexOfEndOfTwitterHandle);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user