changeset 26420:866cb01261f1

8057147: [TESTBUG] Platform.isDebugBuild() doesn't work on all build types Summary: Check java.version for debug string as well Reviewed-by: gtriantafill, hseigel, sla, acorn, dcubed
author ctornqvi
date Wed, 03 Sep 2014 17:30:23 -0400
parents 25abc4a3285c
children 82ebabf9c141 5bd1fc767a88
files hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java	Tue Sep 02 09:51:24 2014 -0700
+++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java	Wed Sep 03 17:30:23 2014 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
     private static final String osName      = System.getProperty("os.name");
     private static final String dataModel   = System.getProperty("sun.arch.data.model");
     private static final String vmVersion   = System.getProperty("java.vm.version");
+    private static final String javaVersion = System.getProperty("java.version");
     private static final String osArch      = System.getProperty("os.arch");
     private static final String vmName      = System.getProperty("java.vm.name");
 
@@ -83,7 +84,8 @@
     }
 
     public static boolean isDebugBuild() {
-        return vmVersion.toLowerCase().contains("debug");
+        return (vmVersion.toLowerCase().contains("debug") ||
+                javaVersion.toLowerCase().contains("debug"));
     }
 
     public static String getVMVersion() {