Java 类org.springframework.boot.lang.UsesUnsafeJava 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteDebugPortProvider.java   
@UsesUnsafeJava
@SuppressWarnings("restriction")
private static int getRemoteDebugPort() {
    String property = sun.misc.VMSupport.getAgentProperties()
            .getProperty(JDWP_ADDRESS_PROPERTY);
    try {
        if (property != null && property.contains(":")) {
            return Integer.valueOf(property.split(":")[1]);
        }
    }
    catch (Exception ex) {
        logger.trace(
                "Unable to get JDWP port from property value '" + property + "'");
    }
    return -1;
}
项目:spring-boot-concourse    文件:RemoteDebugPortProvider.java   
@UsesUnsafeJava
@SuppressWarnings("restriction")
private static int getRemoteDebugPort() {
    String property = sun.misc.VMSupport.getAgentProperties()
            .getProperty(JDWP_ADDRESS_PROPERTY);
    try {
        if (property != null && property.contains(":")) {
            return Integer.valueOf(property.split(":")[1]);
        }
    }
    catch (Exception ex) {
        logger.trace(
                "Unable to get JDWP port from property value '" + property + "'");
    }
    return -1;
}
项目:contestparser    文件:RemoteDebugPortProvider.java   
@UsesUnsafeJava
@SuppressWarnings("restriction")
private static int getRemoteDebugPort() {
    String property = sun.misc.VMSupport.getAgentProperties()
            .getProperty(JDWP_ADDRESS_PROPERTY);
    try {
        if (property != null && property.contains(":")) {
            return Integer.valueOf(property.split(":")[1]);
        }
    }
    catch (Exception ex) {
        logger.trace(
                "Unable to get JDWP port from property value '" + property + "'");
    }
    return -1;
}