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

Change outputStream's print_raw() and print_raw_cr() second parameter to size_t type

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 18
    • None
    • hotspot
    • None
    • b07

    Description

      In share/utilities/ostream.hpp:

        void print_raw(const char* str) { write(str, strlen(str)); }
        void print_raw(const char* str, int len) { write(str, len);
        void print_raw_cr(const char* str) { write(str, strlen(str)); cr(); }
        void print_raw_cr(const char* str, int len){ write(str, len); cr(); }

      Since the write function already accepts size_t type as the second arg, the second parameter of print_raw() and print_raw_cr() could be changed to size_t type so that the callers don't need to typecast the second arg to int like the following:

      st->print_raw(raw, (int) flen);

      Attachments

        Issue Links

          Activity

            People

              ccheung Calvin Cheung
              ccheung Calvin Cheung
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: