mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -44,7 +44,7 @@ public class EnumConverter extends AbstractConverter {
|
||||
@Override
|
||||
protected Object convertInternal(final Class<?> targetClass, final Object value) {
|
||||
Enum enumValue = tryConvertEnum(value, targetClass);
|
||||
if (null == enumValue && ! value instanceof String) {
|
||||
if (null == enumValue && !(value instanceof String)) {
|
||||
// 最后尝试先将value转String,再valueOf转换
|
||||
enumValue = Enum.valueOf((Class) targetClass, convertToStr(value));
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ public class MutableEntry<K, V> extends AbsEntry<K, V> implements Mutable<Map.En
|
||||
* @param value 值
|
||||
* @param <K> 键类型
|
||||
* @param <V> 值类型
|
||||
* @return
|
||||
* @return {@code MutableEntry}
|
||||
*/
|
||||
public static <K, V> MutableEntry<K, V> of(final K key, final V value) {
|
||||
return new MutableEntry<>(key, value);
|
||||
|
@@ -116,7 +116,7 @@ public class ActualTypeMapperPool {
|
||||
for (int i = 0; i < typeParameters.length; i++) {
|
||||
value = typeArguments[i];
|
||||
// 跳过泛型变量对应泛型变量的情况
|
||||
if(! value instanceof TypeVariable){
|
||||
if(!(value instanceof TypeVariable)){
|
||||
typeMap.put(typeParameters[i], value);
|
||||
}
|
||||
}
|
||||
|
@@ -86,7 +86,7 @@ public class HttpUrlConnectionUtil {
|
||||
*/
|
||||
public static HttpURLConnection openHttp(final URL url, final Proxy proxy) throws IORuntimeException {
|
||||
final URLConnection conn = openConnection(url, proxy);
|
||||
if (! conn instanceof HttpURLConnection) {
|
||||
if (!(conn instanceof HttpURLConnection)) {
|
||||
// 防止其它协议造成的转换异常
|
||||
throw new HttpException("'{}' of URL [{}] is not a http connection, make sure URL is format for http.",
|
||||
conn.getClass().getName(), url);
|
||||
|
Reference in New Issue
Block a user