You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/04/29 19:35:00 UTC

[jira] [Work logged] (FILEUPLOAD-323) Implement spotbugs

     [ https://issues.apache.org/jira/browse/FILEUPLOAD-323?focusedWorklogId=591209&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-591209 ]

ASF GitHub Bot logged work on FILEUPLOAD-323:
---------------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Apr/21 19:34
            Start Date: 29/Apr/21 19:34
    Worklog Time Spent: 10m 
      Work Description: arturobernalg opened a new pull request #75:
URL: https://github.com/apache/commons-fileupload/pull/75


   The idea it's use spotbugs in an intend of find or prevents bugs in Java code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 591209)
    Remaining Estimate: 0h
            Time Spent: 10m

> Implement spotbugs
> ------------------
>
>                 Key: FILEUPLOAD-323
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-323
>             Project: Commons FileUpload
>          Issue Type: New Feature
>            Reporter: Arturo Bernal
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The idea it's use spotbugs in an intend of find or prevents bugs in Java code.
> This Jira it's for keep track and work in the implementations
>  
>  
> Need to check:
> {code:java}
> [INFO] BugInstance size is 12 [INFO] Error size is 0 [INFO] Total bugs: 12 [ERROR] High: Found reliance on default encoding in org.apache.commons.fileupload2.MultipartStream.readHeaders(): java.io.ByteArrayOutputStream.toString() [org.apache.commons.fileupload2.MultipartStream, org.apache.commons.fileupload2.MultipartStream] At MultipartStream.java:[line 592]Another occurrence at MultipartStream.java:[line 595] DM_DEFAULT_ENCODING [ERROR] Medium: org.apache.commons.fileupload2.MultipartStream.BOUNDARY_PREFIX should be package protected [org.apache.commons.fileupload2.MultipartStream] At MultipartStream.java:[line 205] MS_PKGPROTECT [ERROR] Medium: org.apache.commons.fileupload2.MultipartStream.FIELD_SEPARATOR should be package protected [org.apache.commons.fileupload2.MultipartStream] At MultipartStream.java:[line 194] MS_PKGPROTECT [ERROR] Medium: org.apache.commons.fileupload2.MultipartStream.HEADER_SEPARATOR should be package protected [org.apache.commons.fileupload2.MultipartStream] At MultipartStream.java:[line 188] MS_PKGPROTECT [ERROR] Medium: org.apache.commons.fileupload2.MultipartStream.STREAM_TERMINATOR should be package protected [org.apache.commons.fileupload2.MultipartStream] At MultipartStream.java:[line 200] MS_PKGPROTECT [ERROR] Medium: org.apache.commons.fileupload2.ParameterParser.parse(char[], int, int, char) may expose internal representation by storing an externally mutable object into ParameterParser.chars [org.apache.commons.fileupload2.ParameterParser] At ParameterParser.java:[line 302] EI_EXPOSE_REP2 [ERROR] High: Found reliance on default encoding in org.apache.commons.fileupload2.disk.DiskFileItem.getString(): new String(byte[]) [org.apache.commons.fileupload2.disk.DiskFileItem] At DiskFileItem.java:[line 360] DM_DEFAULT_ENCODING [ERROR] Medium: org.apache.commons.fileupload2.disk.DiskFileItem.get() may expose internal representation by returning DiskFileItem.cachedContent [org.apache.commons.fileupload2.disk.DiskFileItem] At DiskFileItem.java:[line 305] EI_EXPOSE_REP [ERROR] Medium: Exceptional return value of java.io.File.delete() ignored in org.apache.commons.fileupload2.disk.DiskFileItem.delete() [org.apache.commons.fileupload2.disk.DiskFileItem] At DiskFileItem.java:[line 432] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE [ERROR] Medium: Exceptional return value of java.io.File.delete() ignored in org.apache.commons.fileupload2.disk.DiskFileItem.finalize() [org.apache.commons.fileupload2.disk.DiskFileItem] At DiskFileItem.java:[line 550] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE [ERROR] Medium: org.apache.commons.fileupload2.jaksrvlt.JakSrvltFileUpload.parseRequest(HttpServletRequest) doesn't override method in superclass because parameter type jakarta.servlet.http.HttpServletRequest doesn't match superclass parameter type javax.servlet.http.HttpServletRequest [org.apache.commons.fileupload2.jaksrvlt.JakSrvltFileUpload] At JakSrvltFileUpload.java:[line 110] NM_WRONG_PACKAGE [ERROR] High: Found reliance on default encoding in org.apache.commons.fileupload2.util.Streams.asString(InputStream): java.io.ByteArrayOutputStream.toString() [org.apache.commons.fileupload2.util.Streams] At Streams.java:[line 142] DM_DEFAULT_ENCODING
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)