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

Update OutputAnalyzer to work with files

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • tbd
    • 9
    • hotspot

      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)));
        }


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

              Created:
              Updated:
              Resolved: