From ad6d183a0614adaa0bb1493a9500a4a9b412c1e2 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 13 Jun 2018 18:34:59 -0700 Subject: [PATCH] Remove unneeded conditional logic Update `ConversionUtils` to remove conditional logic that isn't necessary. Issue: SPR-16968 --- .../core/convert/support/ConversionUtils.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ConversionUtils.java b/spring-core/src/main/java/org/springframework/core/convert/support/ConversionUtils.java index 7e6b25fe9a..90399bf7f4 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/ConversionUtils.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/ConversionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -62,14 +62,12 @@ abstract class ConversionUtils { // yes return true; } - else if (sourceElementType.getType().isAssignableFrom(targetElementType.getType())) { + if (sourceElementType.getType().isAssignableFrom(targetElementType.getType())) { // maybe return true; } - else { - // no - return false; - } + // no + return false; } public static Class getEnumType(Class targetType) {