Skip to content

Commit

Permalink
Reorganized imports following #337
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed Sep 9, 2017
1 parent b0f2a87 commit 17edd33
Show file tree
Hide file tree
Showing 26 changed files with 54 additions and 44 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GHAuthorization.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.kohsuke.github;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.net.URL;
import java.util.Collection;
import java.util.List;
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/org/kohsuke/github/GHBranch.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package org.kohsuke.github;

import static org.kohsuke.github.Previews.LOKI;
import com.fasterxml.jackson.annotation.JsonProperty;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.IOException;
import java.net.URL;
import java.util.Collection;

import com.fasterxml.jackson.annotation.JsonProperty;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import static org.kohsuke.github.Previews.*;

/**
* A branch in a repository.
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/kohsuke/github/GHBranchProtection.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.kohsuke.github;

import java.util.Collection;

import com.fasterxml.jackson.annotation.JsonProperty;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.util.Collection;

@SuppressFBWarnings(value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD",
"URF_UNREAD_FIELD" }, justification = "JSON API")
public class GHBranchProtection {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.kohsuke.github;

import static org.kohsuke.github.Previews.LOKI;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -12,7 +12,7 @@
import java.util.Map;
import java.util.Set;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import static org.kohsuke.github.Previews.*;

/**
* Builder to configure the branch protection settings.
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GHCommit.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.IOException;
import java.net.URL;
import java.util.AbstractList;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/kohsuke/github/GHCommitComment.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package org.kohsuke.github;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.IOException;
import java.net.URL;
import static org.kohsuke.github.Previews.SQUIRREL_GIRL;

import static org.kohsuke.github.Previews.*;

/**
* A comment attached to a commit (or a specific line in a specific file of a commit.)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.kohsuke.github;

import java.io.IOException;

import org.apache.commons.lang.StringUtils;

import java.io.IOException;

/**
* Search commits.
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/kohsuke/github/GHDeployKey.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.kohsuke.github;

import java.io.IOException;

import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.IOException;

public class GHDeployKey {

protected String url, key, title;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/kohsuke/github/GHEventInfo.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.kohsuke.github;

import java.io.IOException;
import java.util.Date;

import com.fasterxml.jackson.databind.node.ObjectNode;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.IOException;
import java.util.Date;

/**
* Represents an event.
*
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GHEventPayload.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.Reader;
import java.util.List;

Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GHHook.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.kohsuke.github;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.IOException;
import java.net.URL;
import java.util.Collections;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHIssueComment.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.io.IOException;
import java.net.URL;

import static org.kohsuke.github.Previews.SQUIRREL_GIRL;
import static org.kohsuke.github.Previews.*;

/**
* Comment to the issue
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHLicense.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.ArrayList;
import java.util.List;

import static org.kohsuke.github.Previews.DRAX;
import static org.kohsuke.github.Previews.*;

/**
* The GitHub Preview API's license information
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GHObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URL;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/kohsuke/github/GHPullRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
*/
package org.kohsuke.github;

import javax.annotation.CheckForNull;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import javax.annotation.CheckForNull;

import static org.kohsuke.github.Previews.BLACK_CAT;
import static org.kohsuke.github.Previews.*;

/**
* A pull request.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHPullRequestReview.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.io.IOException;
import java.net.URL;

import static org.kohsuke.github.Previews.BLACK_CAT;
import static org.kohsuke.github.Previews.*;

/**
* Review to the pull request
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GHRateLimit.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.kohsuke.github;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.util.Date;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHReaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.io.IOException;
import java.net.URL;

import static org.kohsuke.github.Previews.SQUIRREL_GIRL;
import static org.kohsuke.github.Previews.*;

/**
* Reaction to issue, comment, PR, and so on.
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GHRef.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.kohsuke.github;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.IOException;
import java.net.URL;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHRelease.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Date;
import java.util.List;

import static java.lang.String.format;
import static java.lang.String.*;

/**
* Release in a github repository.
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GHThread.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.kohsuke.github;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/kohsuke/github/GHTreeBuilder.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.kohsuke.github;

import java.io.IOException;
import java.util.*;
import java.util.ArrayList;
import java.util.List;

/**
* Builder pattern for creating a new tree.
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/org/kohsuke/github/GitHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.introspect.VisibilityChecker.Std;
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
import org.apache.commons.codec.Charsets;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.IOUtils;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
Expand All @@ -48,17 +54,11 @@
import java.util.Set;
import java.util.TimeZone;
import java.util.logging.Logger;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import org.apache.commons.codec.Charsets;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.IOUtils;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
import static java.util.logging.Level.FINE;
import static org.kohsuke.github.Previews.DRAX;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.*;
import static java.net.HttpURLConnection.*;
import static java.util.logging.Level.*;
import static org.kohsuke.github.Previews.*;

/**
* Root of the GitHub API.
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/GitUser.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.kohsuke.github;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.util.Date;

/**
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/kohsuke/github/HttpException.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.kohsuke.github;

import javax.annotation.CheckForNull;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;

import javax.annotation.CheckForNull;

/**
* {@link IOException} for http exceptions because {@link HttpURLConnection} throws un-discerned
* {@link IOException} and it can help to know the http response code to decide how to handle an
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/org/kohsuke/github/Requester.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

import com.fasterxml.jackson.databind.JsonMappingException;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;

import javax.annotation.WillClose;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -49,19 +53,16 @@
import java.util.Locale;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
import javax.annotation.WillClose;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;

import static java.util.Arrays.asList;
import java.util.logging.Level;
import static java.util.Arrays.*;
import static java.util.logging.Level.*;
import static org.apache.commons.lang.StringUtils.defaultString;
import static org.kohsuke.github.GitHub.MAPPER;
import static org.apache.commons.lang.StringUtils.*;
import static org.kohsuke.github.GitHub.*;

/**
* A builder pattern for making HTTP call and parsing its output.
Expand Down

0 comments on commit 17edd33

Please sign in to comment.