1 package org.junit.internal.management; 2 3 /** 4 * No-op implementation of ThreadMXBean when the platform doesn't provide it. 5 */ 6 final class FakeThreadMXBean implements ThreadMXBean { 7 8 /** 9 * {@inheritDoc} 10 * 11 * <p>Always throws an {@link UnsupportedOperationException} 12 */ getThreadCpuTime(long id)13 public long getThreadCpuTime(long id) { 14 throw new UnsupportedOperationException(); 15 } 16 17 /** 18 * {@inheritDoc} 19 * 20 * <p>Always returns false. 21 */ isThreadCpuTimeSupported()22 public boolean isThreadCpuTimeSupported() { 23 return false; 24 } 25 26 } 27 28