diff options
author | Brian Vosburgh | 2012-10-11 23:14:09 +0000 |
---|---|---|
committer | Brian Vosburgh | 2012-10-12 21:21:43 +0000 |
commit | e05891dd1b8be7b489082a84da9a09ea3ef67aef (patch) | |
tree | e9d07497237eaf413c2d371ddaf721862dcc83c6 /common | |
parent | ee8b20a417d2949c4d15e1c2ccd25256b5dc319c (diff) | |
download | webtools.dali-e05891dd1b8be7b489082a84da9a09ea3ef67aef.tar.gz webtools.dali-e05891dd1b8be7b489082a84da9a09ea3ef67aef.tar.xz webtools.dali-e05891dd1b8be7b489082a84da9a09ea3ef67aef.zip |
return Iterable instead of array from CompositeException.getExceptions()
Diffstat (limited to 'common')
-rw-r--r-- | common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/CompositeException.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/CompositeException.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/CompositeException.java index 1db3d135f6..268787877f 100644 --- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/CompositeException.java +++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/CompositeException.java @@ -12,6 +12,7 @@ package org.eclipse.jpt.common.utility.internal; import java.io.PrintStream; import java.io.PrintWriter; import java.util.Collection; +import org.eclipse.jpt.common.utility.internal.iterable.IterableTools; /** * Provide a way for multiple exceptions to be packaged and reported. @@ -33,15 +34,15 @@ public class CompositeException /** * The specified exceptions list must not be empty. */ - public CompositeException(Throwable[] exceptions) { + public CompositeException(Throwable... exceptions) { // provide a list of the nested exceptions and // grab the first exception and make it the "cause" super(buildMessage(exceptions)); this.exceptions = exceptions; } - public Throwable[] getExceptions() { - return this.exceptions; + public Iterable<Throwable> getExceptions() { + return IterableTools.iterable(this.exceptions); } private static String buildMessage(Throwable[] exceptions) { |