diff --git a/src/main/java/org/kohsuke/github/AbstractBuilder.java b/src/main/java/org/kohsuke/github/AbstractBuilder.java index 462f7b416..f78e72633 100644 --- a/src/main/java/org/kohsuke/github/AbstractBuilder.java +++ b/src/main/java/org/kohsuke/github/AbstractBuilder.java @@ -25,12 +25,12 @@ import javax.annotation.Nonnull; * *

*

- * If {@link S} is the same as {@link R}, {@link #with(String, Object)} will commit changes after the first value change and return a {@link R} - * from {@link #done()}. + * If {@link S} is the same as {@link R}, {@link #with(String, Object)} will commit changes after the first value change + * and return a {@link R} from {@link #done()}. *

*

- * If {@link S} is not the same as {@link R}, {@link #with(String, Object)} will batch together multiple changes and let the user call - * {@link #done()} when they are ready. + * If {@link S} is not the same as {@link R}, {@link #with(String, Object)} will batch together multiple changes and let + * the user call {@link #done()} when they are ready. * * @param * Final return type built by this builder returned when {@link #done()}} is called. @@ -52,7 +52,8 @@ abstract class AbstractBuilder { protected final Requester requester; // TODO: Not sure how update-in-place behavior should be controlled - // However, it certainly can be controlled dynamically down to the instance level or inherited for all children of some + // However, it certainly can be controlled dynamically down to the instance level or inherited for all children of + // some // connection. protected boolean updateInPlace; @@ -71,8 +72,8 @@ abstract class AbstractBuilder { * optional instance on which to base this builder. */ protected AbstractBuilder(@Nonnull Class finalReturnType, - @Nonnull Class intermediateReturnType, - @Nonnull GitHub root, + @Nonnull Class intermediateReturnType, + @Nonnull GitHub root, @CheckForNull R baseInstance) { this.requester = root.createRequest(); this.returnType = finalReturnType; @@ -111,11 +112,11 @@ abstract class AbstractBuilder { /** * Applies a value to a name for this builder. * - * If {@link S} is the same as {@link R}, this method will commit changes after the first value change and return a {@link R} from - * {@link #done()}. + * If {@link S} is the same as {@link R}, this method will commit changes after the first value change and return a + * {@link R} from {@link #done()}. * - * If {@link S} is not the same as {@link R}, this method will return an {@link S} and letting the caller batch together multiple - * changes and call {@link #done()} when they are ready. + * If {@link S} is not the same as {@link R}, this method will return an {@link S} and letting the caller batch + * together multiple changes and call {@link #done()} when they are ready. * * @param name * the name of the field @@ -136,11 +137,11 @@ abstract class AbstractBuilder { /** * Chooses whether to return a continuing builder or an updated data record * - * If {@link S} is the same as {@link R}, this method will commit changes after the first value change and return a {@link R} from - * {@link #done()}. + * If {@link S} is the same as {@link R}, this method will commit changes after the first value change and return a + * {@link R} from {@link #done()}. * - * If {@link S} is not the same as {@link R}, this method will return an {@link S} and letting the caller batch together multiple - * changes and call {@link #done()} when they are ready. + * If {@link S} is not the same as {@link R}, this method will return an {@link S} and letting the caller batch + * together multiple changes and call {@link #done()} when they are ready. * * @return either a continuing builder or an updated data record * @throws IOException diff --git a/src/main/java/org/kohsuke/github/GHLabel.java b/src/main/java/org/kohsuke/github/GHLabel.java index 9e2541317..24957cc81 100644 --- a/src/main/java/org/kohsuke/github/GHLabel.java +++ b/src/main/java/org/kohsuke/github/GHLabel.java @@ -24,7 +24,6 @@ public class GHLabel { @Nonnull private String url, name, color, description; - // Never null but not detectable at compile time @Nonnull private final GitHub root; diff --git a/src/test/java/org/kohsuke/github/AppTest.java b/src/test/java/org/kohsuke/github/AppTest.java index 61764c9a7..10d354885 100755 --- a/src/test/java/org/kohsuke/github/AppTest.java +++ b/src/test/java/org/kohsuke/github/AppTest.java @@ -787,6 +787,7 @@ public class AppTest extends AbstractGitHubWireMockTest { @Test public void testRepoLabel() throws IOException { + cleanupLabel("test"); cleanupLabel("test2"); diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoLabel/mappings/repos_github-api-test-org_test-labels_labels-5-ce07a3.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoLabel/mappings/repos_github-api-test-org_test-labels_labels-5-ce07a3.json index fc7b11e4b..bdffdfe58 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoLabel/mappings/repos_github-api-test-org_test-labels_labels-5-ce07a3.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoLabel/mappings/repos_github-api-test-org_test-labels_labels-5-ce07a3.json @@ -6,7 +6,7 @@ "method": "POST", "bodyPatterns": [ { - "equalToJson": "{\"color\":\"123456\",\"name\":\"test\",\"description\":\"\"}", + "equalToJson": "{\"color\":\"123456\",\"name\":\"test\"}", "ignoreArrayOrder": true, "ignoreExtraElements": true }