Skip to content

Commit 711dd51

Browse files
jaywarrickctrueden
authored andcommitted
Clarify docs for canConvert(Object, Class)
It was misleading the way it was because it would return true from canConvert("5.1", int.class) but would get an exception when actually trying to convert("5.1", int.class). The documentation led me to believe the check would catch this scenario when it is actually a convenience method that simply delegates to canConvert(Class, Class).
1 parent b8ca33b commit 711dd51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/scijava/util/ConversionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public static boolean canConvert(final Class<?> src, final Class<?> dest) {
313313
}
314314

315315
/**
316-
* Checks whether the given object can be converted to the specified type.
316+
* Checks whether the given object's type can be converted to the specified type.
317317
*
318318
* @see #convert(Object, Type)
319319
*/

0 commit comments

Comments
 (0)