diff options
author | Ivan Frade <ifrade@google.com> | 2024-11-12 15:40:43 -0800 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2024-11-13 09:10:37 -0800 |
commit | 4815db563bd106605b55c0e30d637150b02aa6b3 (patch) | |
tree | 75ec11f1a505df0493ccbad70812a0e845802b5a | |
parent | fbbd0c3e3e5a940deb18332b116ba869381c6f62 (diff) | |
download | jgit-4815db563bd106605b55c0e30d637150b02aa6b3.tar.gz jgit-4815db563bd106605b55c0e30d637150b02aa6b3.zip |
[errorprone] ssh: suppress warning for arrays in records
Errorpone considers an error to have arrays (mutable) inside records
(immutable) [1].
Suppress the warnings in these records, as they are overriding equals
and hash to do the right thing.
[1] https://errorprone.info/bugpattern/ArrayRecordComponent
Change-Id: I01c724516b1b14d512d366a35708436463fccffc
2 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/signing/ssh/AllowedSigners.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/signing/ssh/AllowedSigners.java index 92cf1faec9..cfbe7a78a7 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/signing/ssh/AllowedSigners.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/signing/ssh/AllowedSigners.java @@ -82,6 +82,7 @@ final class AllowedSigners extends ModifiableFileWatcher { private static final Predicate<AllowedEntry> PLAIN_KEYS = Predicate .not(CERTIFICATES); + @SuppressWarnings("ArrayRecordComponent") static record AllowedEntry(String[] identities, boolean isCA, String[] namespaces, Instant validAfter, Instant validBefore, String key) { diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/signing/ssh/OpenSshBinaryKrl.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/signing/ssh/OpenSshBinaryKrl.java index 46518d8c84..6b19eb3295 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/signing/ssh/OpenSshBinaryKrl.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/signing/ssh/OpenSshBinaryKrl.java @@ -90,6 +90,7 @@ class OpenSshBinaryKrl { * @param blob * the array to wrap */ + @SuppressWarnings("ArrayRecordComponent") private static record Blob(byte[] blob) { @Override |