Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorBrian Vosburgh2012-10-11 23:14:09 +0000
committerBrian Vosburgh2012-10-12 21:21:43 +0000
commite05891dd1b8be7b489082a84da9a09ea3ef67aef (patch)
treee9d07497237eaf413c2d371ddaf721862dcc83c6 /common
parentee8b20a417d2949c4d15e1c2ccd25256b5dc319c (diff)
downloadwebtools.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.java7
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) {

Back to the top