mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
OptionalToIfInspection: added missing imports (IDEA-212269)
GitOrigin-RevId: afbeaa1f10b2266cd1401da83b71cf0bf6862824
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6faf0931a9
commit
d98814d304
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
private String returnStatement(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void statementWithGetGeneratesThrowStatement() {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String checkNonConstantCondition(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
private void reusesVariable(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String exceptionIsThrownIfNull(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void simple(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void inStatement(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
boolean isPresent(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String checkForNullable(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void exceptionIsThrownOnNullValue(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
String notNullValueCheckIsRemoved(String in) {
|
||||
if (in == null) return "foo";
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String reusesVariable(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String returnOfOrElseValue(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void assignment(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String orElseThrowDefault(String in) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Test {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
private String returnStatement(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void statementWithGetGeneratesThrowStatement() {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String checkNonConstantCondition(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
private void reusesVariable(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String exceptionIsThrownIfNull(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void simple(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void inStatement(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
boolean isPresent(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String checkForNullable(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void exceptionIsThrownOnNullValue(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
String notNullValueCheckIsRemoved(String in) {
|
||||
if (in == null) return "foo";
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String reusesVariable(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String returnOfOrElseValue(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
void assignment(String in) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
String orElseThrowDefault(String in) {
|
||||
|
||||
Reference in New Issue
Block a user