ben-manes / caffeine

Concrete collection type used in method declaration JAVA-W1065
Anti-pattern
Major
2 occurrences in this check
Method preprocess accepts parameter(s) of a concrete collection type
149
150  private static final class LongPreprocessor implements IParameterPreprocessor {
151    @SuppressWarnings("PMD.ReplaceVectorWithList")
152    @Override public boolean preprocess(Stack<String> args,153        CommandSpec commandSpec, ArgSpec argSpec, Map<String, Object> info) {154      args.replaceAll(arg -> arg.replace("_", ""));155      return false;156    }157  }
158}
Method getCacheManager accepts parameter(s) of a concrete collection type
 92  }
 93
 94  @Override
 95  public CacheManager getCacheManager(URI uri, ClassLoader classLoader, Properties properties) { 96    URI managerURI = getManagerUri(uri); 97    ClassLoader managerClassLoader = getManagerClassLoader(classLoader); 98 99    synchronized (cacheManagers) {100      Map<URI, CacheManager> cacheManagersByURI = cacheManagers.computeIfAbsent(101          managerClassLoader, any -> new HashMap<>());102      return cacheManagersByURI.computeIfAbsent(managerURI, any -> {103        Properties managerProperties = (properties == null) ? getDefaultProperties() : properties;104        return new CacheManagerImpl(this, isOsgiComponent,105            managerURI, managerClassLoader, managerProperties);106      });107    }108  }109
110  @Override
111  public void close() {