OptionalRules
SUGGESTION
Simplification
Suppression
Disable all rules by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$).*
as compiler argument.
Table of contents
- OptionalEmpty
- OptionalOfNullable
- OptionalIsEmpty
- OptionalIsPresent
- OptionalOrElseThrow
- OptionalOrElseThrowMethodReference
- OptionalEqualsOptional
- OptionalFirstIteratorElement
- TernaryOperatorOptionalPositiveFiltering
- TernaryOperatorOptionalNegativeFiltering
- MapOptionalToBoolean
- MapToNullable
- FlatMapToOptional
- OrOrElseThrow
- OptionalOrElse
- StreamFlatMapOptional
- StreamMapToOptionalGet
- FilterOuterOptionalAfterFlatMap
- MapOuterOptionalAfterFlatMap
- FlatMapOuterOptionalAfterFlatMap
- OptionalOrOtherOptional
- OptionalIdentity
- OptionalFilter
- OptionalMap
- OptionalStream
OptionalEmpty
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalEmpty")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalEmpty).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalOfNullable
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalOfNullable")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalOfNullable).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalIsEmpty
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalIsEmpty")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalIsEmpty).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalIsPresent
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalIsPresent")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalIsPresent).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalOrElseThrow
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalOrElseThrow")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalOrElseThrow).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalOrElseThrowMethodReference
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalOrElseThrowMethodReference")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalOrElseThrowMethodReference).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalEqualsOptional
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalEqualsOptional")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalEqualsOptional).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalFirstIteratorElement
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalFirstIteratorElement")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalFirstIteratorElement).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
TernaryOperatorOptionalPositiveFiltering
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("TernaryOperatorOptionalPositiveFiltering")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$TernaryOperatorOptionalPositiveFiltering).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
TernaryOperatorOptionalNegativeFiltering
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("TernaryOperatorOptionalNegativeFiltering")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$TernaryOperatorOptionalNegativeFiltering).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
MapOptionalToBoolean
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("MapOptionalToBoolean")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$MapOptionalToBoolean).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
MapToNullable
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("MapToNullable")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$MapToNullable).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
FlatMapToOptional
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("FlatMapToOptional")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$FlatMapToOptional).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OrOrElseThrow
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OrOrElseThrow")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OrOrElseThrow).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalOrElse
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalOrElse")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalOrElse).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
StreamFlatMapOptional
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("StreamFlatMapOptional")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$StreamFlatMapOptional).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
StreamMapToOptionalGet
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("StreamMapToOptionalGet")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$StreamMapToOptionalGet).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
FilterOuterOptionalAfterFlatMap
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("FilterOuterOptionalAfterFlatMap")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$FilterOuterOptionalAfterFlatMap).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
MapOuterOptionalAfterFlatMap
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("MapOuterOptionalAfterFlatMap")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$MapOuterOptionalAfterFlatMap).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
FlatMapOuterOptionalAfterFlatMap
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("FlatMapOuterOptionalAfterFlatMap")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$FlatMapOuterOptionalAfterFlatMap).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalOrOtherOptional
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalOrOtherOptional")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalOrOtherOptional).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalIdentity
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalIdentity")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalIdentity).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalFilter
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalFilter")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalFilter).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalMap
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalMap")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalMap).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalStream
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalStream")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!OptionalRules\$OptionalStream).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.