A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/4433 below:

[java] [7.0-rc1] ReplaceHashtableWithMap on java.util.Properties · Issue #4433 · pmd/pmd · GitHub

Affects PMD Version:
7.0-rc1 upgrading from 6.55

Rule:
ReplaceHashtableWithMap

Description:
The rule suggests replacing when (a) the subtype cannot be replaced due to the api contract and (b) Properties now delegates to a ConcurrentHashMap. This rule should not apply to subtypes where the api is out of the author's control.

Code Sample demonstrating the issue:
JCache returns Properties in its api, so this code is flagged.

Expected outcome:
PMD reports a violation, but the user cannot make the suggested refactoring.

# File Line Problem 1 jcache/CacheManagerImpl.java 48 Consider replacing this Hashtable with the newer java.util.Map

Running PMD through: Gradle
This requires workaround in gradle/gradle#24502


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4