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

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

                Author: ASF GitHub Bot
            Created on: 30/Apr/21 09:56
            Start Date: 30/Apr/21 09:56
    Worklog Time Spent: 10m 
      Work Description: jochenw edited a comment on pull request #75:
URL: https://github.com/apache/commons-fileupload/pull/75#issuecomment-829981338


   I am hesitant. I am fully aware, that commons-lang (as an example) has a 
rather exhaustive set of rules, that are asserted by Spotbugs, Checkstyle, etc. 
On the other hand, I notice that I have a tendency to spend more time dealing 
with Checkstyle, than with the actual coding, if I work on commons-lang. 
Besides, I'm a member of the "code style's not that important" faction. (Might 
be my own problem, because I don't use it frequently enough to become really 
comfortable.)
   
   Perhaps, others might voice an opinion? @garydgregory, @sebbASF, @grobmeier, 
or @kinow, I'd value your opinion.
   


-- 
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 591427)
    Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)

Reply via email to