-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(recordings): empty archive directories are now removed #957
Conversation
Ah, yea. I've seen this before. IIRC SpotBugs is doing its analysis on the compiled bytecode, not directly on the Java source code you wrote. The try-with-resources construct gets compiled down to bytecode that performs a null check and so SpotBugs sometimes flags that as redundant. I thought we had got around that by updating our SpotBugs version at some point, but maybe not. You can just add a
|
src/main/java/io/cryostat/recordings/RecordingArchiveHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/recordings/RecordingArchiveHelper.java
Outdated
Show resolved
Hide resolved
…implementation with the cryostat fs abstraction
running mvn clean verify on my laptop builds and passes all tests fine, i've run git status and git log and nothing seems wrong there... |
Looks like just a flakey test run. Those reports-related integration tests are usually the most problematic ones. |
Fixes #951
There is a bug that is tracked with the spotbugs bug tracker
[ERROR] Medium: Nullcheck of entries at line 242 of value previously dereferenced in io.cryostat.recordings.RecordingArchiveHelper.pathIsEmpty(Path) [io.cryostat.recordings.RecordingArchiveHelper, io.cryostat.recordings.RecordingArchiveHelper] At RecordingArchiveHelper.java:[line 242]Redundant null check at RecordingArchiveHelper.java:[line 243] RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
I'm not sure why because I don't see a clear null checking in the code I added.