Skip to content

Commit

Permalink
fixed findings of review
Browse files Browse the repository at this point in the history
  • Loading branch information
mufasa1976 committed May 20, 2024
1 parent 96e3573 commit 9945131
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public abstract class AbstractRequestContext<T> implements RequestContext {
/**
* the Content-Type Pattern for multipart/related Requests.
* The Content-Type Pattern for multipart/related Requests.
*/
private static final Pattern MULTIPART_RELATED =
Pattern.compile("^\\s*multipart/related.*", Pattern.CASE_INSENSITIVE);
Expand Down Expand Up @@ -85,6 +85,11 @@ public String toString() {
return String.format("%s [ContentLength=%s, ContentType=%s]", getClass().getSimpleName(), getContentLength(), getContentType());
}

/**
* Test the given <code>content-type</code> Value if it is of type <code>multipart/related</code>.
* @param contentType <code>content-type</code> to be tested
* @return does the given <code>content-type</code> Value start with <code>multipart/related</code>
*/
protected boolean isMultipartRelated(final String contentType) {
return MULTIPART_RELATED.matcher(contentType).matches();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class FileItemInputIteratorImpl implements FileItemInputIterator {
private boolean eof;

/**
* is the Request of type <code>multipart/related</code>.
* Is the Request of type <code>multipart/related</code>.
*/
private final boolean multipartRelated;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ default Charset getCharset() throws UnsupportedCharsetException {
* Is the Request of type <code>multipart/related</code>?
*
* @return the Request is of type <code>multipart/related</code>
* @since 2.0.0
*/
boolean isMultipartRelated();
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public InputStream getInputStream() throws IOException {
* Is the Request of type <code>multipart/related</code>?
*
* @return the Request is of type <code>multipart/related</code>
* @since 2.0.0
*/
@Override
public boolean isMultipartRelated() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public InputStream getInputStream() throws IOException {
* Is the Request of type <code>multipart/related</code>?
*
* @return the Request is of type <code>multipart/related</code>
* @since 2.0.0
*/
@Override
public boolean isMultipartRelated() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public InputStream getInputStream() throws IOException {
* Is the Request of type <code>multipart/related</code>?
*
* @return the Request is of type <code>multipart/related</code>
* @since 2.0.0
*/
@Override
public boolean isMultipartRelated() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public InputStream getInputStream() throws IOException {
* Is the Request of type <code>multipart/related</code>?
*
* @return the Request is of type <code>multipart/related</code>
* @since 2.0.0
*/
@Override
public boolean isMultipartRelated() {
Expand Down

0 comments on commit 9945131

Please sign in to comment.