Skip to content

Commit

Permalink
spotbugs
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Etschel <philipp@etschel.net>
  • Loading branch information
etschelp committed Nov 18, 2023
1 parent 315b9dc commit b1368d1
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/hyperledger/aries/ClientToTenant.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -14,7 +14,7 @@

@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class ClientToTenant extends WalletRecord implements AutoCloseable {
public final class ClientToTenant extends WalletRecord implements AutoCloseable {
private final AriesClient restClient;
private final AriesWebSocketClient webSocketClient;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -13,7 +13,7 @@
import org.hyperledger.aries.api.AcaPyRequestFilter;

@Data
public class DidExchangeCreateRequestFilter implements AcaPyRequestFilter {
public final class DidExchangeCreateRequestFilter implements AcaPyRequestFilter {
/** Public DID to which to request connection */
private String theirPublicDid;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -13,7 +13,7 @@
import org.hyperledger.aries.api.AcaPyRequestFilter;

@Data @Builder
public class ConnectionStartIntroductionFilter implements AcaPyRequestFilter {
public final class ConnectionStartIntroductionFilter implements AcaPyRequestFilter {
@NonNull private String targetConnectionId;
private String message;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -15,7 +15,7 @@
import javax.annotation.Nullable;

@Data @Builder @NoArgsConstructor @AllArgsConstructor
public class V1CredentialOfferRequest {
public final class V1CredentialOfferRequest {

private Boolean autoIssue;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -20,7 +20,7 @@
* or issued to a connection (issuer to holder)
*/
@Data @Builder @NoArgsConstructor @AllArgsConstructor
public class V1CredentialProposalRequest {
public final class V1CredentialProposalRequest {

/**
* Holder choice to auto accept offer in this credential exchange
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand Down Expand Up @@ -86,7 +86,7 @@ public static class LabeledVerifiableCredential extends VerifiableCredential {
@SuperBuilder @NoArgsConstructor @AllArgsConstructor
@Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true)
@JsonInclude(Include.NON_NULL)
public static class VerifiableIndyCredential extends LabeledVerifiableCredential {
public static final class VerifiableIndyCredential extends LabeledVerifiableCredential {
@Nullable
@SerializedName("indyIssuer")
private String indyIssuer;
Expand All @@ -103,7 +103,7 @@ public static class VerifiableIndyCredential extends LabeledVerifiableCredential
@SuperBuilder @NoArgsConstructor @AllArgsConstructor
@Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true)
@JsonInclude(Include.NON_NULL)
public static class VerifiableCredentialMatch extends VerifiableCredential {
public static final class VerifiableCredentialMatch extends VerifiableCredential {
private String recordId;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand Down Expand Up @@ -29,7 +29,7 @@
*/
@Data @Builder @NoArgsConstructor @AllArgsConstructor
@JsonPropertyOrder({ "@context", "type" })
public class VerifiablePresentation<T extends VerifiableCredential> {
public final class VerifiablePresentation<T extends VerifiableCredential> {

public static final Type VERIFIABLE_CREDENTIAL_TYPE =
new TypeToken<VerifiablePresentation<VerifiableCredential>>(){}.getType();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -12,5 +12,5 @@

@Data @NoArgsConstructor
public class EndpointResponse {
public String endpoint;
private String endpoint;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -13,7 +13,7 @@
import org.hyperledger.aries.api.AcaPyRequestFilter;

@Data @Builder
public class RegisterNymFilter implements AcaPyRequestFilter {
public final class RegisterNymFilter implements AcaPyRequestFilter {
@NonNull
private String did;
@NonNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand Down Expand Up @@ -30,7 +30,7 @@
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PresentProofRequest {
public final class PresentProofRequest {

private Boolean autoVerify;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -12,7 +12,7 @@
import javax.annotation.Nullable;

@Data @NoArgsConstructor @AllArgsConstructor @Builder
public class RevRegCreateRequest {
public final class RevRegCreateRequest {
@NonNull private String credentialDefinitionId;
/** Maximum credentials, minimum 4, maximum 32768 */
@Nullable private Integer maxCredNum;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -14,6 +14,6 @@
import lombok.NonNull;

@Data @NoArgsConstructor @AllArgsConstructor @Builder
public class RevRegUpdateTailsFileUri {
public final class RevRegUpdateTailsFileUri {
@NonNull private String tailsPublicUri;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -14,7 +14,7 @@
import java.util.List;

@Data @Builder
public class SchemaSendRequest {
public final class SchemaSendRequest {
@Nonnull
private List<String> attributes;
@Nonnull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand Down Expand Up @@ -48,7 +48,7 @@ public class StatusConfig {
@SerializedName("debug.auto_respond_messages")
private Boolean autoRespondMessages;
@SerializedName("debug.auto_respond_credential_proposal")
public Boolean autoRespondCredentialProposal;
private Boolean autoRespondCredentialProposal;
@SerializedName("debug.auto_respond_credential_offer")
private Boolean autoRespondCredentialOffer;
@SerializedName("debug.auto_respond_credential_request")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* Copyright (c) 2020-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/acapy-java-client
*
Expand All @@ -25,7 +25,7 @@
import java.util.List;

@Slf4j
public class AriesWebSocketListener extends okhttp3.WebSocketListener {
public final class AriesWebSocketListener extends okhttp3.WebSocketListener {

private final Gson gson = GsonConfig.defaultConfig();

Expand Down
15 changes: 15 additions & 0 deletions src/test/resources/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@
<Bug pattern="THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION" />
</Match>

<Match>
<Class name="org.hyperledger.aries.api.server.AdminConfig" />
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" />
</Match>

<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
<And>
<Or>
<Class name="org.hyperledger.aries.api.jsonld.VerifiableCredential" />
<Class name="org.hyperledger.aries.api.out_of_band.BaseOOBInvitationHelper" />
</Or>
</And>
</Match>

<Match>
<Bug pattern="CRLF_INJECTION_LOGS" />
</Match>
Expand Down

0 comments on commit b1368d1

Please sign in to comment.