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

Update OutputAnalyzer to work with files

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:

      Description

      Currently the utility class OutputAnalyzer can work with streams and process outputs.
      I suggest adding a simple ctor that will help working with file:

        /**
         * Create an OutputAnalyzer, a utility class for verifying output and exit
         * value from a Process
         *
         * @param file a text file to analyze
         * @throws IOException If an I/O error occurs.
         */
        public OutputAnalyzer(File txt) throws IOException {
            this(new String(Files.readAllBytes(Paths.get(txt)));
        }


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dfazunen Dmitry Fazunenko (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: