Remove throws IOException from DefaultGenerationContext.writeGeneratedContent()

The `throws` declaration is unnecessary since writeGeneratedContent()
will never throw an IOException.
This commit is contained in:
Sam Brannen
2022-08-06 14:34:04 +03:00
parent a466179bc8
commit 0944c9a99c
4 changed files with 11 additions and 41 deletions

View File

@@ -16,9 +16,6 @@
package org.springframework.test.aot.generate;
import java.io.IOException;
import java.io.UncheckedIOException;
import org.springframework.aot.generate.ClassNameGenerator;
import org.springframework.aot.generate.DefaultGenerationContext;
import org.springframework.aot.generate.GenerationContext;
@@ -26,9 +23,7 @@ import org.springframework.aot.generate.InMemoryGeneratedFiles;
/**
* {@link GenerationContext} test implementation that uses
* {@link InMemoryGeneratedFiles} by default, with a convenient override of
* {@link #writeGeneratedContent()} that throws {@link UncheckedIOException}
* instead of {@link IOException}.
* {@link InMemoryGeneratedFiles} by default.
*
* @author Stephane Nicoll
* @author Sam Brannen
@@ -68,14 +63,4 @@ public class TestGenerationContext extends DefaultGenerationContext {
return (InMemoryGeneratedFiles) super.getGeneratedFiles();
}
@Override
public void writeGeneratedContent() {
try {
super.writeGeneratedContent();
}
catch (IOException ex) {
throw new UncheckedIOException(ex);
}
}
}