Skip to content

Commit 0ea2173

Browse files
committed
Use UncheckedIOException rather than RuntimeException
1 parent aa33d4e commit 0ea2173

File tree

1 file changed

+4
-3
lines changed
  • inject-generator/src/main/java/io/avaje/inject/generator

1 file changed

+4
-3
lines changed

inject-generator/src/main/java/io/avaje/inject/generator/Append.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.avaje.inject.generator;
22

33
import java.io.IOException;
4+
import java.io.UncheckedIOException;
45
import java.io.Writer;
56

67
/**
@@ -21,7 +22,7 @@ Append append(String content) {
2122
writer.append(content);
2223
return this;
2324
} catch (IOException e) {
24-
throw new RuntimeException(e);
25+
throw new UncheckedIOException(e);
2526
}
2627
}
2728

@@ -30,7 +31,7 @@ void close() {
3031
writer.flush();
3132
writer.close();
3233
} catch (IOException e) {
33-
throw new RuntimeException(e);
34+
throw new UncheckedIOException(e);
3435
}
3536
}
3637

@@ -39,7 +40,7 @@ Append eol() {
3940
writer.append("\n");
4041
return this;
4142
} catch (IOException e) {
42-
throw new RuntimeException(e);
43+
throw new UncheckedIOException(e);
4344
}
4445
}
4546

0 commit comments

Comments
 (0)