OptionalToIfInspection: added missing imports (IDEA-212269)

GitOrigin-RevId: afbeaa1f10b2266cd1401da83b71cf0bf6862824
This commit is contained in:
Artemiy Sartakov
2019-08-07 16:49:06 +03:00
committed by intellij-monorepo-bot
parent 6faf0931a9
commit d98814d304
31 changed files with 61 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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";

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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";

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {