8193818 : Remove unused single_step field from java.lang.Thread

Alan Bateman Alan.Bateman at oracle.com
Thu Feb 15 11:42:21 UTC 2018


On 19/12/2017 11:06, Alan Bateman wrote:
> I've been going through the fields in java.lang.Thread and I'm 
> wondering if this field can be removed:
>
>     /* Whether or not to single_step this thread. */
>     private boolean     single_step;
>
> This field was used in the original Classic VM (pre-OpenJDK history). 
> It doesn't appear to be used in the HotSpot VM.
>
> Does anyone know of any reason to keep it? Are there other VMs using 
> it by any chance?
No one screamed so I'd like to go ahead and remove this field. I've 
created JDK-8193818 to track it, the change (below) is trivial.

-Alan


--- a/src/java.base/share/classes/java/lang/Thread.java
+++ b/src/java.base/share/classes/java/lang/Thread.java
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 1994, 2018, 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
@@ -150,9 +150,6 @@
      private Thread         threadQ;
      private long           eetop;

-    /* Whether or not to single_step this thread. */
-    private boolean     single_step;
-
      /* Whether or not the thread is a daemon thread. */
      private boolean     daemon = false;


More information about the core-libs-dev mailing list