Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up imports #550

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions core/src/main/java/org/apache/commons/fileupload/FileItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* {@code org.apache.commons.fileupload.servlet.ServletFileUpload
* #parseRequest(javax.servlet.http.HttpServletRequest)}), you may
* either request all contents of the file at once using {@link #get()} or
* request an {@link java.io.InputStream InputStream} with
* request an {@link InputStream} with
* {@link #getInputStream()} and process the file without attempting to load
* it into memory, which may come handy with large files.
*
Expand All @@ -53,10 +53,10 @@ public interface FileItem {
// ------------------------------- Methods from javax.activation.DataSource

/**
* Returns an {@link java.io.InputStream InputStream} that can be
* Returns an {@link InputStream} that can be
* used to retrieve the contents of the file.
*
* @return An {@link java.io.InputStream InputStream} that can be
* @return An {@link InputStream} that can be
* used to retrieve the contents of the file.
*
* @throws IOException if an error occurs.
Expand Down Expand Up @@ -195,10 +195,10 @@ public interface FileItem {
void setFormField(boolean state);

/**
* Returns an {@link java.io.OutputStream OutputStream} that can
* Returns an {@link OutputStream} that can
* be used for storing the contents of the file.
*
* @return An {@link java.io.OutputStream OutputStream} that can be used
* @return An {@link OutputStream} that can be used
* for storing the contensts of the file.
*
* @throws IOException if an error occurs.
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/org/kohsuke/stapler/RequestImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -1215,7 +1216,7 @@ public JSONObject getSubmittedForm() throws ServletException {
// JENKINS-11543: If client doesn't set charset per part, use request encoding
try {
p = item.getString(Charset.forName(getCharacterEncoding()));
} catch (java.io.UnsupportedEncodingException uee) {
} catch (UnsupportedEncodingException uee) {
LOGGER.log(
Level.WARNING,
"Request has unsupported charset, using default for 'json' parameter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class WriterOutputStream extends OutputStream {
private final Writer writer;
private final CharsetDecoder decoder;

private java.nio.ByteBuffer buf = ByteBuffer.allocate(1024);
private ByteBuffer buf = ByteBuffer.allocate(1024);
private CharBuffer out = CharBuffer.allocate(1024);

public WriterOutputStream(Writer out, Charset charset) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface ErrorCustomizer {
* Return the {@link ForwardToView} showing a custom error page for {@link RequirePOST} annotated methods. This is
* typically used to show a form with a "Try again using POST" button.
*
* <p>Implementations are looked up using {@link java.util.ServiceLoader}, the first implementation to return a non-null value will be used.</p>
* <p>Implementations are looked up using {@link ServiceLoader}, the first implementation to return a non-null value will be used.</p>
*/
@CheckForNull
ForwardToView getForwardView();
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/java/org/kohsuke/stapler/DispatcherTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void testVerbMatch() throws Exception {
}
}

private void check(WebClient wc, HttpMethod m) throws java.io.IOException {
private void check(WebClient wc, HttpMethod m) throws IOException {
TextPage p = wc.getPage(new WebRequest(new URL(url, "verbMatch/"), m));
assertEquals("Got " + m.name(), p.getContent());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public String getName() {

@Exported(visibility = 2)
public Collection<Action> getActions() {
return java.util.Arrays.asList(new ParameterAction(), new CauseAction());
return List.of(new ParameterAction(), new CauseAction());
}
}

Expand Down