Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-16138

Duplicate FastCopyHashMap classes

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Do
    • Minor
    • None
    • None
    • Naming
    • None

    Description

      The class FastCopyHashMap exists in both WildFly and WildFly Core despite having almost identical content.

      WildFly path: wildfly/naming/src/main/java/org/jboss/as/naming/util/FastCopyHashMap.java

      WildFly Core path: wildfly-core/controller/src/main/java/org/jboss/as/controller/registry/FastCopyHashMap.java

      Differences:

      • WildFly's FastCopyHashMap is public
      • WildFly Core uses org.jboss.as.controller.logging.ControllerLogger while WildFly uses org.jboss.as.naming.logging.NamingLogger.
      3c3
      <  * Copyright 2011, Red Hat, Inc., and individual contributors
      ---
      >  * Copyright 2010, Red Hat, Inc., and individual contributors
      23c23
      < package org.jboss.as.controller.registry;
      ---
      > package org.jboss.as.naming.util;
      37c37
      < import org.jboss.as.controller.logging.ControllerLogger;
      ---
      > import org.jboss.as.naming.logging.NamingLogger;
      53c53
      < class FastCopyHashMap<K, V> extends AbstractMap<K, V> implements Map<K, V>, Cloneable, Serializable {
      ---
      > public class FastCopyHashMap<K, V> extends AbstractMap<K, V> implements Map<K, V>, Cloneable, Serializable {
      111c111
      <             throw ControllerLogger.ROOT_LOGGER.invalidTableSize();
      ---
      >             throw NamingLogger.ROOT_LOGGER.invalidTableSize();
      117c117
      <             throw ControllerLogger.ROOT_LOGGER.invalidLoadFactor();
      ---
      >             throw NamingLogger.ROOT_LOGGER.invalidLoadFactor();
      269c269
      <                 throw ControllerLogger.ROOT_LOGGER.tableIsFull();
      ---
      >                 throw NamingLogger.ROOT_LOGGER.tableIsFull();
      

      The FastCopyHashMap in WildFly Core should be used and the FastCopyHashMap in WildFly can be removed since WildFly depends on WildFly Core, so the class can be accessed by both WildFly and WildFly Core if made public. Because the FastCopyHashMap isn't public in WildFly Core, this issue can only be fixed after WildFly upgrades to a version of WildFly Core with a public FastCopyHashMap.The loggers also seem to be throwing the same exceptions, so there should be virtually no difference between using one or the other.

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              clara0 Clara Fang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: