changeset 12734:00bf892e5553

8178347: Process and ProcessHandle getPid method name inconsistency Reviewed-by: hseigel
author rriggs
date Wed, 12 Apr 2017 11:43:49 -0400
parents 773e40f3fc21
children 4d6df9a75465
files test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java test/serviceability/attach/AttachSetGetFlag.java test/serviceability/tmtools/jstack/DaemonThreadTest.java test/serviceability/tmtools/jstack/SpreadLockTest.java test/serviceability/tmtools/jstack/ThreadNamesTest.java test/serviceability/tmtools/jstack/TraveledLockTest.java test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java test/serviceability/tmtools/jstat/GcCapacityTest.java test/serviceability/tmtools/jstat/GcCauseTest01.java test/serviceability/tmtools/jstat/GcCauseTest02.java test/serviceability/tmtools/jstat/GcCauseTest03.java test/serviceability/tmtools/jstat/GcNewTest.java test/serviceability/tmtools/jstat/GcTest01.java test/serviceability/tmtools/jstat/GcTest02.java
diffstat 14 files changed, 26 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -67,7 +67,7 @@
 
         // Start the process, get the pid and then wait for the test to finish
         Process process = builder.start();
-        long pid = process.getPid();
+        long pid = process.pid();
         int retval = process.waitFor();
 
         // make sure the SEGVOverflow test crashed
--- a/test/serviceability/attach/AttachSetGetFlag.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/attach/AttachSetGetFlag.java	Wed Apr 12 11:43:49 2017 -0400
@@ -80,7 +80,7 @@
     try {
       waitForReady(target);
 
-      int pid = (int)target.getPid();
+      int pid = (int)target.pid();
 
       HotSpotVirtualMachine vm = (HotSpotVirtualMachine)VirtualMachine.attach(((Integer)pid).toString());
 
@@ -116,7 +116,7 @@
     try {
       waitForReady(target);
 
-      int pid = (int)target.getPid();
+      int pid = (int)target.pid();
 
       HotSpotVirtualMachine vm = (HotSpotVirtualMachine)VirtualMachine.attach(((Integer)pid).toString());
 
--- a/test/serviceability/tmtools/jstack/DaemonThreadTest.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstack/DaemonThreadTest.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -78,7 +78,7 @@
         thread.start();
 
         // Run jstack tool and collect the output
-        JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
+        JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
         ToolResults results = jstackTool.measure();
 
         // Analyze the jstack output for the correct thread type
--- a/test/serviceability/tmtools/jstack/SpreadLockTest.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstack/SpreadLockTest.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -96,7 +96,7 @@
         debuggee.start();
 
         // Collect output from the jstack tool
-        JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
+        JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
         ToolResults results1 = jstackTool.measure();
 
         // Go to method b()
--- a/test/serviceability/tmtools/jstack/ThreadNamesTest.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstack/ThreadNamesTest.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -61,7 +61,7 @@
         thread.start();
 
         // Run jstack tool and collect the output
-        JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
+        JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
         ToolResults results = jstackTool.measure();
 
         // Analyze the jstack output for the strange thread name
--- a/test/serviceability/tmtools/jstack/TraveledLockTest.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstack/TraveledLockTest.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -95,7 +95,7 @@
         debuggee.start();
 
         // Collect output from the jstack tool
-        JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
+        JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
         ToolResults results1 = jstackTool.measure();
 
         // Go to method b()
--- a/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -105,7 +105,7 @@
         waitThread.start();
 
         // Collect output from the jstack tool
-        JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
+        JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
         ToolResults results = jstackTool.measure();
 
         // Analyze the jstack output for the patterns needed
--- a/test/serviceability/tmtools/jstat/GcCapacityTest.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstat/GcCapacityTest.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -38,7 +38,7 @@
     public static void main(String[] args) throws Exception {
 
         // We will be running "jstat -gc" tool
-        JstatGcCapacityTool jstatGcTool = new JstatGcCapacityTool(ProcessHandle.current().getPid());
+        JstatGcCapacityTool jstatGcTool = new JstatGcCapacityTool(ProcessHandle.current().pid());
 
         // Run once and get the  results asserting that they are reasonable
         JstatGcCapacityResults measurement1 = jstatGcTool.measure();
--- a/test/serviceability/tmtools/jstat/GcCauseTest01.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstat/GcCauseTest01.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -41,7 +41,7 @@
     public static void main(String[] args) throws Exception {
 
         // We will be running "jstat -gc" tool
-        JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid());
+        JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().pid());
 
         // Run once and get the  results asserting that they are reasonable
         JstatGcCauseResults measurement1 = jstatGcTool.measure();
--- a/test/serviceability/tmtools/jstat/GcCauseTest02.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstat/GcCauseTest02.java	Wed Apr 12 11:43:49 2017 -0400
@@ -38,6 +38,6 @@
 public class GcCauseTest02 {
 
     public static void main(String[] args) throws Exception {
-        new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().getPid())).run();
+        new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().pid())).run();
     }
 }
--- a/test/serviceability/tmtools/jstat/GcCauseTest03.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstat/GcCauseTest03.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -41,7 +41,7 @@
     public static void main(String[] args) throws Exception {
 
         // We will be running "jstat -gc" tool
-        JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid());
+        JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().pid());
 
         System.gc();
 
--- a/test/serviceability/tmtools/jstat/GcNewTest.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstat/GcNewTest.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -40,7 +40,7 @@
     public static void main(String[] args) throws Exception {
 
         // We will be running "jstat -gc" tool
-        JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().getPid());
+        JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().pid());
 
         // Run once and get the  results asserting that they are reasonable
         JstatGcNewResults measurement1 = jstatGcTool.measure();
--- a/test/serviceability/tmtools/jstat/GcTest01.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstat/GcTest01.java	Wed Apr 12 11:43:49 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -44,7 +44,7 @@
     public static void main(String[] args) throws Exception {
 
         // We will be running "jstat -gc" tool
-        JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().getPid());
+        JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().pid());
 
         // Run once and get the  results asserting that they are reasonable
         JstatGcResults measurement1 = jstatGcTool.measure();
--- a/test/serviceability/tmtools/jstat/GcTest02.java	Thu Apr 06 00:03:18 2017 -0700
+++ b/test/serviceability/tmtools/jstat/GcTest02.java	Wed Apr 12 11:43:49 2017 -0400
@@ -38,6 +38,6 @@
 public class GcTest02 {
 
     public static void main(String[] args) throws Exception {
-        new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().getPid())).run();
+        new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().pid())).run();
     }
 }