Comments (8)
Thanks for opening your first issue here! 😃
Please check our contributing guideline. Especially when you report a problem, make sure you share a Minimal, Complete, and Verifiable example to reproduce it in this issue.
from spotbugs.
Which version of spotbugs are you using?
from spotbugs.
4.8.5
from spotbugs.
I enabled fdls.debug
and got this:
Analyzing method BaseUrl.isValidUrl
Store at 39@20 is dead
Previous is: 19: areturn[176](1)
BaseUrl.java : isValidUrl
priority: 5
Reporting DLS: Dead store to local variable
{ A_LITTLE_BIT_LOWER_PRIORITY edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.NO_LOADS true
FALSE_POSITIVE edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.EXCEPTION_HANDLER true
NO_ADJUSTMENT edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.LOCAL_NAME ?
}
Store at 41@26 is dead
Previous is: 25: areturn[176](1)
BaseUrl.java : isValidUrl
priority: 5
Reporting DLS: Dead store to local variable
{ A_LITTLE_BIT_LOWER_PRIORITY edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.NO_LOADS true
FALSE_POSITIVE edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.EXCEPTION_HANDLER true
NO_ADJUSTMENT edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.LOCAL_NAME ?
}
this is pointing to this line: new URL(replace(value)).toURI();
. I tried reproducing this through a test but it seems no DLS_DEAD_LOCAL_STORE
bug is being reported so maybe I'm not setting up the test correctly.
I got another class that are also throwing the same error, but the method that's failing looks something like:
public Deserializer(Format format) {
super(Instant.class);
this.format = format;
}
(this is a class constructor)
from spotbugs.
What's SxmJavaSpotBugsPlugin
?
It looks to me that it is running SpotBugs and possibly tweaking the edu.umd.cs.findbugs.detect.DeadLocalStoreProperty.NO_LOADS
property to A_LITTLE_BIT_LOWER_PRIORITY
in some unexpected way
from spotbugs.
That's an internal SBT plugin that we developed in order to use spotbugs to check sbt modules. I don't think it's intentionally overriding anything. This is the source code: https://gist.github.com/miguel-vila/e96efe3af7eaa1f687104e8c8eaabd62
This is the setup code: https://gist.github.com/miguel-vila/e96efe3af7eaa1f687104e8c8eaabd62#file-sxmjavaspotbugsplugin-scala-L53-L75 which for the most part is just initializing things with defaults.
I'm running it with these parameters:
spotbugsPriorityThreshold := PriorityThreshold.Normal,
spotbugsRelaxed := true,
from spotbugs.
Thanks for clarifying, would you know why you're setting spotbugsRelaxed
?
I vaguely remember seeing similar issues with that and to be honest I'm not sure what it does
from spotbugs.
See #2269 and #943
These two issues seem to be the same problem
from spotbugs.
Related Issues (20)
- Failing while building spotbugs version 4.2.3 using ./gradlew build HOT 5
- Change the release process to automate the changelog HOT 1
- False positive SING_SINGLETON_IMPLEMENTS_SERIALIZABLE when class is not a singleton HOT 3
- Still getting NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE with Objects.requireNonNull HOT 1
- Version 4.8.4 false positive SING_SINGLETON_GETTER_NOT_SYNCHRONIZED HOT 6
- False positive BC_IMPOSSIBLE_INSTANCEOF HOT 4
- Stylesheet not working in 4.8.4 HOT 13
- Signature of eclipse-plugin expired HOT 1
- FP SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR for record HOT 5
- CT_CONSTRUCTOR_THROW: report violation for final fields HOT 2
- Another false positive SING_SINGLETON_IMPLEMENTS_SERIALIZABLE when class is not a singleton (e.g. protobuf) HOT 1
- Index out of bounds for empty switch HOT 3
- spotbugs-4.8.5.zip contains duplicate log4j-core-xxx.jar HOT 1
- False positive with XXE_SCHEMA_FACTORY (and possibly similar rules) when setting properties in separate method HOT 2
- False positive EI_EXPOSE_REP when copyOf or Collections::unmodifiable* is used with Java Record and Optional HOT 3
- False positive EI_EXPOSE_REP when use Collections.emptySet, emptyList or emptyMap is used
- Disable output during Maven goal `spotbugs:check` as redundant with site generation HOT 4
- Asked to end timing for class X but top of stack is class Y remaining stack is [edu.umd.cs.findbugs.log.Profiler HOT 3
- false positive SING_SINGLETON_GETTER_NOT_SYNCHRONIZED with synchronized initialization-method HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spotbugs.