verified #1405 UnusedPrivateMethod false positive?

This commit is contained in:
Andreas Dangel
2015-09-16 21:37:17 +02:00
parent 2500412b14
commit 64012cc0b4
4 changed files with 51 additions and 5 deletions

View File

@ -1484,6 +1484,23 @@ public class Something {
private static <K, V> Map<K, V> mapOf2(final Function<V, K> keyMapper, final V... values) {
return Stream.of(values).collect(Collectors.toMap(keyMapper, Function.identity()));
}
}
]]></code>
</test-code>
<test-code useAuxClasspath="false">
<description>#1405 UnusedPrivateMethod false positive?</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public class blabla implements blabla2 {
@Override
public List<String> getProductImageUrls(final ApparelStyleVariantProductModel product, final String format) {
return getImageUrlsListForVariant(product, format);
}
private List<String> getImageUrlsListForVariant(final VariantProductModel variant, final String format) {
final SortedMap<Integer, String> imageUrls = getImageUrlsMapForVariant(variant, format);
return new ArrayList<String>(imageUrls.values());
}
}
]]></code>
</test-code>