From 9332a9eb110c8fdb4b03eacd608a6646ffcc38fc Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 11 Oct 2010 21:15:26 +0000 Subject: [PATCH] polishing git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3741 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../core/convert/ConversionException.java | 14 +++++++------- .../core/convert/ConverterNotFoundException.java | 2 ++ .../org/springframework/util/FileSystemUtils.java | 11 +++++------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/ConversionException.java b/org.springframework.core/src/main/java/org/springframework/core/convert/ConversionException.java index 4ddf15d8390..423b968ed06 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/ConversionException.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/ConversionException.java @@ -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,7 +19,7 @@ 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 @@ -29,18 +29,18 @@ public abstract class ConversionException extends NestedRuntimeException { /** * Construct a new conversion exception. * @param message the exception message - * @param cause the cause */ - public ConversionException(String message, Throwable cause) { - super(message, cause); + public ConversionException(String message) { + super(message); } /** * Construct a new conversion exception. * @param message the exception message + * @param cause the cause */ - public ConversionException(String message) { - super(message); + public ConversionException(String message, Throwable cause) { + super(message, cause); } } diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java b/org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java index 20cc6381b70..e7e9fd5c745 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java @@ -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. */ diff --git a/org.springframework.core/src/main/java/org/springframework/util/FileSystemUtils.java b/org.springframework.core/src/main/java/org/springframework/util/FileSystemUtils.java index 02261f3226a..c82dcee3470 100644 --- a/org.springframework.core/src/main/java/org/springframework/util/FileSystemUtils.java +++ b/org.springframework.core/src/main/java/org/springframework/util/FileSystemUtils.java @@ -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()) {