Files
codeql/java/ql/test/library-tests/environment/SystemPropertyAccess.java
2022-03-03 20:08:38 -05:00

26 lines
936 B
Java

import java.io.File;
import java.util.Properties;
import org.apache.commons.lang3.SystemUtils;
public class SystemPropertyAccess {
private static final Properties SYSTEM_PROPERTIES = System.getProperties();
void test() {
System.getProperty("os.name");
System.getProperty("os.name", "default");
System.getProperties().getProperty("os.name");
System.getProperties().get("java.io.tmpdir");
SYSTEM_PROPERTIES.getProperty("java.home");
SYSTEM_PROPERTIES.get("file.encoding");
System.lineSeparator();
String awtToolkit = SystemUtils.AWT_TOOLKIT;
String fileEncoding = SystemUtils.FILE_ENCODING;
String tmpDir = SystemUtils.JAVA_IO_TMPDIR;
String separator = File.separator;
char separatorChar = File.separatorChar;
String pathSeparator = File.pathSeparator;
char pathSeparatorChar = File.pathSeparatorChar;
}
}