Refactoring of the ExtensionAnnotationProcessor #41704
Closed
renanmachad
started this conversation in
Design Discussions
Replies: 3 comments
-
Sure! Please open a PR; it would be easier to understand how it can be simplified. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Note that all this code has been written before we switched to Java 17 so don't hesitate to use new constructs to simplify this stuff. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Okay, very thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, in the ExtensionAnnotationProcessor class we have this code, there are many try-with-resources instructions, but this can be simplified,
is it justified to open a PR to improve this?
I'm new to the open source community and I'm looking for ways to help the framework I use daily.
Thanks!
private void writeListResourceFile(Collection<String> crListClasses, FileObject listResource) throws IOException { try (OutputStream os = listResource.openOutputStream()) { try (BufferedOutputStream bos = new BufferedOutputStream(os)) { try (OutputStreamWriter osw = new OutputStreamWriter(bos, StandardCharsets.UTF_8)) { try (BufferedWriter bw = new BufferedWriter(osw)) { for (string item: crListClasses) { bw.write(item); bw.newLine(); } } } } } }
Beta Was this translation helpful? Give feedback.
All reactions