Skip to content

Commit

Permalink
[#126]Added AutoCloseable to Writers and Readers
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasstamann committed Apr 25, 2024
1 parent c6b8049 commit df875bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Abstract base class for writers of java code and resources.
*/
public class FileObjectSimpleWriter<T extends FileObject> extends SimpleWriter{
public class FileObjectSimpleWriter<T extends FileObject> extends SimpleWriter implements AutoCloseable{

private final T fileObject;
private final Writer foWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* A simple writer for writing kotlin source files.
*/
public class SimpleKotlinWriter extends SimpleWriter {
public class SimpleKotlinWriter extends SimpleWriter implements AutoCloseable{

final static String KAPT_KOTLIN_GENERATED = "kapt.kotlin.generated";
private final static Pattern PACKAGE_PATTERN = Pattern.compile("(\\w+?(?:[.]\\w+?)*)[.]\\w*");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* Simple helper class to open and read a resource file.
*/
public class SimpleResourceReader {
public class SimpleResourceReader implements AutoCloseable{

private final FileObject fileObject;
private final BufferedReader foReader;
Expand Down

0 comments on commit df875bc

Please sign in to comment.