Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<properties>
<java.version>25</java.version>
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
<maven-checkstyle-plugin.version>3.5.0</maven-checkstyle-plugin.version>
<checkstyle.version>10.6.0</checkstyle.version>
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
<checkstyle.version>12.1.2</checkstyle.version>
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
<jjwt.version>0.12.6</jjwt.version>
<jjwt.version>0.13.0</jjwt.version>
<okhttp.version>5.3.2</okhttp.version>
</properties>
<organization>
Expand Down Expand Up @@ -91,6 +91,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
Comment thread
thomasturrell marked this conversation as resolved.
Outdated
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,16 @@ private List<Object> getParts(Object object) {

final var list = new ArrayList<>();

Stream<Attachment> attachments;
if (object instanceof final Statement statement) {
attachments = getRealAttachments(statement);
} else if (object instanceof final List<?> statements
&& !statements.isEmpty()
&& statements.get(0) instanceof Statement) {
attachments = ((List<Statement>) statements).stream().flatMap(this::getRealAttachments);
} else {
final Stream<Attachment> attachments =
switch (object) {
case Statement statement -> getRealAttachments(statement);
case List<?> statements
when !statements.isEmpty() && statements.get(0) instanceof Statement ->
((List<Statement>) statements).stream().flatMap(this::getRealAttachments);
default -> null;
};

if (attachments == null) {
// The object is not a statement or list of statements
return list;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void accept(Builder builder) {
mockWebServer = new MockWebServer();
try {
mockWebServer.start();
} catch (final IOException e) {
} catch (final IOException _) {
// Ignore - test will fail if server doesn't start
}
builder.baseUrl(mockWebServer.url("").toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void accept(Builder builder) {
mockWebServer = new MockWebServer();
try {
mockWebServer.start();
} catch (final IOException e) {
} catch (final IOException _) {
// Ignore - test will fail if server doesn't start
}
builder.baseUrl(mockWebServer.url("").toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static Locale validateLocale(String localeString, DeserializationContext deseria
// test validity of language and country codes (throws exception)
locale.getISO3Language();
locale.getISO3Country();
} catch (final MissingResourceException e) {
} catch (final MissingResourceException _) {
Comment thread
thomasturrell marked this conversation as resolved.
Outdated
locale = null;
}
// test the validity of the whole key
Expand Down
Loading