CollectionRules
SUGGESTION
Simplification
Suppression
Disable all rules by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$).*
as compiler argument.
Table of contents
- CollectionIsEmpty
- CollectionSize
- CollectionContains
- CollectionAddAllToCollectionExpression
- CollectionAddAllToCollectionBlock
- CollectionRemoveAllFromCollectionExpression
- SetRemoveAllCollection
- SetStream
- NewArrayListFromCollection
- ImmutableCollectionStream
- ImmutableCollectionAsList
- ImmutableCollectionContains
- ImmutableCollectionParallelStream
- ImmutableCollectionToString
- ArraysAsList
- CollectionToArray
- ImmutableCollectionToArrayWithArray
- ImmutableCollectionToArrayWithGenerator
- CollectionIterator
- OptionalFirstCollectionElement
- OptionalFirstQueueElement
- RemoveOptionalFirstNavigableSetElement
- RemoveOptionalFirstQueueElement
- CollectionForEach
CollectionIsEmpty
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionIsEmpty")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionIsEmpty).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
CollectionSize
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionSize")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionSize).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
CollectionContains
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionContains")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionContains).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
CollectionAddAllToCollectionExpression
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionAddAllToCollectionExpression")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionAddAllToCollectionExpression).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
CollectionAddAllToCollectionBlock
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionAddAllToCollectionBlock")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionAddAllToCollectionBlock).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
CollectionRemoveAllFromCollectionExpression
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionRemoveAllFromCollectionExpression")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionRemoveAllFromCollectionExpression).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
SetRemoveAllCollection
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("SetRemoveAllCollection")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$SetRemoveAllCollection).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
SetStream
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("SetStream")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$SetStream).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
NewArrayListFromCollection
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("NewArrayListFromCollection")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$NewArrayListFromCollection).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableCollectionStream
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ImmutableCollectionStream")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$ImmutableCollectionStream).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableCollectionAsList
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ImmutableCollectionAsList")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$ImmutableCollectionAsList).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableCollectionContains
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ImmutableCollectionContains")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$ImmutableCollectionContains).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableCollectionParallelStream
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ImmutableCollectionParallelStream")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$ImmutableCollectionParallelStream).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableCollectionToString
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ImmutableCollectionToString")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$ImmutableCollectionToString).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ArraysAsList
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ArraysAsList")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$ArraysAsList).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
CollectionToArray
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionToArray")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionToArray).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableCollectionToArrayWithArray
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ImmutableCollectionToArrayWithArray")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$ImmutableCollectionToArrayWithArray).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
ImmutableCollectionToArrayWithGenerator
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ImmutableCollectionToArrayWithGenerator")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$ImmutableCollectionToArrayWithGenerator).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
CollectionIterator
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionIterator")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionIterator).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalFirstCollectionElement
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalFirstCollectionElement")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$OptionalFirstCollectionElement).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
OptionalFirstQueueElement
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("OptionalFirstQueueElement")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$OptionalFirstQueueElement).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
RemoveOptionalFirstNavigableSetElement
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("RemoveOptionalFirstNavigableSetElement")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$RemoveOptionalFirstNavigableSetElement).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
RemoveOptionalFirstQueueElement
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("RemoveOptionalFirstQueueElement")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$RemoveOptionalFirstQueueElement).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
CollectionForEach
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("CollectionForEach")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!CollectionRules\$CollectionForEach).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.