polishing
This commit is contained in:
parent
b062de1133
commit
0ef971b82b
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2010 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.
|
||||
|
@ -19,13 +19,21 @@ package org.springframework.core.convert;
|
|||
import org.springframework.core.NestedRuntimeException;
|
||||
|
||||
/**
|
||||
* Base class for exceptions thrown by the convert system.
|
||||
* Base class for exceptions thrown by the conversion system.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
public abstract class ConversionException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
* Construct a new conversion exception.
|
||||
* @param message the exception message
|
||||
*/
|
||||
public ConversionException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new conversion exception.
|
||||
* @param message the exception message
|
||||
|
@ -35,12 +43,4 @@ public abstract class ConversionException extends NestedRuntimeException {
|
|||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new conversion exception.
|
||||
* @param message the exception message
|
||||
*/
|
||||
public ConversionException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public final class ConverterNotFoundException extends ConversionException {
|
|||
|
||||
private final TypeDescriptor targetType;
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new conversion executor not found exception.
|
||||
* @param sourceType the source type requested to convert from
|
||||
|
@ -42,6 +43,7 @@ public final class ConverterNotFoundException extends ConversionException {
|
|||
this.targetType = targetType;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the source type that was requested to convert from.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2010 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.
|
||||
|
@ -40,8 +40,8 @@ public abstract class FileSystemUtils {
|
|||
if (root.isDirectory()) {
|
||||
File[] children = root.listFiles();
|
||||
if (children != null) {
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
deleteRecursively(children[i]);
|
||||
for (File child : children) {
|
||||
deleteRecursively(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,9 +77,8 @@ public abstract class FileSystemUtils {
|
|||
if (entries == null) {
|
||||
throw new IOException("Could not list files in directory: " + src);
|
||||
}
|
||||
for (int i = 0; i < entries.length; i++) {
|
||||
File file = entries[i];
|
||||
doCopyRecursively(file, new File(dest, file.getName()));
|
||||
for (File entry : entries) {
|
||||
doCopyRecursively(entry, new File(dest, entry.getName()));
|
||||
}
|
||||
}
|
||||
else if (src.isFile()) {
|
||||
|
|
Loading…
Reference in New Issue