52 |
|
import java.lang.reflect.Constructor; |
53 |
|
import java.lang.reflect.Method; |
54 |
|
import java.lang.reflect.Modifier; |
55 |
– |
import java.nio.file.Files; |
56 |
– |
import java.nio.file.Paths; |
55 |
|
import java.security.CodeSource; |
56 |
|
import java.security.Permission; |
57 |
|
import java.security.PermissionCollection; |
89 |
|
import java.util.concurrent.TimeoutException; |
90 |
|
import java.util.concurrent.atomic.AtomicBoolean; |
91 |
|
import java.util.concurrent.atomic.AtomicReference; |
94 |
– |
import java.util.regex.Matcher; |
92 |
|
import java.util.regex.Pattern; |
93 |
|
|
94 |
|
import junit.framework.AssertionFailedError; |
298 |
|
|
299 |
|
// public static String cpuModel() { |
300 |
|
// try { |
301 |
< |
// Matcher matcher = Pattern.compile("model name\\s*: (.*)") |
301 |
> |
// java.util.regex.Matcher matcher |
302 |
> |
// = Pattern.compile("model name\\s*: (.*)") |
303 |
|
// .matcher(new String( |
304 |
< |
// Files.readAllBytes(Paths.get("/proc/cpuinfo")), "UTF-8")); |
304 |
> |
// java.nio.file.Files.readAllBytes( |
305 |
> |
// java.nio.file.Paths.get("/proc/cpuinfo")), "UTF-8")); |
306 |
|
// matcher.find(); |
307 |
|
// return matcher.group(1); |
308 |
|
// } catch (Exception ex) { return null; } |