--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/52c1836d-d6d0-4187-9123-d95037ad391f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I don't think we have an issue for this indeed, but can you tell me why it is a false positive in your case ? the variable is declared for autocloseable purpose I get it but what's the point of opening a resource if you don't use it at all ?
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/8868546b-914e-443b-92ed-8fd71038ee37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/467832d7-46a7-4ae5-8faf-8e28398dc031%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
try (FileChannel fileChannel = new RandomAccessFile(file, "rw").getChannel();
FileLock lock = fileChannel.lock()) {
fileChannel.write(...);
...
}
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/bd46eb62-cdae-4311-8f62-7663e4748e33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Senior Developer