Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion services/main-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ RUN mvn clean package -DskipTests -pl services/main-api -am
FROM amazoncorretto:17-alpine
WORKDIR /app
COPY --from=builder /app/services/main-api/target/*.jar app.jar
ENV JAVA_OPTS="-XX:TieredStopAtLevel=1 -XX:+UseSerialGC"

ENV JAVA_OPTS="-Xms512m -Xmx512m -XX:+AlwaysPreTouch -XX:+UseSerialGC"

ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.github.adrian.wieczorek.local_trade.service.advertisement.AdvertisementEntity;
import jakarta.persistence.*;
import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
Expand Down Expand Up @@ -32,9 +33,11 @@ public class TradeEntity {
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "advertisement_id")
private AdvertisementEntity advertisementEntity;
@NotNull
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "seller_id")
private UsersEntity seller;
@NotNull
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "buyer_id")
private UsersEntity buyer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
@RequiredArgsConstructor
public class NotificationDispatcher {

// noinspection MismatchedQueryAndUpdateOfCollection
private final List<NotificationHandler> handlers;

Check warning on line 17 in services/notification-service/src/main/java/io/github/adrian/wieczorek/notifications/service/business/NotificationDispatcher.java

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Mismatched query and update of collection

Contents of empty collection `handlers` are queried, but it's never populated

public void dispatch(NotificationEvent notificationEvent) {
if (notificationEvent == null || notificationEvent.getEventType() == null) {
Expand Down
Loading