format empty records and anonymous types as a single line

This commit is contained in:
Athou
2026-05-08 17:41:07 +02:00
parent 3dd298c0c8
commit f207bfaddd
10 changed files with 20 additions and 34 deletions

View File

@@ -42,14 +42,11 @@ public class ExceptionMappers {
}
@RegisterForReflection
public record UnauthorizedResponse(String message, boolean allowRegistrations) {
}
public record UnauthorizedResponse(String message, boolean allowRegistrations) {}
@RegisterForReflection
public record AuthenticationFailed(String message) {
}
public record AuthenticationFailed(String message) {}
@RegisterForReflection
public record ValidationFailed(String message) {
}
public record ValidationFailed(String message) {}
}

View File

@@ -300,11 +300,9 @@ public class HttpGetter {
}
private record HttpResponse(int code, String lastModifiedHeader, String eTagHeader, CacheControl cacheControl, Instant retryAfter,
byte[] content, String contentType, String urlAfterRedirect) {
}
byte[] content, String contentType, String urlAfterRedirect) {}
public record HttpResult(byte[] content, String contentType, String lastModifiedSince, String eTag, String urlAfterRedirect,
Duration validFor) {
}
Duration validFor) {}
}

View File

@@ -94,6 +94,5 @@ public class FeedEntryDAO extends GenericDAO<FeedEntry> {
return delete(query.fetch());
}
public record FeedCapacity(Long id, Long capacity) {
}
public record FeedCapacity(Long id, Long capacity) {}
}

View File

@@ -104,8 +104,7 @@ public class FeedFetcher {
}
public record FeedFetcherResult(FeedParserResult feed, String urlAfterRedirect, String lastModifiedHeader, String lastETagHeader,
String contentHash, Duration validFor) {
}
String contentHash, Duration validFor) {}
public static class NoFeedFoundException extends Exception {
private static final long serialVersionUID = 1L;

View File

@@ -163,10 +163,8 @@ public class FeedRefreshUpdater {
return new FeedRefreshUpdaterResult(insertedUnreadEntriesBySubscription);
}
private record AddEntryResult(boolean processed, FeedEntry insertedEntry, Set<FeedSubscription> subscriptionsForWhichEntryIsUnread) {
}
private record AddEntryResult(boolean processed, FeedEntry insertedEntry, Set<FeedSubscription> subscriptionsForWhichEntryIsUnread) {}
public record FeedRefreshUpdaterResult(Map<FeedSubscription, List<FeedEntry>> insertedUnreadEntriesBySubscription) {
}
public record FeedRefreshUpdaterResult(Map<FeedSubscription, List<FeedEntry>> insertedUnreadEntriesBySubscription) {}
}

View File

@@ -119,7 +119,6 @@ public class FeedRefreshWorker {
}
}
public record FeedRefreshWorkerResult(Feed feed, List<Entry> entries) {
}
public record FeedRefreshWorkerResult(Feed feed, List<Entry> entries) {}
}

View File

@@ -5,16 +5,11 @@ import java.util.List;
public record FeedParserResult(String title, String link, Instant lastPublishedDate, Long averageEntryInterval, Instant lastEntryDate,
List<Entry> entries) {
public record Entry(String guid, String url, Instant published, Content content) {
}
public record Entry(String guid, String url, Instant published, Content content) {}
public record Content(String title, String content, String author, String categories, Enclosure enclosure, Media media) {
}
public record Content(String title, String content, String author, String categories, Enclosure enclosure, Media media) {}
public record Enclosure(String url, String type) {
}
public record Media(String description, String thumbnailUrl, Integer thumbnailWidth, Integer thumbnailHeight) {
}
public record Enclosure(String url, String type) {}
public record Media(String description, String thumbnailUrl, Integer thumbnailWidth, Integer thumbnailHeight) {}
}

View File

@@ -199,6 +199,5 @@ class FeverIT extends BaseIT {
}
}
private record Param(String name, String value) {
}
private record Param(String name, String value) {}
}