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 {
51
51
}
52
52
}
53
53
54
- private predicate isOsFromApacheCommons ( FieldAccess fa , string fieldName ) {
54
+ bindingset [ fieldNamePattern]
55
+ private predicate isOsFromApacheCommons ( FieldAccess fa , string fieldNamePattern ) {
55
56
exists ( Field f | f = fa .getField ( ) |
56
57
f .getDeclaringType ( ) instanceof ApacheSystemUtils and
57
- f .hasName ( fieldName )
58
+ f .getName ( ) . matches ( fieldNamePattern )
58
59
)
59
60
}
60
61
Original file line number Diff line number Diff line change 1
1
import java .nio .file .FileSystems ;
2
2
import java .nio .file .Path ;
3
3
4
+ import org .apache .commons .lang3 .SystemUtils ;
5
+
4
6
public class Test {
5
7
void test () {
6
8
if (System .getProperty ("os.name" ).contains ("Windows" )) {
@@ -30,5 +32,13 @@ void test() {
30
32
if (FileSystems .getDefault ().supportedFileAttributeViews ().contains ("posix" )) {
31
33
32
34
}
35
+
36
+ if (SystemUtils .IS_OS_WINDOWS ) {
37
+
38
+ }
39
+
40
+ if (SystemUtils .IS_OS_UNIX ) {
41
+
42
+ }
33
43
}
34
44
}
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