Skip to content

Commit

Permalink
Add imports for Nullable and Nonnull
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Dziemianczyk committed Mar 14, 2024
1 parent 6567475 commit c1e1d13
Show file tree
Hide file tree
Showing 1,363 changed files with 6,923 additions and 3,841 deletions.
4 changes: 2 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ tasks.named("generateStone", StoneTask) {

])
outputDir.set(project.layout.buildDirectory.dir("generated_stone_source/main"))
sourceSets { main { java.srcDir(outputDir.file("src")) } }
}
sourceSets.main.java.srcDir(generateStone)

tasks.named("generateTestStone", StoneTask) {
String packageName = 'com.dropbox.core.stone'
Expand All @@ -334,8 +334,8 @@ tasks.named("generateTestStone", StoneTask) {
),
])
outputDir.set(project.layout.buildDirectory.dir("generated_stone_source/test"))
sourceSets { test { java.srcDir(outputDir.file("src")) } }
}
sourceSets.test.java.srcDir(generateTestStone)

mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

class SetProfilePhotoArg {
// struct account.SetProfilePhotoArg (account.stone)

Expand All @@ -29,7 +31,7 @@ class SetProfilePhotoArg {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public SetProfilePhotoArg(@javax.annotation.Nonnull PhotoSourceArg photo) {
public SetProfilePhotoArg(@Nonnull PhotoSourceArg photo) {
if (photo == null) {
throw new IllegalArgumentException("Required value for 'photo' is null");
}
Expand All @@ -41,7 +43,7 @@ public SetProfilePhotoArg(@javax.annotation.Nonnull PhotoSourceArg photo) {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public PhotoSourceArg getPhoto() {
return photo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

public class SetProfilePhotoResult {
// struct account.SetProfilePhotoResult (account.stone)

Expand All @@ -29,7 +31,7 @@ public class SetProfilePhotoResult {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public SetProfilePhotoResult(@javax.annotation.Nonnull String profilePhotoUrl) {
public SetProfilePhotoResult(@Nonnull String profilePhotoUrl) {
if (profilePhotoUrl == null) {
throw new IllegalArgumentException("Required value for 'profilePhotoUrl' is null");
}
Expand All @@ -41,7 +43,7 @@ public SetProfilePhotoResult(@javax.annotation.Nonnull String profilePhotoUrl) {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getProfilePhotoUrl() {
return profilePhotoUrl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

/**
* Arguments for methods that poll the status of an asynchronous job.
*/
Expand All @@ -34,7 +36,7 @@ public class PollArg {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public PollArg(@javax.annotation.Nonnull String asyncJobId) {
public PollArg(@Nonnull String asyncJobId) {
if (asyncJobId == null) {
throw new IllegalArgumentException("Required value for 'asyncJobId' is null");
}
Expand All @@ -50,7 +52,7 @@ public PollArg(@javax.annotation.Nonnull String asyncJobId) {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getAsyncJobId() {
return asyncJobId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

/**
* Error occurred because the app is being rate limited.
*/
Expand All @@ -36,7 +38,7 @@ public class RateLimitError {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public RateLimitError(@javax.annotation.Nonnull RateLimitReason reason, long retryAfter) {
public RateLimitError(@Nonnull RateLimitReason reason, long retryAfter) {
if (reason == null) {
throw new IllegalArgumentException("Required value for 'reason' is null");
}
Expand Down Expand Up @@ -64,7 +66,7 @@ public RateLimitError(RateLimitReason reason) {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public RateLimitReason getReason() {
return reason;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

class TokenFromOAuth1Arg {
// struct auth.TokenFromOAuth1Arg (auth.stone)

Expand All @@ -32,7 +34,7 @@ class TokenFromOAuth1Arg {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public TokenFromOAuth1Arg(@javax.annotation.Nonnull String oauth1Token, @javax.annotation.Nonnull String oauth1TokenSecret) {
public TokenFromOAuth1Arg(@Nonnull String oauth1Token, @Nonnull String oauth1TokenSecret) {
if (oauth1Token == null) {
throw new IllegalArgumentException("Required value for 'oauth1Token' is null");
}
Expand All @@ -54,7 +56,7 @@ public TokenFromOAuth1Arg(@javax.annotation.Nonnull String oauth1Token, @javax.a
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getOauth1Token() {
return oauth1Token;
}
Expand All @@ -64,7 +66,7 @@ public String getOauth1Token() {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getOauth1TokenSecret() {
return oauth1TokenSecret;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

public class TokenFromOAuth1Result {
// struct auth.TokenFromOAuth1Result (auth.stone)

Expand All @@ -29,7 +31,7 @@ public class TokenFromOAuth1Result {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public TokenFromOAuth1Result(@javax.annotation.Nonnull String oauth2Token) {
public TokenFromOAuth1Result(@Nonnull String oauth2Token) {
if (oauth2Token == null) {
throw new IllegalArgumentException("Required value for 'oauth2Token' is null");
}
Expand All @@ -44,7 +46,7 @@ public TokenFromOAuth1Result(@javax.annotation.Nonnull String oauth2Token) {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getOauth2Token() {
return oauth2Token;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

public class TokenScopeError {
// struct auth.TokenScopeError (auth.stone)

Expand All @@ -29,7 +31,7 @@ public class TokenScopeError {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public TokenScopeError(@javax.annotation.Nonnull String requiredScope) {
public TokenScopeError(@Nonnull String requiredScope) {
if (requiredScope == null) {
throw new IllegalArgumentException("Required value for 'requiredScope' is null");
}
Expand All @@ -41,7 +43,7 @@ public TokenScopeError(@javax.annotation.Nonnull String requiredScope) {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getRequiredScope() {
return requiredScope;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

/**
* Contains the arguments to be sent to the Dropbox servers.
*/
Expand All @@ -33,7 +35,7 @@ class EchoArg {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public EchoArg(@javax.annotation.Nonnull String query) {
public EchoArg(@Nonnull String query) {
if (query == null) {
throw new IllegalArgumentException("Required value for 'query' is null");
}
Expand All @@ -58,7 +60,7 @@ public EchoArg() {
* @return value for this field, or {@code null} if not present. Defaults to
* "".
*/
@javax.annotation.Nonnull
@Nonnull
public String getQuery() {
return query;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.Arrays;

import javax.annotation.Nonnull;

/**
* EchoResult contains the result returned from the Dropbox servers.
*/
Expand All @@ -33,7 +35,7 @@ public class EchoResult {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public EchoResult(@javax.annotation.Nonnull String result) {
public EchoResult(@Nonnull String result) {
if (result == null) {
throw new IllegalArgumentException("Required value for 'result' is null");
}
Expand All @@ -55,7 +57,7 @@ public EchoResult() {
* @return value for this field, or {@code null} if not present. Defaults to
* "".
*/
@javax.annotation.Nonnull
@Nonnull
public String getResult() {
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import java.util.Arrays;
import java.util.regex.Pattern;

import javax.annotation.Nonnull;

/**
* Information about current user's root.
*/
Expand All @@ -40,7 +42,7 @@ public class RootInfo {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public RootInfo(@javax.annotation.Nonnull String rootNamespaceId, @javax.annotation.Nonnull String homeNamespaceId) {
public RootInfo(@Nonnull String rootNamespaceId, @Nonnull String homeNamespaceId) {
if (rootNamespaceId == null) {
throw new IllegalArgumentException("Required value for 'rootNamespaceId' is null");
}
Expand All @@ -65,7 +67,7 @@ public RootInfo(@javax.annotation.Nonnull String rootNamespaceId, @javax.annotat
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getRootNamespaceId() {
return rootNamespaceId;
}
Expand All @@ -75,7 +77,7 @@ public String getRootNamespaceId() {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getHomeNamespaceId() {
return homeNamespaceId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import java.util.Arrays;
import java.util.regex.Pattern;

import javax.annotation.Nonnull;

/**
* Root info when user is member of a team with a separate root namespace ID.
*/
Expand All @@ -42,7 +44,7 @@ public class TeamRootInfo extends RootInfo {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public TeamRootInfo(@javax.annotation.Nonnull String rootNamespaceId, @javax.annotation.Nonnull String homeNamespaceId, @javax.annotation.Nonnull String homePath) {
public TeamRootInfo(@Nonnull String rootNamespaceId, @Nonnull String homeNamespaceId, @Nonnull String homePath) {
super(rootNamespaceId, homeNamespaceId);
if (homePath == null) {
throw new IllegalArgumentException("Required value for 'homePath' is null");
Expand All @@ -58,7 +60,7 @@ public TeamRootInfo(@javax.annotation.Nonnull String rootNamespaceId, @javax.ann
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getRootNamespaceId() {
return rootNamespaceId;
}
Expand All @@ -68,7 +70,7 @@ public String getRootNamespaceId() {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getHomeNamespaceId() {
return homeNamespaceId;
}
Expand All @@ -78,7 +80,7 @@ public String getHomeNamespaceId() {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getHomePath() {
return homePath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.io.IOException;
import java.util.regex.Pattern;

import javax.annotation.Nonnull;

/**
* Root info when user is not member of a team or the user is a member of a team
* and the team does not have a separate root namespace.
Expand All @@ -39,7 +41,7 @@ public class UserRootInfo extends RootInfo {
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public UserRootInfo(@javax.annotation.Nonnull String rootNamespaceId, @javax.annotation.Nonnull String homeNamespaceId) {
public UserRootInfo(@Nonnull String rootNamespaceId, @Nonnull String homeNamespaceId) {
super(rootNamespaceId, homeNamespaceId);
}

Expand All @@ -51,7 +53,7 @@ public UserRootInfo(@javax.annotation.Nonnull String rootNamespaceId, @javax.ann
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getRootNamespaceId() {
return rootNamespaceId;
}
Expand All @@ -61,7 +63,7 @@ public String getRootNamespaceId() {
*
* @return value for this field, never {@code null}.
*/
@javax.annotation.Nonnull
@Nonnull
public String getHomeNamespaceId() {
return homeNamespaceId;
}
Expand Down
Loading

0 comments on commit c1e1d13

Please sign in to comment.