aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/installer
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-11-08 14:52:32 +0100
committerReinier Zwitserloot <reinier@tipit.to>2009-11-08 14:52:32 +0100
commit56602322d9c44b69017b345aaca5b3807fd5d427 (patch)
treea1e92bf008b76aa16c52985e7702cd283e383a4a /src/lombok/installer
parente14e8c3df3d7baa700a048b83e430db5c76ca410 (diff)
downloadlombok-56602322d9c44b69017b345aaca5b3807fd5d427.tar.gz
lombok-56602322d9c44b69017b345aaca5b3807fd5d427.tar.bz2
lombok-56602322d9c44b69017b345aaca5b3807fd5d427.zip
Minor bug fixes and style edits. All these were found after running findbugs on the lombok sources.
Diffstat (limited to 'src/lombok/installer')
-rw-r--r--src/lombok/installer/EclipseLocation.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/lombok/installer/EclipseLocation.java b/src/lombok/installer/EclipseLocation.java
index 1a04900b..e925f158 100644
--- a/src/lombok/installer/EclipseLocation.java
+++ b/src/lombok/installer/EclipseLocation.java
@@ -63,7 +63,7 @@ final class EclipseLocation {
* Thrown when creating a new EclipseLocation with a path object that doesn't, in fact,
* point at an Eclipse installation.
*/
- final class NotAnEclipseException extends Exception {
+ static final class NotAnEclipseException extends Exception {
private static final long serialVersionUID = 1L;
public NotAnEclipseException(String message, Throwable cause) {
@@ -177,7 +177,7 @@ final class EclipseLocation {
}
/** Thrown when uninstalling lombok fails. */
- class UninstallException extends Exception {
+ static class UninstallException extends Exception {
private static final long serialVersionUID = 1L;
public UninstallException(String message, Throwable cause) {
@@ -260,7 +260,7 @@ final class EclipseLocation {
}
/** Thrown when installing lombok fails. */
- class InstallException extends Exception {
+ static class InstallException extends Exception {
private static final long serialVersionUID = 1L;
public InstallException(String message, Throwable cause) {
@@ -318,13 +318,17 @@ final class EclipseLocation {
boolean readSucceeded = false;
try {
FileOutputStream out = new FileOutputStream(lombokJar);
- InputStream in = new FileInputStream(ourJar);
try {
- while (true) {
- int r = in.read(b);
- if (r == -1) break;
- if (r > 0) readSucceeded = true;
- out.write(b, 0, r);
+ InputStream in = new FileInputStream(ourJar);
+ try {
+ while (true) {
+ int r = in.read(b);
+ if (r == -1) break;
+ if (r > 0) readSucceeded = true;
+ out.write(b, 0, r);
+ }
+ } finally {
+ in.close();
}
} finally {
out.close();