jdk/test/java/lang/management/ManagementFactory/ThreadMXBeanProxy.java
changeset 13803 889df16bef60
parent 5506 202f599c92aa
child 14342 8435a30053c1
equal deleted inserted replaced
13802:7e765d50416f 13803:889df16bef60
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug     5086470 6358247
    26  * @bug     5086470 6358247 7193302
    27  * @summary Test type conversion when invoking ThreadMXBean.dumpAllThreads
    27  * @summary Test type conversion when invoking ThreadMXBean.dumpAllThreads
    28  *          through proxy.
    28  *          through proxy.
    29  *
    29  *
    30  * @author  Mandy Chung
    30  * @author  Mandy Chung
    31  *
    31  *
   171             }
   171             }
   172             if (hcode != syncs[0].getIdentityHashCode()) {
   172             if (hcode != syncs[0].getIdentityHashCode()) {
   173                 throw new RuntimeException("LockInfo: " + syncs[0] +
   173                 throw new RuntimeException("LockInfo: " + syncs[0] +
   174                     " IdentityHashCode not matched. Expected: " + hcode);
   174                     " IdentityHashCode not matched. Expected: " + hcode);
   175             }
   175             }
       
   176             LockInfo li = info.getLockInfo();
       
   177             if (li == null) {
       
   178                 throw new RuntimeException("Expected non-null LockInfo");
       
   179             }
   176         }
   180         }
   177     }
   181     }
   178     static class Mutex implements Lock, java.io.Serializable {
   182     static class Mutex implements Lock, java.io.Serializable {
   179 
   183 
   180         // Our internal helper class
   184         // Our internal helper class