Skip to content

Commit

Permalink
Remove useless comments
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jul 26, 2024
1 parent 7f3a9e1 commit 628a8af
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
public class DefaultFileItem
extends DiskFileItem {

// ----------------------------------------------------------- Constructors

/**
* Constructs a new {@code DefaultFileItem} instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
@Deprecated
public class DefaultFileItemFactory extends DiskFileItemFactory {

// ----------------------------------------------------------- Constructors

/**
* Constructs an unconfigured instance of this class. The resulting factory
* may be configured by calling the appropriate setter methods.
Expand Down Expand Up @@ -71,8 +69,6 @@ public DefaultFileItemFactory(final int sizeThreshold, final File repository) {
super(sizeThreshold, repository);
}

// --------------------------------------------------------- Public Methods

/**
* Create a new {@link org.apache.commons.fileupload.DefaultFileItem}
* instance from the supplied parameters and the local factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,11 @@
public class DiskFileUpload
extends FileUploadBase {

// ----------------------------------------------------------- Data members

/**
* The factory to use to create new form items.
*/
private DefaultFileItemFactory fileItemFactory;

// ----------------------------------------------------------- Constructors

/**
* Constructs an instance of this class which uses the default factory to
* create {@code FileItem} instances.
Expand Down Expand Up @@ -78,8 +74,6 @@ public DiskFileUpload(final DefaultFileItemFactory fileItemFactory) {
this.fileItemFactory = fileItemFactory;
}

// ----------------------------------------------------- Property accessors

/**
* Returns the factory class used when creating file items.
*
Expand Down Expand Up @@ -167,8 +161,6 @@ public void setRepositoryPath(final String repositoryPath) {
fileItemFactory.setRepository(new File(repositoryPath));
}

// --------------------------------------------------------- Public methods

/**
* Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
* compliant {@code multipart/form-data} stream. If files are stored
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/apache/commons/fileupload/FileItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
*/
public interface FileItem extends FileItemHeadersSupport {

// ------------------------------- Methods from javax.activation.DataSource

/**
* Returns an {@link java.io.InputStream InputStream} that can be
* used to retrieve the contents of the file.
Expand Down Expand Up @@ -82,8 +80,6 @@ public interface FileItem extends FileItemHeadersSupport {
*/
String getName();

// ------------------------------------------------------- FileItem methods

/**
* Provides a hint as to whether or not the file contents will be read
* from memory.
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/org/apache/commons/fileupload/FileUpload.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,11 @@
public class FileUpload
extends FileUploadBase {

// ----------------------------------------------------------- Data members

/**
* The factory to use to create new form items.
*/
private FileItemFactory fileItemFactory;

// ----------------------------------------------------------- Constructors

/**
* Constructs an uninitialized instance of this class.
*
Expand All @@ -65,8 +61,6 @@ public FileUpload(final FileItemFactory fileItemFactory) {
this.fileItemFactory = fileItemFactory;
}

// ----------------------------------------------------- Property accessors

/**
* Returns the factory class used when creating file items.
*
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/org/apache/commons/fileupload/FileUploadBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
*/
public abstract class FileUploadBase {

// ---------------------------------------------------------- Class methods

/**
* <p>Utility method that determines whether the request contains multipart
* content.</p>
Expand Down Expand Up @@ -96,8 +94,6 @@ public static boolean isMultipartContent(final HttpServletRequest req) {
return ServletFileUpload.isMultipartContent(req);
}

// ----------------------------------------------------- Manifest constants

/**
* HTTP content type header name.
*/
Expand Down Expand Up @@ -155,8 +151,6 @@ public static boolean isMultipartContent(final HttpServletRequest req) {
@Deprecated
public static final int MAX_HEADER_SIZE = 1024;

// ----------------------------------------------------------- Data members

/**
* The maximum size permitted for the complete request, as opposed to
* {@link #fileSizeMax}. A value of -1 indicates no maximum.
Expand Down Expand Up @@ -185,8 +179,6 @@ public static boolean isMultipartContent(final HttpServletRequest req) {
*/
private ProgressListener listener;

// ----------------------------------------------------- Property accessors

/**
* Returns the factory class used when creating file items.
*
Expand Down Expand Up @@ -293,8 +285,6 @@ public void setHeaderEncoding(final String encoding) {
headerEncoding = encoding;
}

// --------------------------------------------------------- Public methods

/**
* Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
* compliant {@code multipart/form-data} stream.
Expand Down Expand Up @@ -438,8 +428,6 @@ public Map<String, List<FileItem>> parseParameterMap(final RequestContext ctx)
return itemsMap;
}

// ------------------------------------------------------ Protected methods

/**
* Retrieves the boundary from the {@code Content-type} header.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ private void notifyListener() {

}

// ----------------------------------------------------- Manifest constants

/**
* The Carriage Return ASCII character value.
*/
Expand Down Expand Up @@ -202,8 +200,6 @@ private void notifyListener() {
*/
protected static final byte[] BOUNDARY_PREFIX = {CR, LF, DASH, DASH};

// ----------------------------------------------------------- Data members

/**
* The input stream from which data is read.
*/
Expand Down Expand Up @@ -264,8 +260,6 @@ private void notifyListener() {
*/
private final ProgressNotifier notifier;

// ----------------------------------------------------------- Constructors

/**
* Creates a new instance.
*
Expand Down Expand Up @@ -386,8 +380,6 @@ public MultipartStream(final InputStream input,
this(input, boundary, DEFAULT_BUFSIZE, null);
}

// --------------------------------------------------------- Public methods

/**
* Retrieves the character encoding used when reading the headers of an
* individual part. When not specified, or {@code null}, the platform
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
public class DiskFileItem
implements FileItem {

// ----------------------------------------------------- Manifest constants

/**
* Default content charset to be used when no explicit charset
* parameter is provided by the sender. Media subtypes of the
Expand All @@ -79,8 +77,6 @@ public class DiskFileItem
*/
public static final String DEFAULT_CHARSET = "ISO-8859-1";

// ----------------------------------------------------------- Data members

/**
* UID used in unique file name generation.
*/
Expand Down Expand Up @@ -156,8 +152,6 @@ public class DiskFileItem
*/
private String defaultCharset = DEFAULT_CHARSET;

// ----------------------------------------------------------- Constructors

/**
* Constructs a new {@code DiskFileItem} instance.
*
Expand Down Expand Up @@ -186,8 +180,6 @@ public DiskFileItem(final String fieldName,
this.repository = repository;
}

// ------------------------------- Methods from javax.activation.DataSource

/**
* Returns an {@link java.io.InputStream InputStream} that can be
* used to retrieve the contents of the file.
Expand Down Expand Up @@ -251,8 +243,6 @@ public String getName() {
return Streams.checkFileName(fileName);
}

// ------------------------------------------------------- FileItem methods

/**
* Provides a hint as to whether or not the file contents will be read
* from memory.
Expand Down Expand Up @@ -505,8 +495,6 @@ public OutputStream getOutputStream() throws IOException {
return dfos;
}

// --------------------------------------------------------- Public methods

/**
* Returns the {@link java.io.File} object for the {@code FileItem}'s
* data's temporary location on the disk. Note that for
Expand All @@ -530,8 +518,6 @@ public File getStoreLocation() {
return dfos.getFile();
}

// ------------------------------------------------------ Protected methods

/**
* Removes the file contents from the temporary storage.
*/
Expand Down Expand Up @@ -572,8 +558,6 @@ protected File getTempFile() {
return tempFile;
}

// -------------------------------------------------------- Private methods

/**
* Returns an identifier that is unique within the class loader used to
* load this class, but does not have random-like appearance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,11 @@
*/
public class DiskFileItemFactory implements FileItemFactory {

// ----------------------------------------------------- Manifest constants

/**
* The default threshold above which uploads will be stored on disk.
*/
public static final int DEFAULT_SIZE_THRESHOLD = 10240;

// ----------------------------------------------------- Instance Variables

/**
* The directory in which uploaded files will be stored, if stored on disk.
*/
Expand All @@ -101,8 +97,6 @@ public class DiskFileItemFactory implements FileItemFactory {
*/
private String defaultCharset = DiskFileItem.DEFAULT_CHARSET;

// ----------------------------------------------------------- Constructors

/**
* Constructs an unconfigured instance of this class. The resulting factory
* may be configured by calling the appropriate setter methods.
Expand All @@ -126,8 +120,6 @@ public DiskFileItemFactory(final int sizeThreshold, final File repository) {
this.repository = repository;
}

// ------------------------------------------------------------- Properties

/**
* Returns the directory used to temporarily store files that are larger
* than the configured size threshold.
Expand Down Expand Up @@ -178,8 +170,6 @@ public void setSizeThreshold(final int sizeThreshold) {
this.sizeThreshold = sizeThreshold;
}

// --------------------------------------------------------- Public Methods

/**
* Create a new {@link DiskFileItem}
* instance from the supplied parameters and the local factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
*/
public class PortletFileUpload extends FileUpload {

// ---------------------------------------------------------- Class methods

/**
* Utility method that determines whether the request contains multipart
* content.
Expand All @@ -64,8 +62,6 @@ public static final boolean isMultipartContent(final ActionRequest request) {
new PortletRequestContext(request));
}

// ----------------------------------------------------------- Constructors

/**
* Constructs an uninitialized instance of this class. A factory must be
* configured, using {@code setFileItemFactory()}, before attempting
Expand All @@ -87,8 +83,6 @@ public PortletFileUpload(final FileItemFactory fileItemFactory) {
super(fileItemFactory);
}

// --------------------------------------------------------- Public methods

/**
* Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
* compliant {@code multipart/form-data} stream.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,11 @@
*/
public class PortletRequestContext implements UploadContext {

// ----------------------------------------------------- Instance Variables

/**
* The request for which the context is being provided.
*/
private final ActionRequest request;


// ----------------------------------------------------------- Constructors

/**
* Construct a context for this request.
*
Expand All @@ -53,9 +48,6 @@ public PortletRequestContext(final ActionRequest request) {
this.request = request;
}


// --------------------------------------------------------- Public Methods

/**
* Retrieve the character encoding for the request.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public class ServletFileUpload extends FileUpload {
*/
private static final String POST_METHOD = "POST";

// ---------------------------------------------------------- Class methods

/**
* Utility method that determines whether the request contains multipart
* content.
Expand All @@ -69,8 +67,6 @@ public static final boolean isMultipartContent(
return FileUploadBase.isMultipartContent(new ServletRequestContext(request));
}

// ----------------------------------------------------------- Constructors

/**
* Constructs an uninitialized instance of this class. A factory must be
* configured, using {@code setFileItemFactory()}, before attempting
Expand All @@ -92,8 +88,6 @@ public ServletFileUpload(final FileItemFactory fileItemFactory) {
super(fileItemFactory);
}

// --------------------------------------------------------- Public methods

/**
* Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
* compliant {@code multipart/form-data} stream.
Expand Down
Loading

0 comments on commit 628a8af

Please sign in to comment.