From 217f8ffd1a1a59ee2e43a759e6bf6211feb14417 Mon Sep 17 00:00:00 2001 From: Stark Date: Fri, 1 Nov 2024 17:11:59 +0100 Subject: [PATCH] Code Style fix --- .../event/action/update/JooqUpdateEventAction.java | 2 +- .../event/action/update/UpdateEventAction.java | 2 +- .../action/deleteOrder/DeleteOrderAction.java | 5 +++-- .../action/deleteOrder/JooqDeleteOrderAction.java | 4 ++-- .../action/upsertOrder/JooqUpsertOrderAction.java | 6 ++++-- .../action/upsertOrder/UpsertOrderAction.java | 5 ++++- .../order/finder/pretix/PretixOrderFinder.java | 10 +++++----- .../order/finder/pretix/RestPretixOrderFinder.java | 14 ++++++++------ 8 files changed, 28 insertions(+), 20 deletions(-) diff --git a/application/src/main/java/net/furizon/backend/feature/pretix/event/action/update/JooqUpdateEventAction.java b/application/src/main/java/net/furizon/backend/feature/pretix/event/action/update/JooqUpdateEventAction.java index ac440c0..732e307 100644 --- a/application/src/main/java/net/furizon/backend/feature/pretix/event/action/update/JooqUpdateEventAction.java +++ b/application/src/main/java/net/furizon/backend/feature/pretix/event/action/update/JooqUpdateEventAction.java @@ -21,7 +21,7 @@ public class JooqUpdateEventAction implements UpdateEventAction { private final JsonSerializer jsonSerializer; @Override - public void invoke(@NotNull Event event) { + public void invoke(@NotNull final Event event) { command.execute( PostgresDSL .update(EVENTS) diff --git a/application/src/main/java/net/furizon/backend/feature/pretix/event/action/update/UpdateEventAction.java b/application/src/main/java/net/furizon/backend/feature/pretix/event/action/update/UpdateEventAction.java index 6d38165..ebf4ee7 100644 --- a/application/src/main/java/net/furizon/backend/feature/pretix/event/action/update/UpdateEventAction.java +++ b/application/src/main/java/net/furizon/backend/feature/pretix/event/action/update/UpdateEventAction.java @@ -4,5 +4,5 @@ import org.jetbrains.annotations.NotNull; public interface UpdateEventAction { - void invoke(@NotNull Event event); + void invoke(@NotNull final Event event); } diff --git a/application/src/main/java/net/furizon/backend/feature/pretix/order/action/deleteOrder/DeleteOrderAction.java b/application/src/main/java/net/furizon/backend/feature/pretix/order/action/deleteOrder/DeleteOrderAction.java index c4858af..4c74d69 100644 --- a/application/src/main/java/net/furizon/backend/feature/pretix/order/action/deleteOrder/DeleteOrderAction.java +++ b/application/src/main/java/net/furizon/backend/feature/pretix/order/action/deleteOrder/DeleteOrderAction.java @@ -4,6 +4,7 @@ import org.jetbrains.annotations.NotNull; public interface DeleteOrderAction { - void invoke(@NotNull Order order); - void invoke(@NotNull String code); + void invoke(@NotNull final Order order); + + void invoke(@NotNull final String code); } diff --git a/application/src/main/java/net/furizon/backend/feature/pretix/order/action/deleteOrder/JooqDeleteOrderAction.java b/application/src/main/java/net/furizon/backend/feature/pretix/order/action/deleteOrder/JooqDeleteOrderAction.java index 70675fa..0d19b66 100644 --- a/application/src/main/java/net/furizon/backend/feature/pretix/order/action/deleteOrder/JooqDeleteOrderAction.java +++ b/application/src/main/java/net/furizon/backend/feature/pretix/order/action/deleteOrder/JooqDeleteOrderAction.java @@ -15,12 +15,12 @@ public class JooqDeleteOrderAction implements DeleteOrderAction { private final SqlCommand command; @Override - public void invoke(@NotNull Order order) { + public void invoke(@NotNull final Order order) { this.invoke(order.getCode()); } @Override - public void invoke(@NotNull String code) { + public void invoke(@NotNull final String code) { command.execute( PostgresDSL .deleteFrom(ORDERS) diff --git a/application/src/main/java/net/furizon/backend/feature/pretix/order/action/upsertOrder/JooqUpsertOrderAction.java b/application/src/main/java/net/furizon/backend/feature/pretix/order/action/upsertOrder/JooqUpsertOrderAction.java index dba19c9..4b2f2ca 100644 --- a/application/src/main/java/net/furizon/backend/feature/pretix/order/action/upsertOrder/JooqUpsertOrderAction.java +++ b/application/src/main/java/net/furizon/backend/feature/pretix/order/action/upsertOrder/JooqUpsertOrderAction.java @@ -19,7 +19,10 @@ public class JooqUpsertOrderAction implements UpsertOrderAction { private final JsonSerializer jsonSerializer; @Override - public void invoke(@NotNull Order order, @NotNull PretixInformation pretixInformation) { + public void invoke( + @NotNull final Order order, + @NotNull final PretixInformation pretixInformation + ) { String code = order.getCode(); short orderStatus = (short) order.getOrderStatus().ordinal(); short sponsorship = (short) order.getSponsorship().ordinal(); @@ -34,7 +37,6 @@ public void invoke(@NotNull Order order, @NotNull PretixInformation pretixInform //Event event = order.getOrderEvent(); final var answers = jsonSerializer.serializeAsJson(order.getAllAnswers(pretixInformation)); - command.execute( PostgresDSL .insertInto( diff --git a/application/src/main/java/net/furizon/backend/feature/pretix/order/action/upsertOrder/UpsertOrderAction.java b/application/src/main/java/net/furizon/backend/feature/pretix/order/action/upsertOrder/UpsertOrderAction.java index 8a952d7..672ca06 100644 --- a/application/src/main/java/net/furizon/backend/feature/pretix/order/action/upsertOrder/UpsertOrderAction.java +++ b/application/src/main/java/net/furizon/backend/feature/pretix/order/action/upsertOrder/UpsertOrderAction.java @@ -5,5 +5,8 @@ import org.jetbrains.annotations.NotNull; public interface UpsertOrderAction { - void invoke(@NotNull Order order, @NotNull PretixInformation pretixInformation); + void invoke( + @NotNull final Order order, + @NotNull final PretixInformation pretixInformation + ); } diff --git a/application/src/main/java/net/furizon/backend/feature/pretix/order/finder/pretix/PretixOrderFinder.java b/application/src/main/java/net/furizon/backend/feature/pretix/order/finder/pretix/PretixOrderFinder.java index e6271da..8afe7db 100644 --- a/application/src/main/java/net/furizon/backend/feature/pretix/order/finder/pretix/PretixOrderFinder.java +++ b/application/src/main/java/net/furizon/backend/feature/pretix/order/finder/pretix/PretixOrderFinder.java @@ -9,15 +9,15 @@ public interface PretixOrderFinder { @NotNull PretixPaging getPagedOrders( - @NotNull String organizer, - @NotNull String event, + @NotNull final String organizer, + @NotNull final String event, int page ); @NotNull Optional fetchOrderByCode( - @NotNull String organizer, - @NotNull String event, - @NotNull String code + @NotNull final String organizer, + @NotNull final String event, + @NotNull final String code ); } diff --git a/application/src/main/java/net/furizon/backend/feature/pretix/order/finder/pretix/RestPretixOrderFinder.java b/application/src/main/java/net/furizon/backend/feature/pretix/order/finder/pretix/RestPretixOrderFinder.java index 255e41e..a038fab 100644 --- a/application/src/main/java/net/furizon/backend/feature/pretix/order/finder/pretix/RestPretixOrderFinder.java +++ b/application/src/main/java/net/furizon/backend/feature/pretix/order/finder/pretix/RestPretixOrderFinder.java @@ -21,15 +21,17 @@ @Slf4j public class RestPretixOrderFinder implements PretixOrderFinder { private final ParameterizedTypeReference> pretixPagedOrder = - new ParameterizedTypeReference<>() { - }; + new ParameterizedTypeReference<>() {}; @Qualifier("pretixHttpClient") private final HttpClient pretixHttpClient; @Override public @NotNull PretixPaging getPagedOrders( - @NotNull String organizer, @NotNull String event, int page) { + @NotNull final String organizer, + @NotNull final String event, + int page + ) { final var request = HttpRequest.>create() .method(HttpMethod.GET) .path("/organizers/{organizer}/events/{event}/orders/") @@ -51,9 +53,9 @@ public class RestPretixOrderFinder implements PretixOrderFinder { @Override public @NotNull Optional fetchOrderByCode( - @NotNull String organizer, - @NotNull String event, - @NotNull String code + @NotNull final String organizer, + @NotNull final String event, + @NotNull final String code ) { final var request = HttpRequest.create() .method(HttpMethod.GET)