File tree Expand file tree Collapse file tree 6 files changed +1824
-9
lines changed
stubs/apache-commons-lang3-3.7/org/apache/commons/lang3 Expand file tree Collapse file tree 6 files changed +1824
-9
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,11 @@ private class IsUnixFromSystemProp extends IsUnixGuard instanceof MethodAccess {
5151 }
5252}
5353
54- private predicate isOsFromApacheCommons ( FieldAccess fa , string fieldName ) {
54+ bindingset [ fieldNamePattern]
55+ private predicate isOsFromApacheCommons ( FieldAccess fa , string fieldNamePattern ) {
5556 exists ( Field f | f = fa .getField ( ) |
5657 f .getDeclaringType ( ) instanceof ApacheSystemUtils and
57- f .hasName ( fieldName )
58+ f .getName ( ) . matches ( fieldNamePattern )
5859 )
5960}
6061
Original file line number Diff line number Diff line change 11import java .nio .file .FileSystems ;
22import java .nio .file .Path ;
33
4+ import org .apache .commons .lang3 .SystemUtils ;
5+
46public class Test {
57 void test () {
68 if (System .getProperty ("os.name" ).contains ("Windows" )) {
@@ -30,5 +32,13 @@ void test() {
3032 if (FileSystems .getDefault ().supportedFileAttributeViews ().contains ("posix" )) {
3133
3234 }
35+
36+ if (SystemUtils .IS_OS_WINDOWS ) {
37+
38+ }
39+
40+ if (SystemUtils .IS_OS_UNIX ) {
41+
42+ }
3343 }
3444}
Original file line number Diff line number Diff line change 1+ //semmle-extractor-options: --javac-args -cp ${testdir}/../../stubs/apache-commons-lang3-3.7/
Original file line number Diff line number Diff line change 1- | Test.java:14:13:14:59 | contains(...) |
2- | Test.java:18:13:18:62 | contains(...) |
3- | Test.java:22:13:22:71 | contains(...) |
4- | Test.java:26:13:26:95 | contains(...) |
5- | Test.java:30:13:30:84 | contains(...) |
1+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1439:5:1439:81 | IS_OS_UNIX |
2+ | Test.java:16:13:16:59 | contains(...) |
3+ | Test.java:20:13:20:62 | contains(...) |
4+ | Test.java:24:13:24:71 | contains(...) |
5+ | Test.java:28:13:28:95 | contains(...) |
6+ | Test.java:32:13:32:84 | contains(...) |
7+ | Test.java:40:13:40:34 | SystemUtils.IS_OS_UNIX |
Original file line number Diff line number Diff line change 1- | Test.java:6:13:6:61 | contains(...) |
2- | Test.java:10:13:10:75 | contains(...) |
1+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1451:5:1451:84 | IS_OS_WINDOWS |
2+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1463:5:1463:89 | IS_OS_WINDOWS_2000 |
3+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1475:5:1475:89 | IS_OS_WINDOWS_2003 |
4+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1487:5:1487:89 | IS_OS_WINDOWS_2008 |
5+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1499:5:1499:89 | IS_OS_WINDOWS_2012 |
6+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1511:5:1511:87 | IS_OS_WINDOWS_95 |
7+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1523:5:1523:87 | IS_OS_WINDOWS_98 |
8+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1535:5:1535:87 | IS_OS_WINDOWS_ME |
9+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1547:5:1547:87 | IS_OS_WINDOWS_NT |
10+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1559:5:1559:87 | IS_OS_WINDOWS_XP |
11+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1572:5:1572:90 | IS_OS_WINDOWS_VISTA |
12+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1584:5:1584:86 | IS_OS_WINDOWS_7 |
13+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1596:5:1596:86 | IS_OS_WINDOWS_8 |
14+ | ../../stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/SystemUtils.java:1608:5:1608:87 | IS_OS_WINDOWS_10 |
15+ | Test.java:8:13:8:61 | contains(...) |
16+ | Test.java:12:13:12:75 | contains(...) |
17+ | Test.java:36:13:36:37 | SystemUtils.IS_OS_WINDOWS |
You can’t perform that action at this time.
0 commit comments