From cf83ab324234d4409bcf40cf8f760782b4f7662d Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Thu, 27 Sep 2018 09:10:46 +0700 Subject: [PATCH] SortedCollectionWithNonComparableKeys.html: wording updated --- ...SortedCollectionWithNonComparableKeys.html | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/java/java-impl/src/inspectionDescriptions/SortedCollectionWithNonComparableKeys.html b/java/java-impl/src/inspectionDescriptions/SortedCollectionWithNonComparableKeys.html index fdcf4e36d136..55056b472593 100644 --- a/java/java-impl/src/inspectionDescriptions/SortedCollectionWithNonComparableKeys.html +++ b/java/java-impl/src/inspectionDescriptions/SortedCollectionWithNonComparableKeys.html @@ -1,17 +1,18 @@ -Reports construction of sorted collections like new TreeSet<>() which rely on natural order, -but their element type does not implement the Comparable interface. -Such collection will unlikely to work properly. +Reports construction of sorted collections, for example new TreeSet<>(), that rely on natural ordering, +but their element type doesn't implement the Comparable interface. +It's unlikely that such a collection will work properly.

- A false-positive is possible if collection element is a super-type which is not comparable, but it's intended to - hold only comparable sub-types. This is however error-prone. It's better to narrow the collection element type - or declare the super-type as comparable. -

-

- An option is provided to suppress the warnings on type parameters. + A false positive is possible if the collection element is a non-comparable super-type, + but it's intended to hold only comparable sub-types. This is however error-prone. + It's better to narrow the collection element type or declare the super-type as Comparable.

+

+ The inspection also reports cases when the collection element is a type parameter which is not declared as extends Comparable. + You can suppress the warnings on type parameters using the provided option (for example, to keep the API compatibility). +

New in 2018.3