hk2
  1. hk2
  2. HK2-83

Writeable view creates (English) exception message with "null" in it

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.*
    • Fix Version/s: 2.4.0
    • Component/s: None
    • Labels:
      None

      Description

      The WriteableView class, at line 591 has the following:

      throw new IllegalArgumentException("A " + master.getProxyType().getSimpleName() +
      " with the same key \"" + keyValue + "\" already exists in " +
      parent.getProxyType().getSimpleName() + " " + parent.getKey()) ;

      Not only is this English text hardcoded in the file, the last part of the message "parent.getKey()" is sometimes null. For example, in GlassFish, when using the GenericCreateCommand capability, I'm seeing the following message:

      remote failure: Exception while adding the new configuration : A ServiceType with the same key "mys" already exists in ServiceTypes null
      A ServiceType with the same key "mys" already exists in ServiceTypes null
      Command create-service-type failed.

      Note the "null" at the end of the message. This is from the parent.getKey().

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Mahesh Kannan
            Reporter:
            Tom Mueller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: