changeset 2565:7d5d7ae50c72

8178347: Process and ProcessHandle getPid method name inconsistency Reviewed-by: alanb, bpb
author rriggs
date Tue, 11 Apr 2017 14:20:00 -0400
parents aff4f339acd4
children 35fbd9906dfc
files test/lib/jdk/test/lib/apps/LingeredApp.java test/lib/jdk/test/lib/process/ProcessTools.java
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/lib/jdk/test/lib/apps/LingeredApp.java	Fri Apr 07 09:26:07 2017 +0100
+++ b/test/lib/jdk/test/lib/apps/LingeredApp.java	Tue Apr 11 14:20:00 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
@@ -143,7 +143,7 @@
         if (appProcess == null) {
             throw new RuntimeException("Process is not alive");
         }
-        return appProcess.getPid();
+        return appProcess.pid();
     }
 
     /**
--- a/test/lib/jdk/test/lib/process/ProcessTools.java	Fri Apr 07 09:26:07 2017 +0100
+++ b/test/lib/jdk/test/lib/process/ProcessTools.java	Tue Apr 11 14:20:00 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -302,7 +302,7 @@
      * @return Process id
      */
     public static long getProcessId() throws Exception {
-        return ProcessHandle.current().getPid();
+        return ProcessHandle.current().pid();
     }
     /**
      * Gets the array of strings containing input arguments passed to the VM
@@ -580,8 +580,8 @@
         }
 
         @Override
-        public long getPid() {
-            return p.getPid();
+        public long pid() {
+            return p.pid();
         }
 
         @Override