Skip to content

Commit

Permalink
refactor: Add whitespace after varargs (#5358)
Browse files Browse the repository at this point in the history
  • Loading branch information
tenax66 authored Jul 22, 2023
1 parent 8ec4e38 commit c49efd7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/spoon/reflect/factory/CodeFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public <T> CtFieldAccess<Class<T>> createClassAccess(CtTypeReference<T> type) {
* @param <T> the actual type of the decelerating type of the constructor if available
* @return the constructor call
*/
public <T> CtConstructorCall<T> createConstructorCall(CtTypeReference<T> type, CtExpression<?>...parameters) {
public <T> CtConstructorCall<T> createConstructorCall(CtTypeReference<T> type, CtExpression<?>... parameters) {
CtConstructorCall<T> constructorCall = factory.Core()
.createConstructorCall();
CtExecutableReference<T> executableReference = factory.Core()
Expand All @@ -197,7 +197,7 @@ public <T> CtConstructorCall<T> createConstructorCall(CtTypeReference<T> type, C
/**
* Creates a new anonymous class.
*/
public <T> CtNewClass<T> createNewClass(CtType<T> superClass, CtExpression<?>...parameters) {
public <T> CtNewClass<T> createNewClass(CtType<T> superClass, CtExpression<?>... parameters) {
CtNewClass<T> ctNewClass = factory.Core().createNewClass();
CtConstructor<T> constructor = ((CtClass) superClass).getConstructor(Arrays.stream(parameters).map(x -> x.getType()).toArray(CtTypeReference[]::new));
if (constructor == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public <T> CtExecutableReference<T> createReference(Constructor<T> constructor)
* @param <T> Infered type of the constructor.
* @return CtExecutablereference if a constructor.
*/
public <T> CtExecutableReference<T> createReference(CtTypeReference<T> type, CtExpression<?>...parameters) {
public <T> CtExecutableReference<T> createReference(CtTypeReference<T> type, CtExpression<?>... parameters) {
final CtExecutableReference<T> executableReference = factory.Core().createExecutableReference();
executableReference.setType(type);
executableReference.setDeclaringType(type == null ? null : type.clone());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ protected String getFragment(int start, int end) {
* fails when `values` are not sorted ascending
* It is used to check whether start/end values of SourcePosition are consistent
*/
protected static void checkArgsAreAscending(int...values) {
protected static void checkArgsAreAscending(int... values) {
int last = -1;
for (int value : values) {
if (value < 0) {
Expand Down

0 comments on commit c49efd7

Please sign in to comment.