Skip to content

fix: diff Launch Configs build to the same folder (#943)

Sign in for the full log view
GitHub Actions / spotbugs completed May 7, 2024 in 0s

SpotBugs Source Code Analyzer report

521 violation(s) found

Annotations

Check warning on line 32 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFCorePlugin.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

MS_EXPOSE_REP

Public static com.espressif.idf.core.IDFCorePlugin.getPlugin() may expose internal representation by returning IDFCorePlugin.plugin
Raw output
A public static method returns a reference to an array that is part of the static state of the class. Any code that calls this method can freely modify the underlying array. One fix is to return a copy of the array.

Check warning on line 49 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFCorePlugin.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION

Method lists Exception in its throws clause.
Raw output
Method lists Exception in its throws clause.
When declaring a method, the types of exceptions in the throws clause should be the most specific. Therefore, using Exception in the throws clause would force the caller to either use it in its own throws clause, or use it in a try-catch block (when it does not necessarily contain any meaningful information about the thrown exception).

For more information, see the SEI CERT ERR07-J rule [https://wiki.sei.cmu.edu/confluence/display/java/ERR07-J.+Do+not+throw+RuntimeException%2C+Exception%2C+or+Throwable].

Check warning on line 59 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFCorePlugin.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION

Method lists Exception in its throws clause.
Raw output
Method lists Exception in its throws clause.
When declaring a method, the types of exceptions in the throws clause should be the most specific. Therefore, using Exception in the throws clause would force the caller to either use it in its own throws clause, or use it in a try-catch block (when it does not necessarily contain any meaningful information about the thrown exception).

For more information, see the SEI CERT ERR07-J rule [https://wiki.sei.cmu.edu/confluence/display/java/ERR07-J.+Do+not+throw+RuntimeException%2C+Exception%2C+or+Throwable].

Check warning on line 25 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFProjectNature.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP

com.espressif.idf.core.IDFProjectNature.getProject() may expose internal representation by returning IDFProjectNature.project
Raw output
Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

Check warning on line 31 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFProjectNature.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

com.espressif.idf.core.IDFProjectNature.setProject(IProject) may expose internal representation by storing an externally mutable object into IDFProjectNature.project
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 42 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFVersionsReader.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in com.espressif.idf.core.IDFVersionsReader.getVersions(): new java.io.InputStreamReader(InputStream)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

Check warning on line 49 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/InputStreamThread.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in com.espressif.idf.core.InputStreamThread.run(): new java.io.InputStreamReader(InputStream)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

Check warning on line 39 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/OutputStreamThread.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in com.espressif.idf.core.OutputStreamThread.run(): new java.io.OutputStreamWriter(OutputStream)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

Check warning on line 22 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/OutputStreamThread.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.OutputStreamThread(OutputStream, String, String) may expose internal representation by storing an externally mutable object into OutputStreamThread.out
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 113 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/ProcessBuilderFactory.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of errorGobbler, which is known to be non-null in com.espressif.idf.core.ProcessBuilderFactory.processData(InputStream, InputStream, OutputStream, Process)
Raw output
This method contains a redundant check of a known non-null value against the constant null.

Check warning on line 108 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/ProcessBuilderFactory.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of readerGobbler, which is known to be non-null in com.espressif.idf.core.ProcessBuilderFactory.processData(InputStream, InputStream, OutputStream, Process)
Raw output
This method contains a redundant check of a known non-null value against the constant null.

Check warning on line 91 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/ZipUtility.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

com.espressif.idf.core.ZipUtility.decompress(ZipInputStream, File, int) may fail to clean up java.io.OutputStream on checked exception
Raw output
This method may fail to clean up (close, dispose of) a stream, database object, or other resource requiring an explicit cleanup operation.

In general, if a method opens a stream or other resource, the method should use a try/finally block to ensure that the stream or resource is cleaned up before the method returns.

This bug pattern is essentially the same as the OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE bug patterns, but is based on a different (and hopefully better) static analysis technique. We are interested is getting feedback about the usefulness of this bug pattern. For sending feedback, check:

 * contributing guideline [https://github.com/spotbugs/spotbugs/blob/master/.github/CONTRIBUTING.md]
 * mailinglist [https://github.com/spotbugs/discuss/issues?q=]

In particular, the false-positive suppression heuristics for this bug pattern have not been extensively tuned, so reports about false positives are helpful to us.

See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes (PDF [https://people.eecs.berkeley.edu/~necula/Papers/rte_oopsla04.pdf]), for a description of the analysis technique.

Check warning on line 39 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/actions/ApplyTargetJob.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.actions.ApplyTargetJob(ILaunchBarManager, ILaunchTargetManager, String, IWizard) may expose internal representation by storing an externally mutable object into ApplyTargetJob.launchBarManager
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 40 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/actions/ApplyTargetJob.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.actions.ApplyTargetJob(ILaunchBarManager, ILaunchTargetManager, String, IWizard) may expose internal representation by storing an externally mutable object into ApplyTargetJob.targetManager
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 41 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/actions/ApplyTargetJob.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.actions.ApplyTargetJob(ILaunchBarManager, ILaunchTargetManager, String, IWizard) may expose internal representation by storing an externally mutable object into ApplyTargetJob.wizard
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 31 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/ActiveLaunchConfigurationProvider.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.build.ActiveLaunchConfigurationProvider(ILaunchBarManager) may expose internal representation by storing an externally mutable object into ActiveLaunchConfigurationProvider.launchBarManager
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 140 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/ErrorMarkerListener.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

SIC_INNER_SHOULD_BE_STATIC

Should com.espressif.idf.core.build.ErrorMarkerListener$ProjectRefreshJob be a _static_ inner class?
Raw output
This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

Check warning on line 45 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/EspIdfErrorParser.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.build.EspIdfErrorParser(List) may expose internal representation by storing an externally mutable object into EspIdfErrorParser.reHintsList
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 271 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP

com.espressif.idf.core.build.IDFBuildConfiguration.getToolChainFile() may expose internal representation by returning IDFBuildConfiguration.toolChainFile
Raw output
Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

Check warning on line 135 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.build.IDFBuildConfiguration(IBuildConfiguration, String, IToolChain, ICMakeToolChainFile, String) may expose internal representation by storing an externally mutable object into IDFBuildConfiguration.toolChainFile
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 286 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

com.espressif.idf.core.build.IDFBuildConfiguration.build(int, Map, IConsole, IProgressMonitor) may expose internal representation by storing an externally mutable object into IDFBuildConfiguration.monitor
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 307 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Exceptional return value of java.io.File.mkdir() ignored in com.espressif.idf.core.build.IDFBuildConfiguration.build(int, Map, IConsole, IProgressMonitor)
Raw output
This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

Check warning on line 167 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Exceptional return value of java.io.File.mkdirs() ignored in com.espressif.idf.core.build.IDFBuildConfiguration.getBuildContainerPath()
Raw output
This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

Check warning on line 35 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/MarkerCleanupJob.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.build.MarkerCleanupJob(IFile, IMarker) may expose internal representation by storing an externally mutable object into MarkerCleanupJob.file
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 36 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/MarkerCleanupJob.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.build.MarkerCleanupJob(IFile, IMarker) may expose internal representation by storing an externally mutable object into MarkerCleanupJob.marker
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.