|
|
@@ -1,5 +1,5 @@ |
|
|
/* |
|
|
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. |
|
|
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. |
|
|
* Copyright (c) 2018, SAP. All rights reserved. |
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
|
* |
|
@@ -49,8 +49,6 @@ public static void main(String[] args) throws Exception { |
|
|
|
|
|
|
|
|
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
|
|
"-Xmx64M", |
|
|
"-XX:-CreateCoredumpOnCrash", |
|
|
"-version"); |
|
|
Map<String, String> env = pb.environment(); |
|
|
env.put("HOTSPOT_FATAL_ERROR_DURING_DYNAMIC_INITIALIZATION", "1"); |
|
@@ -87,23 +85,26 @@ public static void main(String[] args) throws Exception { |
|
|
}; |
|
|
int currentPattern = 0; |
|
|
|
|
|
String lastLine = null; |
|
|
boolean endMarkerFound = false; |
|
|
while ((line = br.readLine()) != null) { |
|
|
if (currentPattern < pattern.length) { |
|
|
if (pattern[currentPattern].matcher(line).matches()) { |
|
|
System.out.println("Found: " + line + "."); |
|
|
currentPattern++; |
|
|
} |
|
|
} |
|
|
lastLine = line; |
|
|
if (line.equals("END.")) { |
|
|
endMarkerFound = true; |
|
|
break; |
|
|
} |
|
|
} |
|
|
br.close(); |
|
|
|
|
|
if (currentPattern < pattern.length) { |
|
|
throw new RuntimeException("hs-err file incomplete (first missing pattern: " + currentPattern + ")"); |
|
|
} |
|
|
|
|
|
if (!lastLine.equals("END.")) { |
|
|
if (!endMarkerFound) { |
|
|
throw new RuntimeException("hs-err file incomplete (missing END marker.)"); |
|
|
} else { |
|
|
System.out.println("End marker found."); |
|
@@ -114,5 +115,3 @@ public static void main(String[] args) throws Exception { |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|