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

ModuleProperties should not use static fields

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              manik_jira Manik Surtani (Inactive)
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: