Agent.Pool.instance() is not thread safe

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • jtreg4.1
    • Affects Version/s: None
    • Component/s: tools
    • None
    • b10

      I just happened to notice that this code can end up giving us two or more pools of agents. While not fatal, it is at least unexpected.

              private static Pool instance;

              static Pool instance() {
                  if (instance == null)
                      instance = new Pool();
                  return instance;
              }

            Assignee:
            Jonathan Gibbons
            Reporter:
            Staffan Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: