Pankraz76 commented on code in PR #11284:
URL: https://github.com/apache/maven/pull/11284#discussion_r2436655215


##########
impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelObjectPool.java:
##########
@@ -91,27 +93,14 @@ public <T> T process(T object) {
     }
 
     private String getProperty(String name, String defaultValue) {
-        Object value = properties.get(name);
-        return value instanceof String str ? str : defaultValue;
-    }
-
-    /**
-     * Gets the set of object types that should be pooled.
-     */
-    private Set<String> getPooledTypes(Map<?, ?> properties) {
-        String pooledTypesProperty = 
getProperty(Constants.MAVEN_MODEL_PROCESSOR_POOLED_TYPES, "Dependency");
-        return Arrays.stream(pooledTypesProperty.split(","))
-                .map(String::trim)
-                .filter(s -> !s.isEmpty())
-                .collect(Collectors.toSet());
+        return properties.get(name) instanceof String str ? str : defaultValue;
     }
 
     /**
      * Creates a cache for the specified object type with the appropriate 
reference type.
      */
     private Cache<PoolKey, Object> createCacheForType(Class<?> objectType) {
-        Cache.ReferenceType referenceType = 
getReferenceTypeForClass(objectType);
-        return Cache.newCache(referenceType);
+        return Cache.newCache(getReferenceTypeForClass(objectType));

Review Comment:
   the rule is called **high cohesion and low coupling**, which the opposite is 
always the hard reality, some design pattern everybody fails upon in some 
regard. Ether its understanding or applying not saying im achieving any of it. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to