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:
@@ -65,7 +65,7 @@
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
@@ -261,7 +261,7 @@
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
|
||||
|
||||
@@ -118,7 +118,9 @@
|
||||
<property name="message" value="Line has leading space characters; indentation should be performed with tabs only." />
|
||||
<property name="ignoreComments" value="true" />
|
||||
</module>
|
||||
<module name="WhitespaceAround" />
|
||||
<module name="WhitespaceAround">
|
||||
<property name="allowEmptyTypes" value="true" />
|
||||
</module>
|
||||
|
||||
</module>
|
||||
</module>
|
||||
|
||||
@@ -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