mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-30 04:55:21 +00:00
marked JDK6 dependencies explicitly
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13259 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
f37a30dc01
commit
7e4b1726e0
4 files changed
+19
-5
No files matched your search
@@ -41,6 +41,7 @@ import org.kohsuke.stapler.Ancestor;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
import org.jvnet.animal_sniffer.IgnoreJRERequirement;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.Cookie;
|
||||
@@ -631,6 +632,7 @@ public class Functions {
|
||||
return Thread.getAllStackTraces();
|
||||
}
|
||||
|
||||
@IgnoreJRERequirement
|
||||
public static ThreadInfo[] getThreadInfos() {
|
||||
ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
|
||||
return mbean.getThreadInfo(mbean.getAllThreadIds(),mbean.isObjectMonitorUsageSupported(),mbean.isSynchronizerUsageSupported());
|
||||
@@ -639,6 +641,7 @@ public class Functions {
|
||||
/**
|
||||
* Are we running on JRE6 or above?
|
||||
*/
|
||||
@IgnoreJRERequirement
|
||||
public static boolean isMustangOrAbove() {
|
||||
try {
|
||||
System.console();
|
||||
@@ -649,6 +652,7 @@ public class Functions {
|
||||
}
|
||||
|
||||
// ThreadInfo.toString() truncates the stack trace by first 8, so needed my own version
|
||||
@IgnoreJRERequirement
|
||||
public static String dumpThreadInfo(ThreadInfo ti) {
|
||||
StringBuilder sb = new StringBuilder("\"" + ti.getThreadName() + "\"" +
|
||||
" Id=" + ti.getThreadId() + " " +
|
||||
|
||||
Reference in new issue
Block a user