> On 12 Sep 2016, at 09:29, Lance Andersen <lance.ander...@oracle.com> wrote:
> 
> Happy Monday,
> 
> This RFR is to add a test to validate that the DriverManager.println output 
> is accessible  when DriverManager is first loaded.
> 
> The webrev can be found at: 
> http://cr.openjdk.java.net/~lancea/8159126/webrev.00/ 
> <http://cr.openjdk.java.net/~lancea/8159126/webrev.00/>
> 
> 
> Ran JPRT to sanity check across platforms
> 

Suggestion:

  70         try (BufferedReader reader = new BufferedReader(new 
CharArrayReader(cw.toCharArray()))) {
  71             boolean result
  72                     = reader.lines().anyMatch(
  73                             line -> line.matches(".*JDBC DriverManager 
initialized.*"));
  74             assertFalse(result);


Change anyMatch, to noneMatch, and assertTrue (note if the stream is empty none 
is “vacuously” satisfied and will return true).

Paul.

> 
> 
> Best
> Lance
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif> 
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| 
> Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> lance.ander...@oracle.com <mailto:lance.ander...@oracle.com>
> 
> 
> 

Reply via email to