Skip to content

Commit

Permalink
Allow closing paren to be on next line
Browse files Browse the repository at this point in the history
Allow (but don't require) the closing parenthesis of a method invocation
to be on the following line.

Signed-off-by: Andrew Rouse <[email protected]>
  • Loading branch information
Azquelt authored and manovotn committed Dec 13, 2023
1 parent ff15f60 commit 104753e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ private SecurityActions() {

static <T> ServiceLoader<T> loadService(Class<T> service, ClassLoader classLoader) {
return AccessController.doPrivileged(
(PrivilegedAction<ServiceLoader<T>>) () -> ServiceLoader.load(service, classLoader));
(PrivilegedAction<ServiceLoader<T>>) () -> ServiceLoader.load(service, classLoader)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ private SecurityActions() {

static <T> ServiceLoader<T> loadService(Class<T> service, ClassLoader classLoader) {
return AccessController.doPrivileged(
(PrivilegedAction<ServiceLoader<T>>) () -> ServiceLoader.load(service, classLoader));
(PrivilegedAction<ServiceLoader<T>>) () -> ServiceLoader.load(service, classLoader)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ static void setAccessible(Method method) {
(PrivilegedAction<?>) () -> {
method.setAccessible(true);
return null;
});
}
);
} else {
method.setAccessible(true);
}
Expand All @@ -48,7 +49,8 @@ static void setAccessible(Method method) {
static Method[] getDeclaredMethods(Class<?> clazz) {
if (System.getSecurityManager() != null) {
return AccessController.doPrivileged(
(PrivilegedAction<Method[]>) () -> clazz.getDeclaredMethods());
(PrivilegedAction<Method[]>) () -> clazz.getDeclaredMethods()
);
} else {
return clazz.getDeclaredMethods();
}
Expand Down
2 changes: 1 addition & 1 deletion ide-config/src/main/resources/cdi-format.xml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="preserve_positions"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
Expand Down

0 comments on commit 104753e

Please sign in to comment.