Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6888954

argument formatting for assert() and friends

XMLWordPrintable

    • b05
    • generic
    • generic

        The HotSpot assert(), guarantee(), etc., macros require a message argument which is printed if the condition does not hold, e.g.:

           assert(referent->is_oop(), "bad referent");

        As currently implemented the message must be a string literal. It would be much more useful if multiple arguments could be used with format strings to provide more information, e.g.:

           assert(referent->is_oop(), "bad referent %p", referent);

              jcoomes John Coomes (Inactive)
              jcoomes John Coomes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: