Skip to content

Commit 232d5d3

Browse files
committed
Sort fields
1 parent a9635e6 commit 232d5d3

File tree

185 files changed

+1386
-1385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+1386
-1385
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@
488488
<file>${basedir}/src/build/eclipse/formatter.xml</file>
489489
<sortMembersEnabled>true</sortMembersEnabled>
490490
<sortMembersVisibilityOrderEnabled>true</sortMembersVisibilityOrderEnabled>
491+
<sortMembersDoNotSortFields>false</sortMembersDoNotSortFields>
491492
</eclipse>
492493

493494
<importOrder>

src/main/java/org/kohsuke/github/AbstractBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
*/
4444
abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject implements GitHubRequestBuilderDone<R> {
4545

46-
@Nonnull
47-
private final Class<R> returnType;
46+
@CheckForNull
47+
private final R baseInstance;
4848

4949
private final boolean commitChangesImmediately;
5050

51-
@CheckForNull
52-
private final R baseInstance;
51+
@Nonnull
52+
private final Class<R> returnType;
5353

5454
/** The requester. */
5555
@Nonnull

src/main/java/org/kohsuke/github/EnterpriseManagedSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
*/
1515
class EnterpriseManagedSupport {
1616

17+
private static final Logger LOGGER = Logger.getLogger(EnterpriseManagedSupport.class.getName());
1718
static final String COULD_NOT_RETRIEVE_ORGANIZATION_EXTERNAL_GROUPS = "Could not retrieve organization external groups";
1819
static final String NOT_PART_OF_EXTERNALLY_MANAGED_ENTERPRISE_ERROR = "This organization is not part of externally managed enterprise.";
19-
static final String TEAM_CANNOT_BE_EXTERNALLY_MANAGED_ERROR = "This team cannot be externally managed since it has explicit members.";
2020

21-
private static final Logger LOGGER = Logger.getLogger(EnterpriseManagedSupport.class.getName());
21+
static final String TEAM_CANNOT_BE_EXTERNALLY_MANAGED_ERROR = "This team cannot be externally managed since it has explicit members.";
2222

2323
private static String logUnexpectedFailure(final JsonProcessingException exception, final String payload) {
2424
final StringWriter sw = new StringWriter();

src/main/java/org/kohsuke/github/GHApp.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
*/
2222
public class GHApp extends GHObject {
2323

24-
private GHUser owner;
25-
26-
private String name;
27-
private String slug;
2824
private String description;
29-
private String externalUrl;
30-
private Map<String, String> permissions;
25+
3126
private List<String> events;
32-
private long installationsCount;
27+
private String externalUrl;
3328
private String htmlUrl;
29+
private long installationsCount;
30+
private String name;
31+
private GHUser owner;
32+
private Map<String, String> permissions;
33+
private String slug;
3434
/**
3535
* Create default GHApp instance
3636
*/

src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
*/
1515
public class GHAppCreateTokenBuilder extends GitHubInteractiveObject {
1616

17+
private final String apiUrlTail;
1718
/** The builder. */
1819
protected final Requester builder;
19-
private final String apiUrlTail;
2020

2121
/**
2222
* Instantiates a new GH app create token builder.

src/main/java/org/kohsuke/github/GHAppFromManifest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ public class GHAppFromManifest extends GHApp {
1111
private String clientId;
1212

1313
private String clientSecret;
14-
private String webhookSecret;
1514
private String pem;
15+
private String webhookSecret;
1616
/**
1717
* Create default GHAppFromManifest instance
1818
*/

src/main/java/org/kohsuke/github/GHAppInstallation.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,27 @@ GHRepository[] getItems(GitHub root) {
3636
}
3737
}
3838

39-
private GHUser account;
40-
4139
@JsonProperty("access_tokens_url")
4240
private String accessTokenUrl;
43-
@JsonProperty("repositories_url")
44-
private String repositoriesUrl;
41+
42+
private GHUser account;
4543
@JsonProperty("app_id")
4644
private long appId;
47-
@JsonProperty("target_id")
48-
private long targetId;
49-
@JsonProperty("target_type")
50-
private GHTargetType targetType;
51-
private Map<String, GHPermissionType> permissions;
5245
private List<String> events;
53-
@JsonProperty("single_file_name")
54-
private String singleFileName;
46+
private String htmlUrl;
47+
private Map<String, GHPermissionType> permissions;
48+
@JsonProperty("repositories_url")
49+
private String repositoriesUrl;
5550
@JsonProperty("repository_selection")
5651
private GHRepositorySelection repositorySelection;
57-
private String htmlUrl;
52+
@JsonProperty("single_file_name")
53+
private String singleFileName;
5854
private String suspendedAt;
5955
private GHUser suspendedBy;
56+
@JsonProperty("target_id")
57+
private long targetId;
58+
@JsonProperty("target_type")
59+
private GHTargetType targetType;
6060

6161
/**
6262
* Create default GHAppInstallation instance

src/main/java/org/kohsuke/github/GHAppInstallationToken.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
*/
1515
public class GHAppInstallationToken extends GitHubInteractiveObject {
1616

17-
private String token;
18-
19-
/** The expires at. */
20-
protected String expiresAt;
21-
2217
private Map<String, String> permissions;
18+
2319
private List<GHRepository> repositories;
20+
2421
private GHRepositorySelection repositorySelection;
22+
private String token;
23+
/** The expires at. */
24+
protected String expiresAt;
2525
/**
2626
* Create default GHAppInstallationToken instance
2727
*/

src/main/java/org/kohsuke/github/GHAppInstallationsIterable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class GHAppInstallationsIterable extends PagedIterable<GHAppInstallation> {
1212

1313
/** The Constant APP_INSTALLATIONS_URL. */
1414
public static final String APP_INSTALLATIONS_URL = "/user/installations";
15-
private final transient GitHub root;
1615
private GHAppInstallationsPage result;
16+
private final transient GitHub root;
1717

1818
/**
1919
* Instantiates a new GH app installations iterable.

src/main/java/org/kohsuke/github/GHAppInstallationsPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* Represents the one page of GHAppInstallations.
66
*/
77
class GHAppInstallationsPage {
8-
private int totalCount;
98
private GHAppInstallation[] installations;
9+
private int totalCount;
1010

1111
/**
1212
* Gets the total count.

src/main/java/org/kohsuke/github/GHArtifact.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
*/
2323
public class GHArtifact extends GHObject {
2424

25+
private String archiveDownloadUrl;
26+
27+
private boolean expired;
28+
29+
private String expiresAt;
30+
private String name;
2531
// Not provided by the API.
2632
@JsonIgnore
2733
private GHRepository owner;
28-
29-
private String name;
30-
3134
private long sizeInBytes;
32-
private String archiveDownloadUrl;
33-
private boolean expired;
34-
private String expiresAt;
3535
/**
3636
* Create default GHArtifact instance
3737
*/

src/main/java/org/kohsuke/github/GHArtifactsPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD" },
1010
justification = "JSON API")
1111
class GHArtifactsPage {
12-
private int totalCount;
1312
private GHArtifact[] artifacts;
13+
private int totalCount;
1414

1515
/**
1616
* Gets the total count.

src/main/java/org/kohsuke/github/GHAsset.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ public static GHAsset[] wrap(GHAsset[] assets, GHRelease release) {
2828
return assets;
2929
}
3030

31-
/** The owner. */
32-
GHRepository owner;
33-
private String name;
34-
private String label;
35-
private String state;
31+
private String browserDownloadUrl;
3632
private String contentType;
37-
private long size;
3833
private long downloadCount;
39-
private String browserDownloadUrl;
34+
private String label;
35+
private String name;
36+
private long size;
37+
private String state;
38+
/** The owner. */
39+
GHRepository owner;
4040

4141
/**
4242
* Create default GHAsset instance

src/main/java/org/kohsuke/github/GHAuthorization.java

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,75 +20,75 @@ public class GHAuthorization extends GHObject {
2020
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD" },
2121
justification = "JSON API")
2222
private static class App {
23-
private String url;
2423
private String name;
2524
// private String client_id; not yet used
25+
private String url;
2626
}
2727

28-
/** The Constant USER. */
29-
public static final String USER = "user";
30-
31-
/** The Constant USER_EMAIL. */
32-
public static final String USER_EMAIL = "user:email";
33-
34-
/** The Constant USER_FOLLOW. */
35-
public static final String USER_FOLLOW = "user:follow";
36-
37-
/** The Constant PUBLIC_REPO. */
38-
public static final String PUBLIC_REPO = "public_repo";
28+
/** The Constant ADMIN_KEY. */
29+
public static final String ADMIN_KEY = "admin:public_key";
3930

40-
/** The Constant REPO. */
41-
public static final String REPO = "repo";
31+
/** The Constant ADMIN_ORG. */
32+
public static final String ADMIN_ORG = "admin:org";
4233

43-
/** The Constant REPO_STATUS. */
44-
public static final String REPO_STATUS = "repo:status";
34+
/** The Constant AMIN_HOOK. */
35+
public static final String AMIN_HOOK = "admin:repo_hook";
4536

4637
/** The Constant DELETE_REPO. */
4738
public static final String DELETE_REPO = "delete_repo";
4839

40+
/** The Constant GIST. */
41+
public static final String GIST = "gist";
42+
4943
/** The Constant NOTIFICATIONS. */
5044
public static final String NOTIFICATIONS = "notifications";
5145

52-
/** The Constant GIST. */
53-
public static final String GIST = "gist";
46+
/** The Constant PUBLIC_REPO. */
47+
public static final String PUBLIC_REPO = "public_repo";
5448

5549
/** The Constant READ_HOOK. */
5650
public static final String READ_HOOK = "read:repo_hook";
5751

58-
/** The Constant WRITE_HOOK. */
59-
public static final String WRITE_HOOK = "write:repo_hook";
60-
61-
/** The Constant AMIN_HOOK. */
62-
public static final String AMIN_HOOK = "admin:repo_hook";
52+
/** The Constant READ_KEY. */
53+
public static final String READ_KEY = "read:public_key";
6354

6455
/** The Constant READ_ORG. */
6556
public static final String READ_ORG = "read:org";
6657

67-
/** The Constant WRITE_ORG. */
68-
public static final String WRITE_ORG = "write:org";
58+
/** The Constant REPO. */
59+
public static final String REPO = "repo";
6960

70-
/** The Constant ADMIN_ORG. */
71-
public static final String ADMIN_ORG = "admin:org";
61+
/** The Constant REPO_STATUS. */
62+
public static final String REPO_STATUS = "repo:status";
7263

73-
/** The Constant READ_KEY. */
74-
public static final String READ_KEY = "read:public_key";
64+
/** The Constant USER. */
65+
public static final String USER = "user";
66+
67+
/** The Constant USER_EMAIL. */
68+
public static final String USER_EMAIL = "user:email";
69+
70+
/** The Constant USER_FOLLOW. */
71+
public static final String USER_FOLLOW = "user:follow";
72+
73+
/** The Constant WRITE_HOOK. */
74+
public static final String WRITE_HOOK = "write:repo_hook";
7575

7676
/** The Constant WRITE_KEY. */
7777
public static final String WRITE_KEY = "write:public_key";
7878

79-
/** The Constant ADMIN_KEY. */
80-
public static final String ADMIN_KEY = "admin:public_key";
79+
/** The Constant WRITE_ORG. */
80+
public static final String WRITE_ORG = "write:org";
8181

82-
private List<String> scopes;
83-
private String token;
84-
private String tokenLastEight;
85-
private String hashedToken;
8682
private App app;
87-
private String note;
88-
private String noteUrl;
8983
private String fingerprint;
9084
// TODO add some user class for https://developer.github.com/v3/oauth_authorizations/#check-an-authorization ?
9185
// private GHUser user;
86+
private String hashedToken;
87+
private String note;
88+
private String noteUrl;
89+
private List<String> scopes;
90+
private String token;
91+
private String tokenLastEight;
9292

9393
/**
9494
* Create default GHAuthorization instance

src/main/java/org/kohsuke/github/GHAutolink.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
public class GHAutolink {
1616

1717
private int id;
18-
private String keyPrefix;
19-
private String urlTemplate;
2018
private boolean isAlphanumeric;
19+
private String keyPrefix;
2120
private GHRepository owner;
21+
private String urlTemplate;
2222

2323
/**
2424
* Instantiates a new Gh autolink.

src/main/java/org/kohsuke/github/GHAutolinkBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
*/
1212
public class GHAutolinkBuilder {
1313

14+
private Boolean isAlphanumeric;
15+
private String keyPrefix;
1416
private final GHRepository repo;
1517
private final Requester req;
16-
private String keyPrefix;
1718
private String urlTemplate;
18-
private Boolean isAlphanumeric;
1919

2020
/**
2121
* Instantiates a new Gh autolink builder.

src/main/java/org/kohsuke/github/GHBranch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public Commit() {
4040
}
4141
}
4242

43-
private GHRepository owner;
44-
private String name;
4543
private Commit commit;
44+
private String name;
45+
private GHRepository owner;
4646
@JsonProperty("protected")
4747
private boolean protection;
4848

0 commit comments

Comments
 (0)