From da7ead8914561877aca2e93ac05354b50c6bc24d Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 3 Jun 2020 15:05:58 +0200 Subject: [PATCH] Polishing --- .../converter/ConvertingComparator.java | 18 +++++++++--------- .../util/comparator/InstanceComparator.java | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java b/spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java index 06ce661766e..dadf4cdfcad 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java +++ b/spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,8 +26,9 @@ import org.springframework.util.comparator.Comparators; /** * A {@link Comparator} that converts values before they are compared. - * The specified {@link Converter} will be used to convert each value - * before it passed to the underlying {@code Comparator}. + * + *

The specified {@link Converter} will be used to convert each value + * before it is passed to the underlying {@code Comparator}. * * @author Phillip Webb * @since 3.2 @@ -82,8 +83,8 @@ public class ConvertingComparator implements Comparator { } /** - * Create a new {@link ConvertingComparator} that compares {@link java.util.Map.Entry - * map * entries} based on their {@link java.util.Map.Entry#getKey() keys}. + * Create a new {@link ConvertingComparator} that compares {@linkplain java.util.Map.Entry + * map entries} based on their {@linkplain java.util.Map.Entry#getKey() keys}. * @param comparator the underlying comparator used to compare keys * @return a new {@link ConvertingComparator} instance */ @@ -92,8 +93,8 @@ public class ConvertingComparator implements Comparator { } /** - * Create a new {@link ConvertingComparator} that compares {@link java.util.Map.Entry - * map entries} based on their {@link java.util.Map.Entry#getValue() values}. + * Create a new {@link ConvertingComparator} that compares {@linkplain java.util.Map.Entry + * map entries} based on their {@linkplain java.util.Map.Entry#getValue() values}. * @param comparator the underlying comparator used to compare values * @return a new {@link ConvertingComparator} instance */ @@ -111,8 +112,7 @@ public class ConvertingComparator implements Comparator { private final Class targetType; - public ConversionServiceConverter(ConversionService conversionService, - Class targetType) { + public ConversionServiceConverter(ConversionService conversionService, Class targetType) { Assert.notNull(conversionService, "ConversionService must not be null"); Assert.notNull(targetType, "TargetType must not be null"); this.conversionService = conversionService; diff --git a/spring-core/src/main/java/org/springframework/util/comparator/InstanceComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/InstanceComparator.java index 1b47258d266..66d4b4f37df 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/InstanceComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/InstanceComparator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,12 @@ import org.springframework.util.Assert; /** * Compares objects based on an arbitrary class order. Allows objects to be sorted based - * on the types of class that they inherit, for example: this comparator can be used to - * sort a list {@code Number}s such that {@code Long}s occur before {@code Integer}s. + * on the types of class that they inherit — for example, this comparator can be used + * to sort a list of {@code Number}s such that {@code Long}s occur before {@code Integer}s. * *

Only the specified {@code instanceOrder} classes are considered during comparison. * If two objects are both instances of the ordered type this comparator will return a - * {@code 0}. Consider combining with {@link Comparator#thenComparing(Comparator)} + * value of {@code 0}. Consider combining with {@link Comparator#thenComparing(Comparator)} * if additional sorting is required. * * @author Phillip Webb