Skip to content

Commit

Permalink
Merge pull request #4210 from StefanSpieker/unused_imports
Browse files Browse the repository at this point in the history
Remove unused imports
  • Loading branch information
oleg-nenashev authored Sep 21, 2019
2 parents c1dacc1 + 1a84744 commit 9b12e03
Show file tree
Hide file tree
Showing 55 changed files with 0 additions and 134 deletions.
1 change: 0 additions & 1 deletion core/src/main/java/hudson/scheduler/Hash.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
package hudson.scheduler;

import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/hudson/util/jna/RegistryKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import com.sun.jna.ptr.IntByReference;

import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.TreeMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;

/**
Expand Down
1 change: 0 additions & 1 deletion core/src/test/java/hudson/util/XStream2Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.thoughtworks.xstream.XStreamException;
import com.thoughtworks.xstream.io.xml.KXml2Driver;
import com.thoughtworks.xstream.security.ForbiddenClassException;
import hudson.model.Result;
import hudson.model.Run;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import jenkins.security.apitoken.ApiTokenTestHelper;
import jenkins.security.s2m.AdminWhitelistRule;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.DOMReader;
import org.jvnet.hudson.test.Email;
import org.jvnet.hudson.test.recipes.PresetData;
Expand All @@ -48,7 +47,6 @@
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import org.apache.commons.io.FileUtils;
import org.apache.tools.ant.util.JavaEnvUtils;
Expand Down
1 change: 0 additions & 1 deletion test/src/test/java/hudson/cli/AddJobToViewCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import hudson.model.ListView;
import hudson.model.View;
import jenkins.model.Jenkins;
import org.junit.Before;
import org.junit.Test;

import static hudson.cli.CLICommandInvoker.Matcher.succeededSilently;
Expand Down
9 changes: 0 additions & 9 deletions test/src/test/java/hudson/cli/CancelQuietDownCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,14 @@

import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.QueueTest;
import hudson.util.OneShotEvent;
import jenkins.model.Jenkins;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;

import static hudson.cli.CLICommandInvoker.Matcher.failedWith;
import static hudson.cli.CLICommandInvoker.Matcher.hasNoStandardOutput;
Expand All @@ -54,7 +46,6 @@
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.fail;

public class CancelQuietDownCommandTest {

Expand Down
1 change: 0 additions & 1 deletion test/src/test/java/hudson/cli/ConnectNodeCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import hudson.slaves.DumbSlave;
import jenkins.model.Jenkins;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
Expand Down
5 changes: 0 additions & 5 deletions test/src/test/java/hudson/cli/ConsoleCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import hudson.model.Item;
import hudson.model.Job;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.labels.LabelAtom;
import hudson.tasks.BatchFile;
import hudson.tasks.Shell;
Expand All @@ -40,16 +39,12 @@
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.Issue;

import java.io.IOException;

import static hudson.cli.CLICommandInvoker.Matcher.failedWith;
import static hudson.cli.CLICommandInvoker.Matcher.hasNoStandardOutput;
import static hudson.cli.CLICommandInvoker.Matcher.succeeded;
import static hudson.cli.CLICommandInvoker.Matcher.succeededSilently;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.fail;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import hudson.model.ListView;
import hudson.model.View;
import jenkins.model.Jenkins;
import org.junit.Before;
import org.junit.Test;

import static hudson.cli.CLICommandInvoker.Matcher.succeededSilently;
Expand Down
8 changes: 0 additions & 8 deletions test/src/test/java/hudson/cli/RunRangeCommand2Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,24 @@

package hudson.cli;

import hudson.Extension;
import hudson.Functions;
import hudson.model.AbstractBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Job;
import hudson.model.labels.LabelAtom;
import hudson.tasks.BatchFile;
import hudson.tasks.Shell;
import jenkins.model.Jenkins;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;

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

import static hudson.cli.CLICommandInvoker.Matcher.failedWith;
import static hudson.cli.CLICommandInvoker.Matcher.hasNoStandardOutput;
import static hudson.cli.CLICommandInvoker.Matcher.succeeded;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;

/**
* @author pjanouse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

package hudson.cli;

import hudson.FilePath;
import hudson.Functions;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
Expand All @@ -35,13 +34,10 @@
import hudson.tasks.Shell;
import jenkins.model.Jenkins;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;

import java.io.File;

import static hudson.cli.CLICommandInvoker.Matcher.failedWith;
import static hudson.cli.CLICommandInvoker.Matcher.hasNoStandardOutput;
import static hudson.cli.CLICommandInvoker.Matcher.succeededSilently;
Expand Down
2 changes: 0 additions & 2 deletions test/src/test/java/hudson/model/CauseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.*;

import hudson.security.*;
import hudson.util.StreamTaskListener;
import jenkins.model.Jenkins;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import static org.junit.Assert.*;

import com.gargoylesoftware.htmlunit.html.HtmlPage;
import hudson.Extension;
import hudson.security.ACL;
import hudson.security.AuthorizationStrategy;
import hudson.security.SecurityRealm;
Expand All @@ -18,11 +17,9 @@
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.LoggerRule;
import org.jvnet.hudson.test.TestExtension;
import org.xml.sax.SAXException;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import java.io.IOException;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.LogRecord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.junit.rules.TemporaryFolder;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.kohsuke.stapler.Function;

import java.io.File;
import java.nio.charset.StandardCharsets;
Expand Down
6 changes: 0 additions & 6 deletions test/src/test/java/hudson/model/FreeStyleProjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
package hudson.model;

import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
Expand All @@ -38,9 +35,6 @@
import hudson.tasks.Shell;
import java.io.ByteArrayInputStream;

import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;

import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package hudson.model;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

import java.io.IOException;

import hudson.EnvVars;
Expand Down
1 change: 0 additions & 1 deletion test/src/test/java/hudson/model/ItemsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import java.net.URL;
import java.util.Arrays;
import jenkins.model.Jenkins;
import jenkins.security.apitoken.ApiTokenPropertyConfiguration;
import jenkins.security.apitoken.ApiTokenTestHelper;
import org.acegisecurity.context.SecurityContext;
import org.acegisecurity.context.SecurityContextHolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import jenkins.model.Jenkins;
import static org.junit.Assert.assertEquals;

import jenkins.security.apitoken.ApiTokenPropertyConfiguration;
import jenkins.security.apitoken.ApiTokenTestHelper;
import org.junit.Rule;
import org.junit.Test;
Expand Down
3 changes: 0 additions & 3 deletions test/src/test/java/hudson/model/ProjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@
import hudson.security.HudsonPrivateSecurityRealm;
import hudson.security.GlobalMatrixAuthorizationStrategy;

import java.io.Closeable;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Collections;

import hudson.util.Scrambler;
import org.jvnet.hudson.reactor.ReactorException;
import org.jvnet.hudson.test.FakeChangeLogSCM;
import hudson.scm.SCMRevisionState;
Expand Down
1 change: 0 additions & 1 deletion test/src/test/java/hudson/model/QueueTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
import hudson.util.XStream2;
import jenkins.model.BlockedBecauseOfBuildInProgress;
import jenkins.model.Jenkins;
import jenkins.security.apitoken.ApiTokenPropertyConfiguration;
import jenkins.security.QueueItemAuthenticatorConfiguration;
import jenkins.security.apitoken.ApiTokenTestHelper;
import jenkins.triggers.ReverseBuildTrigger;
Expand Down
2 changes: 0 additions & 2 deletions test/src/test/java/hudson/model/RSSTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
package hudson.model;

import com.gargoylesoftware.htmlunit.xml.XmlPage;
import hudson.model.queue.QueueTaskFuture;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
Expand Down
1 change: 0 additions & 1 deletion test/src/test/java/hudson/model/UserPropertyTest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package hudson.model;

import com.google.common.base.Throwables;
import jenkins.model.Jenkins;
import org.apache.commons.io.FileUtils;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
Expand Down
1 change: 0 additions & 1 deletion test/src/test/java/hudson/model/UserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
import jenkins.model.Jenkins;
import jenkins.security.ApiTokenProperty;

import jenkins.security.apitoken.ApiTokenPropertyConfiguration;
import jenkins.security.apitoken.ApiTokenTestHelper;
import org.acegisecurity.AccessDeniedException;
import org.acegisecurity.Authentication;
Expand Down
1 change: 0 additions & 1 deletion test/src/test/java/hudson/model/ViewTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
import java.io.IOException;
import java.util.Collection;
import java.net.HttpURLConnection;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

package hudson.security;

import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.HttpMethod;
import com.gargoylesoftware.htmlunit.WebRequest;
import com.gargoylesoftware.htmlunit.util.Cookie;
Expand All @@ -48,7 +47,6 @@

import jenkins.security.ApiTokenProperty;
import jenkins.security.SecurityListener;
import jenkins.security.apitoken.ApiTokenPropertyConfiguration;
import jenkins.security.apitoken.ApiTokenTestHelper;
import jenkins.security.seed.UserSeedProperty;
import static org.hamcrest.Matchers.containsString;
Expand Down
1 change: 0 additions & 1 deletion test/src/test/java/hudson/security/LoginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;

import hudson.model.User;
import jenkins.security.apitoken.ApiTokenPropertyConfiguration;
import jenkins.security.apitoken.ApiTokenTestHelper;
import org.junit.Rule;
import org.junit.Test;
Expand Down
4 changes: 0 additions & 4 deletions test/src/test/java/hudson/slaves/CloudTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.iterableWithSize;
import static org.junit.Assert.*;

import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import hudson.model.Action;
import hudson.model.Computer;
Expand All @@ -16,14 +14,12 @@
import jenkins.model.Jenkins;
import jenkins.model.TransientActionFactory;
import org.acegisecurity.acls.sid.Sid;
import org.apache.tools.ant.taskdefs.Javadoc;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.TestExtension;
import org.jvnet.hudson.test.WithoutJenkins;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.StaplerResponse;

import javax.annotation.Nonnull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package hudson.slaves;

import static org.junit.Assert.assertEquals;

import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Node;
Expand Down
Loading

0 comments on commit 9b12e03

Please sign in to comment.