Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Long try-with-resources adheres to palantir style #835

Merged
merged 2 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle-baseline-java-config/resources/spotless/eclipse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="48"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="80"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
class B21465217 {
void m() {
try (
JimfsOutputStream out2 = newOutputStream(false);
try (JimfsOutputStream out2 = newOutputStream(false);
BufferedOutputStream bout = new BufferedOutputStream(out2);
OutputStreamWriter writer = new OutputStreamWriter(bout, UTF_8___________________________)) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ class TryWtihResources {
try (@A
final @B C c = c();) {}

try (
final BufferedWriter writer =
new BufferedWriter(new OutputStreamWriter(testFile, Charset.defaultCharset()))) {
try (final BufferedWriter writer =
new BufferedWriter(new OutputStreamWriter(testFile, Charset.defaultCharset()))) {
writer.append("tom cruise\n").append("avatar\n");
writer.flush();
}
Expand Down