mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-01 01:11:31 +07:00
Default annotation is now defined from PSI context using an ordered list of nullable or notnull annotations. The first available annotation is selected. For Spring Boot 3, default annotation is org.springframework.lang.NonNull/Nullable For Spring Boot 4, default annotation is org.jspecify.annotations.NonNull/Nullable Legacy settings with an unordered annotation list are converted to make them ordered Non-context-specific default annotations are still used as a default for external and inferred annotation; also it's a fallback option in contexts where no annotation is available at all ChangeNullableDefaultsFix is removed, as now it's unlikely to produce the desired result (and probably was not useful before as well) Fixes IDEA-372145 Support for third-party nullability providers GitOrigin-RevId: 31794eb024ba310ca35d4b3df33420d0bb344898
20 lines
720 B
Java
20 lines
720 B
Java
import org.jetbrains.annotations.NotNull;
|
|
|
|
interface TweetParser {
|
|
static String getTweetMessageFrom(String fullTweet) {
|
|
String fieldName = "\"text\":\"";
|
|
return newMethod(fullTweet, fieldName);
|
|
}
|
|
|
|
@NotNull
|
|
static String newMethod(String fullTweet, String fieldName) {
|
|
int indexOfField = fullTweet.indexOf(fieldName) + fieldName.length();
|
|
int indexOfEndOfField = fullTweet.indexOf("\"", indexOfField);
|
|
return fullTweet.substring(indexOfField, indexOfEndOfField);
|
|
}
|
|
|
|
static String getTwitterHandleFromTweet(String fullTweet) {
|
|
String twitterHandleFieldName = "\"screen_name\":\"";
|
|
return newMethod(fullTweet, twitterHandleFieldName);
|
|
}
|
|
} |