Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1190

ModuleProperties should not use static fields

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.1.0.BETA1, 5.1.0.FINAL
    • None
    • None
    • None

      ModuleProperties can create class memory leaks, because it contains static collections with references to user defined classes:

      private static Map<Byte,Class<? extends ModuleCommandInitializer>> commandInitializers;
      private static Collection<Class<? extends ReplicableCommand>> moduleCommands;

      Also, the following two collections could contain references to instances of user defined classes in static collections:

      private static Map<String,ModuleProperties> moduleProperties;
      private static Map<Byte,ModuleCommandFactory> commandFactories;

      These collections should not be static, and their clearing should be guaranteed at stoppage time. Even if there's any issues at stoppage time, they should not leak and so any collections containing Class instances should be weakly referenced.

              manik_jira Manik Surtani (Inactive)
              rh-ee-galder Galder ZamarreƱo
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: