Merge
authoramurillo
Thu, 12 Mar 2015 19:51:35 -0700
changeset 29442 e4b178a258da
parent 29313 36f48966bc7a (current diff)
parent 29441 19feb1c4487f (diff)
child 29443 9ef8a9d8985d
child 29563 2b603c351758
child 29665 b4ef48f9374f
Merge
make/common/JavaCompilation.gmk
--- a/make/common/JavaCompilation.gmk	Thu Mar 12 12:30:36 2015 -0700
+++ b/make/common/JavaCompilation.gmk	Thu Mar 12 19:51:35 2015 -0700
@@ -369,7 +369,7 @@
 	$(MKDIR) -p $$(@D)
 	export LC_ALL=C ; ( $(CAT) $$< && $(ECHO) "" ) \
 	    | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
-	        -e 's/\([^\\]\)!/\1\\!/g' -e 's/#.*/#/g' \
+	        -e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ 	]*#.*/#/g' \
 	    | $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \
 	    | $(SED) -e '/^#/d' -e '/^$$$$/d' \
 	        -e :a -e '/\\$$$$/N; s/\\\n//; ta' \
--- a/test/lib/sun/hotspot/WhiteBox.java	Thu Mar 12 12:30:36 2015 -0700
+++ b/test/lib/sun/hotspot/WhiteBox.java	Thu Mar 12 19:51:35 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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 @@
 import java.lang.reflect.Executable;
 import java.util.Arrays;
 import java.util.List;
+import java.util.function.BiFunction;
 import java.util.function.Function;
 import java.util.stream.Stream;
 import java.security.BasicPermission;
@@ -250,6 +251,23 @@
     }
     return offset;
   }
+  public native Boolean getMethodBooleanOption(Executable method, String name);
+  public native Long    getMethodIntxOption(Executable method, String name);
+  public native Long    getMethodUintxOption(Executable method, String name);
+  public native Double  getMethodDoubleOption(Executable method, String name);
+  public native String  getMethodStringOption(Executable method, String name);
+  private final List<BiFunction<Executable,String,Object>> methodOptionGetters
+      = Arrays.asList(this::getMethodBooleanOption, this::getMethodIntxOption,
+          this::getMethodUintxOption, this::getMethodDoubleOption,
+          this::getMethodStringOption);
+
+  public Object getMethodOption(Executable method, String name) {
+    return methodOptionGetters.stream()
+                              .map(f -> f.apply(method, name))
+                              .filter(x -> x != null)
+                              .findAny()
+                              .orElse(null);
+  }
 
   // Safepoint Checking
   public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);