I have findebug which check find bug in one case and dont fing in another, and i completely do not understand how its connected.
So i encounter this RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT and started to try different code, and found variant which fix this warning but it looks totaly unconnected to reported problem.
This code DOES generate RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT
final Node currentProjectNode = TripleUtil.createNode(projectId);
final ParameterizedSparqlString pQuery = new ParameterizedSparqlString();
pQuery.setNsPrefix(TripleUtil.NS_PREFIX, TripleUtil.NS);
And this code NOT generate bug
final Node currentProjectNode = TripleUtil.createNode(projectId);
final PrefixMappingImpl prefixMapping = new PrefixMappingImpl();
prefixMapping.setNsPrefix(TripleUtil.NS_PREFIX, TripleUtil.NS);
final ParameterizedSparqlString pQuery = new ParameterizedSparqlString();
pQuery.setNsPrefix(TripleUtil.NS_PREFIX, TripleUtil.NS);
As you can see i just instantiate class and then use its method and thats all, i didnt change code which generate bug, i didnt change method which generate bug. It looks like in first sample findbug just cant find proper implementation or something, but i dont understand why? It should not be reported after all because prefixMapping.setNsPrefix do some job not just return value.