Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-2078

ToscaPolicyXxxIdentifier classes should have a useful toString

XMLWordPrintable

      Currently, the toString() methods of the ToscaPolicyXxxIdentifier classes generate strings of the form:

      ToscaPolicyXxxIdentifier[name=xxx, version=yyy]
      

      However, whenever an identifier is logged, the developer code almost always logs something like this:

      logger.info("some message {} {}", ident.name, ident.version);
      

      To facilitate logging, the toString() method should be modified to simply return:

      ident.name + " " + ident.version
      

      That will make it much easier to log identifiers.  For example:

      logger.info("some message {}", ident);
      

            rossc rossc
            jrh3 jrh3
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: