Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Sewe2016-09-02 13:52:09 +0000
committerJay Arthanareeswaran2016-11-29 13:07:25 +0000
commit8de2e23b6c0ac06f97e94fe84bc220619aee5efa (patch)
treec07b5057fc4f4189c7bcf16d5fce9af3415fd6de /org.eclipse.jdt.apt.pluggable.core
parent1e676039e89080b90099964adeadcdd9991e676c (diff)
downloadeclipse.jdt.core-8de2e23b6c0ac06f97e94fe84bc220619aee5efa.tar.gz
eclipse.jdt.core-8de2e23b6c0ac06f97e94fe84bc220619aee5efa.tar.xz
eclipse.jdt.core-8de2e23b6c0ac06f97e94fe84bc220619aee5efa.zip
Bug 500747 - Always wrap cause if throwing new exceptionI20161129-2330I20161129-2000
Change-Id: Ia82f6a6cb84761eadd1e9c5b76b9453b1db7c672 Signed-off-by: Andreas Sewe <andreas.sewe@codetrails.com>
Diffstat (limited to 'org.eclipse.jdt.apt.pluggable.core')
-rw-r--r--org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java8
-rw-r--r--org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java4
2 files changed, 3 insertions, 9 deletions
diff --git a/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java b/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
index a89aed2170..54c3ee2f96 100644
--- a/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
+++ b/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
@@ -176,9 +176,7 @@ public class IdeFilerImpl implements Filer {
catch ( JavaModelException e )
{
Apt6Plugin.log(e, "Failure getting the binary output location"); //$NON-NLS-1$
- IOException ioe = new IOException();
- ioe.initCause(e);
- throw ioe;
+ throw new IOException(e);
}
}
else if ( loc == StandardLocation.SOURCE_OUTPUT ) {
@@ -210,9 +208,7 @@ public class IdeFilerImpl implements Filer {
IStatus status = _env.getProject().getWorkspace().validatePath(file.getFullPath().toOSString(), IResource.FILE);
if (!status.isOK()) {
CoreException ce = new CoreException(status);
- IOException ioe = new IOException("Invalid path: " + file.toString()); //$NON-NLS-1$
- ioe.initCause(ce);
- throw ioe;
+ throw new IOException("Invalid path: " + file.toString(), ce); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java b/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java
index d414490152..b6acde8818 100644
--- a/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java
+++ b/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java
@@ -114,9 +114,7 @@ public class IdeNonSourceOutputStream extends ByteArrayOutputStream
}
else {
Apt6Plugin.log(ce, "Could not create generated non-Java file " + _file.getName()); //$NON-NLS-1$
- IOException ioe = new IOException();
- ioe.initCause(ce);
- throw ioe;
+ throw new IOException(ce);
}
}
}

Back to the top