All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.skywalking.apm.dependencies.net.bytebuddy.utility.privilege.GetSystemPropertyAction Maven / Gradle / Ivy

There is a newer version: 9.2.0
Show newest version
package org.apache.skywalking.apm.dependencies.net.bytebuddy.utility.privilege;

import org.apache.skywalking.apm.dependencies.net.bytebuddy.build.HashCodeAndEqualsPlugin;

import java.security.PrivilegedAction;

/**
 * An action for reading a system property as a privileged action.
 */
@HashCodeAndEqualsPlugin.Enhance
public class GetSystemPropertyAction implements PrivilegedAction {

    /**
     * The property key.
     */
    private final String key;

    /**
     * Creates a new action for reading a system property.
     *
     * @param key The property key.
     */
    public GetSystemPropertyAction(String key) {
        this.key = key;
    }

    /**
     * {@inheritDoc}
     */
    public String run() {
        return System.getProperty(key);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy