tonihele commented on code in PR #6602:
URL: https://github.com/apache/netbeans/pull/6602#discussion_r1426367546
##########
enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyDeploymentManager.java:
##########
@@ -83,8 +83,8 @@ public class WildflyDeploymentManager implements
DeploymentManager2 {
* server instance bcs instance properties are also removed along with
* instance.
*/
- private static final Map<InstanceProperties, Boolean>
PROPERTIES_TO_IS_RUNNING
- = Collections.synchronizedMap(new WeakHashMap());
+ private static final ConcurrentMap<InstanceProperties, Boolean>
PROPERTIES_TO_IS_RUNNING
+ = new ConcurrentHashMap(new WeakHashMap());
Review Comment:
Hmm, isn't this very different than the original?
new ConcurrentHashMap(new WeakHashMap()) -> just creates a new
ConcurrentHashMap, giving new WeakHashMap (empty map) as a parameter does
nothing.
Collections.synchronizedMap(new WeakHashMap()) actually creates a
synchronized version of WeakHashMap.
If ConcurrentHashMap is used, one must change the usage so that the keys
inserted in the map are weak references. IF the original behavior is wanted.
Right?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists