< prev index next >

test/java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java

Print this page
rev 16783 : 8176176: fix @modules in jdk_svc tests
Reviewed-by: duke


  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug     4967283 5080203 8022208
  27  * @summary Basic unit test of thread states returned by
  28  *          ThreadMXBean.getThreadInfo.getThreadState().
  29  *          It also tests lock information returned by ThreadInfo.
  30  *
  31  * @author  Mandy Chung
  32  *
  33  * @library ../../Thread
  34  * @library /lib/testlibrary
  35  * @modules java.management
  36  * @build jdk.testlibrary.*
  37  * @build ThreadMXBeanStateTest ThreadStateController
  38  * @run main ThreadMXBeanStateTest
  39  */
  40 
  41 import java.lang.management.ManagementFactory;
  42 import java.lang.management.ThreadMXBean;
  43 import java.lang.management.ThreadInfo;
  44 import static java.lang.Thread.State.*;
  45 
  46 public class ThreadMXBeanStateTest {
  47     private static final ThreadMXBean tm = ManagementFactory.getThreadMXBean();
  48 
  49     static class Lock {
  50         private final String name;
  51         Lock(String name) {
  52             this.name = name;
  53         }
  54         @Override
  55         public String toString() {




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug     4967283 5080203 8022208
  27  * @summary Basic unit test of thread states returned by
  28  *          ThreadMXBean.getThreadInfo.getThreadState().
  29  *          It also tests lock information returned by ThreadInfo.

  30  * @author  Mandy Chung
  31  *
  32  * @library ../../Thread
  33  * @library /lib/testlibrary
  34  *
  35  * @build jdk.testlibrary.*
  36  * @build ThreadMXBeanStateTest ThreadStateController
  37  * @run main ThreadMXBeanStateTest
  38  */
  39 
  40 import java.lang.management.ManagementFactory;
  41 import java.lang.management.ThreadMXBean;
  42 import java.lang.management.ThreadInfo;
  43 import static java.lang.Thread.State.*;
  44 
  45 public class ThreadMXBeanStateTest {
  46     private static final ThreadMXBean tm = ManagementFactory.getThreadMXBean();
  47 
  48     static class Lock {
  49         private final String name;
  50         Lock(String name) {
  51             this.name = name;
  52         }
  53         @Override
  54         public String toString() {


< prev index next >