From: Ivan Frade Date: Fri, 9 Feb 2024 17:18:37 +0000 (-0800) Subject: ChangedPathFilter: Suppress warning about backing array (errorprone) X-Git-Tag: v6.9.0.202402211805-m3~11^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e5fd2409c85141a020eb023977d12c2276776173;p=jgit.git ChangedPathFilter: Suppress warning about backing array (errorprone) Errorprone warns about direct access to the underlying array. That is the intention of this code, and those ByteBuffers are created with ByteBuffer#wrap() so it should be safe. Change-Id: Ic8e8b288f08ac794cf7f09dfccfefcba0a4685bf --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/ChangedPathFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/ChangedPathFilter.java index 53d921e8f8..ad3ce50181 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/ChangedPathFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/ChangedPathFilter.java @@ -87,6 +87,7 @@ public class ChangedPathFilter { * the paths that the filter must match * @return the corresponding filter */ + @SuppressWarnings("ByteBufferBackingArray") public static ChangedPathFilter fromPaths(Set paths) { if (paths.isEmpty()) { return EMPTY;