Skip to content

Commit

Permalink
Clean up imports (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored May 20, 2024
1 parent 7b5421d commit ded8d88
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
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

0 comments on commit ded8d88

Please sign in to comment.