Skip to content

Commit dcb1145

Browse files
committed
Converter interface explicitly documents null values
Issue: SPR-12780
1 parent 772a26a commit dcb1145

File tree

1 file changed

+3
-4
lines changed
  • spring-core/src/main/java/org/springframework/core/convert/converter

1 file changed

+3
-4
lines changed

spring-core/src/main/java/org/springframework/core/convert/converter/Converter.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,16 +24,15 @@
2424
*
2525
* @author Keith Donald
2626
* @since 3.0
27-
* @see ConditionalConverter
2827
* @param <S> The source type
2928
* @param <T> The target type
3029
*/
3130
public interface Converter<S, T> {
3231

3332
/**
3433
* Convert the source of type S to target type T.
35-
* @param source the source object to convert, which must be an instance of S
36-
* @return the converted object, which must be an instance of T
34+
* @param source the source object to convert, which must be an instance of S (never {@code null})
35+
* @return the converted object, which must be an instance of T (potentially {@code null})
3736
* @throws IllegalArgumentException if the source could not be converted to the desired target type
3837
*/
3938
T convert(S source);

0 commit comments

Comments
 (0)