mirror of
https://github.com/Athou/commafeed.git
synced 2026-09-20 19:51:09 +00:00
format empty records and anonymous types as a single line
This commit is contained in:
@@ -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) {}
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
}
|
||||
|
||||
@@ -119,7 +119,6 @@ public class FeedRefreshWorker {
|
||||
}
|
||||
}
|
||||
|
||||
public record FeedRefreshWorkerResult(Feed feed, List<Entry> entries) {
|
||||
}
|
||||
public record FeedRefreshWorkerResult(Feed feed, List<Entry> entries) {}
|
||||
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
}
|
||||
|
||||
@@ -199,6 +199,5 @@ class FeverIT extends BaseIT {
|
||||
}
|
||||
}
|
||||
|
||||
private record Param(String name, String value) {
|
||||
}
|
||||
private record Param(String name, String value) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user