11package org .kohsuke .github ;
22
33import com .infradna .tool .bridge_method_injector .WithBridgeMethods ;
4+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
45
56import java .io .IOException ;
67import java .net .URL ;
1617 * @see GHRepository#getCommit(String)
1718 * @see GHCommitComment#getCommit()
1819 */
20+ @ SuppressFBWarnings (value = {"NP_UNWRITTEN_FIELD" , "UWF_UNWRITTEN_FIELD" },
21+ justification = "JSON API" )
1922public class GHCommit {
2023 private GHRepository owner ;
2124
@@ -24,6 +27,8 @@ public class GHCommit {
2427 /**
2528 * Short summary of this commit.
2629 */
30+ @ SuppressFBWarnings (value = {"UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" , "UWF_UNWRITTEN_FIELD" ,
31+ "NP_UNWRITTEN_FIELD" , "UWF_UNWRITTEN_FIELD" }, justification = "JSON API" )
2732 public static class ShortInfo {
2833 private GHAuthor author ;
2934 private GHAuthor committer ;
@@ -67,6 +72,8 @@ public static class Stats {
6772 /**
6873 * A file that was modified.
6974 */
75+ @ SuppressFBWarnings (value = "UWF_UNWRITTEN_FIELD" ,
76+ justification = "It's being initilized by JSON deserialization" )
7077 public static class File {
7178 String status ;
7279 int changes ,additions ,deletions ;
@@ -104,6 +111,8 @@ public String getStatus() {
104111 /**
105112 * Full path in the repository.
106113 */
114+ @ SuppressFBWarnings (value = "NM_CONFUSING" ,
115+ justification = "It's a part of the library's API and cannot be renamed" )
107116 public String getFileName () {
108117 return filename ;
109118 }
@@ -147,13 +156,19 @@ public String getSha() {
147156 }
148157
149158 public static class Parent {
150- String url ,sha ;
159+ @ SuppressFBWarnings (value = "UUF_UNUSED_FIELD" , justification = "We don't provide it in API now" )
160+ String url ;
161+ String sha ;
151162 }
152163
153164 static class User {
154165 // TODO: what if someone who doesn't have an account on GitHub makes a commit?
155- String url ,avatar_url ,login ,gravatar_id ;
166+ @ SuppressFBWarnings (value = "UUF_UNUSED_FIELD" , justification = "We don't provide it in API now" )
167+ String url ,avatar_url ,gravatar_id ;
168+ @ SuppressFBWarnings (value = "UUF_UNUSED_FIELD" , justification = "We don't provide it in API now" )
156169 int id ;
170+
171+ String login ;
157172 }
158173
159174 String url ,sha ;
0 commit comments