[JIRA] (JENKINS-58058) spotbugs

2 views
Skip to first unread message

jsoref+jenkins@gmail.com (JIRA)

unread,
Jun 17, 2019, 4:42:01 PM6/17/19
to jenkinsc...@googlegroups.com
Josh Soref created an issue
 
Jenkins / Task JENKINS-58058
spotbugs
Issue Type: Task Task
Assignee: Josh Soref
Components: extras-executable-war
Created: 2019-06-17 20:41
Priority: Minor Minor
Reporter: Josh Soref

Bad practice

Main.readStringNonBlocking(InputStream, int) ignores result of java.io.InputStream.read(byte[]) 
      Method 
      ignores results of InputStream.read()
    
    
      This method ignores the return value of one of the variants of java.io.InputStream.read() 
      which can return multiple bytes.  If the return value is not checked, 
      the caller will not be able to correctly handle the case where fewer 
      bytes were read than the caller requested.  This is a particularly 
      insidious kind of bug, because in many programs, reads from input 
      streams usually do read the full amount of data requested, causing the 
      program to fail only sporadically.
    
      Bug kind and pattern: RR - RR_NOT_CHECKED
     

Dodgy code

At MainTest.java:[line 15]
In method MainTest.should HaveNoStandardDependenciesFile()
Local variable named versions

      Dead 
      store to local variable

      This instruction assigns a value to a local variable, but the value is 
      not read or used in any subsequent instruction. Often, this indicates an 
      error, because the value computed is never used.
    
      Note that Sun's javac compiler often generates dead stores for final 
      local variables. Because SpotBugs is a bytecode-based tool, there is no 
      easy way to eliminate these false positives.
    
      Bug kind and pattern: DLS - DLS_DEAD_LOCAL_STORE 
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages