@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -22,12 +22,11 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ParameterNameDiscoverer implementation that tries several ParameterNameDiscoverers
|
||||
* in succession. Those added first in the {@code addDiscoverer} method have
|
||||
* highest priority. If one returns {@code null}, the next will be tried.
|
||||
* {@link ParameterNameDiscoverer} implementation that tries several discoverer
|
||||
* delegates in succession. Those added first in the {@code addDiscoverer} method
|
||||
* have highest priority. If one returns {@code null}, the next will be tried.
|
||||
*
|
||||
* <p>The default behavior is always to return {@code null}
|
||||
* if no discoverer matches.
|
||||
* <p>The default behavior is to return {@code null} if no discoverer matches.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
@@ -40,8 +39,8 @@ public class PrioritizedParameterNameDiscoverer implements ParameterNameDiscover
|
||||
|
||||
|
||||
/**
|
||||
* Add a further ParameterNameDiscoverer to the list of discoverers
|
||||
* that this PrioritizedParameterNameDiscoverer checks.
|
||||
* Add a further {@link ParameterNameDiscoverer} delegate to the list of
|
||||
* discoverers that this {@code PrioritizedParameterNameDiscoverer} checks.
|
||||
*/
|
||||
public void addDiscoverer(ParameterNameDiscoverer pnd) {
|
||||
this.parameterNameDiscoverers.add(pnd);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -28,6 +28,7 @@ import org.springframework.lang.UsesJava8;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 4.0
|
||||
* @see java.lang.reflect.Method#getParameters()
|
||||
* @see java.lang.reflect.Parameter#getName()
|
||||
*/
|
||||
@UsesJava8
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -35,9 +35,9 @@ import org.springframework.util.comparator.ComparableComparator;
|
||||
*/
|
||||
public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
|
||||
private Comparator<T> comparator;
|
||||
private final Comparator<T> comparator;
|
||||
|
||||
private Converter<S, T> converter;
|
||||
private final Converter<S, T> converter;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -27,7 +27,7 @@ package org.springframework.util;
|
||||
@SuppressWarnings("serial")
|
||||
public class InvalidMimeTypeException extends IllegalArgumentException {
|
||||
|
||||
private String mimeType;
|
||||
private final String mimeType;
|
||||
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,6 @@ public class InvalidMimeTypeException extends IllegalArgumentException {
|
||||
public InvalidMimeTypeException(String mimeType, String message) {
|
||||
super("Invalid mime type \"" + mimeType + "\": " + message);
|
||||
this.mimeType = mimeType;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -37,7 +37,7 @@ import org.springframework.util.Assert;
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2.2
|
||||
*/
|
||||
@SuppressWarnings({ "serial", "rawtypes" })
|
||||
@SuppressWarnings({"serial", "rawtypes"})
|
||||
public class CompoundComparator<T> implements Comparator<T>, Serializable {
|
||||
|
||||
private final List<InvertibleComparator> comparators;
|
||||
@@ -64,7 +64,7 @@ public class CompoundComparator<T> implements Comparator<T>, Serializable {
|
||||
Assert.notNull(comparators, "Comparators must not be null");
|
||||
this.comparators = new ArrayList<InvertibleComparator>(comparators.length);
|
||||
for (Comparator comparator : comparators) {
|
||||
this.addComparator(comparator);
|
||||
addComparator(comparator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user