Closed HEdingfield closed 1 year ago
Can you provide some specifics? Some output would be a good place to start. In particular I'm wondering if the location that the dependencies are fetched to has changed. Did you previously use SpotBugs without seeing this issue? When was that?
Yes, I believe I was previously using Spotbugs without issue back in August when I last did major work on the project.
The only thing I can think of that might have affected it would be PR #626, but it seems unlikely. Curious if this happens on your end too when you run it?
Here's an example of the thousands of lines it outputs:
> Task :spotbugsMain
M D Eq: org.apache.commons.collections4.bidimap.TreeBidiMap$Inverse.equals(Object) is unusual At TreeBidiMap.java:[line 2252]
M B Eq: com.ctc.wstx.shaded.msv_core.grammar.AttributeExp.equals(Object) fails for subtypes At AttributeExp.java:[line 65]
M X SKIPPED: com.microsoft.schemas.office.excel.CTClientData is too big for analysis At CTClientData.java:[lines 22-23]
M D Eq: org.apache.commons.math3.linear.RealVector.equals(Object) is unusual At RealVector.java:[line 1096]
M D Eq: org.apache.commons.collections4.bidimap.TreeBidiMap.equals(Object) is unusual At TreeBidiMap.java:[line 479]
M B Eq: com.ctc.wstx.shaded.msv_core.datatype.xsd.BinaryValueType.equals(Object) fails for subtypes At BinaryValueType.java:[line 44]
H B Eq: org.apache.logging.log4j.spi.DefaultThreadContextStack.equals(Object) checks for operand being a MutableThreadContextStack At DefaultThreadContextStack.java:[line 137]
M X SKIPPED: com.microsoft.schemas.office.excel.impl.CTClientDataImpl is too big for analysis At CTClientDataImpl.java:[lines 22-14223]
M C Eq: com.sun.scenario.effect.impl.prism.PrFilterContext overrides equals in com.sun.scenario.effect.FilterContext and may not be symmetric At PrFilterContext.java:[lines 109-113]
M C Eq: org.apache.poi.hpsf.CustomProperty overrides equals in Property and may not be symmetric At CustomProperty.java:[line 118]
M V EI2: new org.apache.commons.collections4.iterators.EnumerationIterator(Enumeration, Collection) may expose internal representation by storing an externally mutable object into EnumerationIterator.collection At EnumerationIterator.java:[line 68]
M V EI2: new org.codehaus.stax2.ri.evt.Stax2FilteredEventReader(XMLEventReader2, EventFilter) may expose internal representation by storing an externally mutable object into Stax2FilteredEventReader.mReader At Stax2FilteredEventReader.java:[line 26]
M B It: com.ctc.wstx.shaded.msv_core.grammar.BinaryExp$1.next() cannot throw NoSuchElementException At BinaryExp.java:[line 108]
H D FE: Test for floating point equality in com.graphbuilder.org.apache.harmony.awt.gl.Crossing$CubicCurve.cross(double[], int, double, double) At Crossing.java:[line 290]
M V EI2: new com.sun.javafx.scene.traversal.SubSceneTraversalEngine(SubScene) may expose internal representation by storing an externally mutable object into SubSceneTraversalEngine.subScene At SubSceneTraversalEngine.java:[line 39]
M V EI2: org.apache.poi.xwpf.usermodel.XWPFAbstractNum.setNumbering(XWPFNumbering) may expose internal representation by storing an externally mutable object into XWPFAbstractNum.numbering At XWPFAbstractNum.java:[line 50]
M V EI2: new org.apache.poi.xwpf.usermodel.XWPFAbstractNum(CTAbstractNum) may expose internal representation by storing an externally mutable object into XWPFAbstractNum.ctAbstractNum At XWPFAbstractNum.java:[line 33]
M V EI: org.apache.poi.xwpf.usermodel.XWPFAbstractNum.getNumbering() may expose internal representation by returning XWPFAbstractNum.numbering At XWPFAbstractNum.java:[line 46]
M V EI: org.apache.poi.xwpf.usermodel.XWPFAbstractNum.getCTAbstractNum() may expose internal representation by returning XWPFAbstractNum.ctAbstractNum At XWPFAbstractNum.java:[line 54]
M V EI2: new org.apache.poi.xwpf.usermodel.XWPFAbstractNum(CTAbstractNum, XWPFNumbering) may expose internal representation by storing an externally mutable object into XWPFAbstractNum.numbering At XWPFAbstractNum.java:[line 38]
M V EI2: org.apache.poi.xwpf.usermodel.XWPFAbstractNum.setCtAbstractNum(CTAbstractNum) may expose internal representation by storing an externally mutable object into XWPFAbstractNum.ctAbstractNum At XWPFAbstractNum.java:[line 58]
M V EI2: new org.apache.poi.xwpf.usermodel.XWPFAbstractNum(CTAbstractNum, XWPFNumbering) may expose internal representation by storing an externally mutable object into XWPFAbstractNum.ctAbstractNum At XWPFAbstractNum.java:[line 37]
M V EI: org.apache.poi.xwpf.usermodel.XWPFAbstractNum.getAbstractNum() may expose internal representation by returning XWPFAbstractNum.ctAbstractNum At XWPFAbstractNum.java:[line 42]
M V EI: com.sun.javafx.sg.prism.NGPolyline.getShape() may expose internal representation by returning NGPolyline.path At NGPolyline.java:[line 54]
M V EI: org.apache.commons.io.output.StringBuilderWriter.getBuilder() may expose internal representation by returning StringBuilderWriter.builder At StringBuilderWriter.java:[line 153]
M V EI: org.apache.poi.xddf.usermodel.XDDFPath.getXmlObject() may expose internal representation by returning XDDFPath.path At XDDFPath.java:[line 37]
M V EI2: new com.ctc.wstx.shaded.msv_core.reader.xmlschema.RootIncludedSchemaState(State) may expose internal representation by storing an externally mutable object into RootIncludedSchemaState.topLevelState At RootIncludedSchemaState.java:[line 48]
M V EI: org.apache.poi.hwmf.record.HwmfPlaceableHeader.getBounds() may expose internal representation by returning HwmfPlaceableHeader.bounds At HwmfPlaceableHeader.java:[line 84]
M V EI2: new org.apache.xmlbeans.impl.jam.xml.TunnelledException(XMLStreamException) may expose internal representation by storing an externally mutable object into TunnelledException.mXSE At TunnelledException.java:[line 27]
M V EI: org.apache.xmlbeans.impl.jam.xml.TunnelledException.getXMLStreamException() may expose internal representation by returning TunnelledException.mXSE At TunnelledException.java:[line 30]
M V EI2: new com.sun.javafx.property.adapter.ReadOnlyPropertyDescriptor$ReadOnlyListener(ReadOnlyPropertyDescriptor, Object, ReadOnlyJavaBeanProperty) may expose internal representation by storing an externally mutable object into ReadOnlyPropertyDescriptor$ReadOnlyListener.this$0 At ReadOnlyPropertyDescriptor.java:[line 159]
M V EI: com.sun.javafx.iio.common.SmoothMinifier.getDestination() may expose internal representation by returning SmoothMinifier.destBuf At SmoothMinifier.java:[line 159]
M V EI2: new com.sun.javafx.collections.ArrayListenerHelper(ObservableArray) may expose internal representation by storing an externally mutable object into ArrayListenerHelper.observable At ArrayListenerHelper.java:[line 85]
H B ES: Comparison of String objects using == or != in com.fasterxml.jackson.dataformat.xml.util.CaseInsensitiveNameSet.contains(Object) At CaseInsensitiveNameSet.java:[line 34]
M V MS: Public static com.fasterxml.jackson.databind.node.MissingNode.getInstance() may expose internal representation by returning MissingNode.instance At MissingNode.java:[line 51]
M V EI2: new org.apache.commons.compress.harmony.unpack200.SegmentConstantPoolArrayCache$CachedArray(SegmentConstantPoolArrayCache, String[]) may expose internal representation by storing an externally mutable object into SegmentConstantPoolArrayCache$CachedArray.primaryArray At SegmentConstantPoolArrayCache.java:[line 116]
M V EI: org.apache.poi.hpsf.HPSFRuntimeException.getReason() may expose internal representation by returning HPSFRuntimeException.reason At HPSFRuntimeException.java:[line 98]
M V EI2: new org.apache.poi.hpsf.HPSFRuntimeException(String, Throwable) may expose internal representation by storing an externally mutable object into HPSFRuntimeException.reason At HPSFRuntimeException.java:[line 84]
M V EI2: new org.apache.poi.hpsf.HPSFRuntimeException(Throwable) may expose internal representation by storing an externally mutable object into HPSFRuntimeException.reason At HPSFRuntimeException.java:[line 68]
I haven't figured out how to get spotbugs working at all locally, I rely on it running on github actions. My gradle panel only has what I've manually added:
Sorry I can't be of more help, but happy to test things locally if you need
Sorry for the long delay, I just got to this. Things seem to work fine for me locally:
tamird@pc:~/src/rcv$ ./gradlew spotBugsMain
> Configure project :
Project : => 'network.brightspots.rcv' Java module
BUILD SUCCESSFUL in 257ms
3 actionable tasks: 3 up-to-date
tamird@pc:~/src/rcv$ ./gradlew spotBugsTest
> Configure project :
Project : => 'network.brightspots.rcv' Java module
BUILD SUCCESSFUL in 269ms
5 actionable tasks: 5 up-to-date
I'm going to close this, but please reopen if you have a reproduction I can use.
Seems like it's worked itself on my end too. 👍
For some reason, Spotbugs is going crazy on my end and running for all the project deps too. This makes it nearly impossible to use.
@tarheel @artoonie are you guys seeing this on your end too when you run it? (I use the Gradle panel in IntelliJ, then go to verification => spotbugsMain).
@tamird, any ideas how to fix this?