Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

querydb: make android query work for kotlin & java #2009

Merged
merged 4 commits into from
Nov 22, 2022

Conversation

ursachec
Copy link
Contributor

also adds some more primitive type inference using imports

@ursachec ursachec force-pushed the claudiu/querydb/multi-lang branch 5 times, most recently from 785521f to 4845b3b Compare November 22, 2022 12:21
GitHub actions runner fails with:
```
2022-11-22T13:05:30.2186911Z [WARN ] Error executing query
2022-11-22T13:05:30.2187866Z java.nio.file.DirectoryNotEmptyException: C:\Users\RUNNER~1\AppData\Local\Temp\x2cpgTestTmpDir26160846287506594\io\vrooom
2022-11-22T13:05:30.2188519Z 	at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271) ~[?:?]
2022-11-22T13:05:30.2189435Z 	at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105) ~[?:?]
2022-11-22T13:05:30.2189952Z 	at java.nio.file.Files.delete(Files.java:1142) ~[?:?]
2022-11-22T13:05:30.2190462Z 	at io.joern.x2cpg.testfixtures.TestCpg.$anonfun$deleteDir$1(TestCpg.scala:59) ~[test-classes/:?]
2022-11-22T13:05:30.2191014Z 	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
2022-11-22T13:05:30.2191467Z 	at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
2022-11-22T13:05:30.2191962Z 	at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395) ~[?:?]
2022-11-22T13:05:30.2192616Z 	at java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[?:?]
2022-11-22T13:05:30.2193120Z 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:?]
2022-11-22T13:05:30.2193644Z 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
2022-11-22T13:05:30.2194388Z 	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
2022-11-22T13:05:30.2194945Z 	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
2022-11-22T13:05:30.2195508Z 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
2022-11-22T13:05:30.2196069Z 	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
2022-11-22T13:05:30.2196782Z 	at io.joern.x2cpg.testfixtures.TestCpg.deleteDir(TestCpg.scala:59) ~[test-classes/:?]
2022-11-22T13:05:30.2197767Z 	at io.joern.x2cpg.testfixtures.TestCpg.graph(TestCpg.scala:69) ~[test-classes/:?]
2022-11-22T13:05:30.2198445Z 	at io.shiftleft.semanticcpg.language.NodeTypeStarters.<init>(NodeTypeStarters.scala:12) ~[classes/:?]
2022-11-22T13:05:30.2199221Z 	at io.shiftleft.semanticcpg.language.package$.toNodeTypeStarters(package.scala:190) ~[classes/:?]
2022-11-22T13:05:30.2199850Z 	at io.joern.scanners.android.ArbitraryFileWrites$.fileWriteCalls$1(ArbitraryFileWrites.scala:34) ~[classes/:?]
2022-11-22T13:05:30.2200884Z 	at io.joern.scanners.android.ArbitraryFileWrites$.$anonfun$broadcastToFileWrite$1(ArbitraryFileWrites.scala:35) ~[classes/:?]
2022-11-22T13:05:30.2201534Z 	at io.joern.console.scan.package$QueryWrapper.apply(package.scala:26) ~[classes/:?]
2022-11-22T13:05:30.2202137Z 	at io.joern.suites.KotlinQueryTestSuite.findMatchingCalls(KotlinQueryTestSuite.scala:44) ~[test-classes/:?]
2022-11-22T13:05:30.2203255Z 	at io.joern.scanners.android.ArbitraryFileWritesKotlinTests.$anonfun$new$7(ArbitraryFileWritesKotlinTests.scala:16) ~[test-classes/:?]
2022-11-22T13:05:30.2204467Z 	at scala.collection.immutable.List.foreach(List.scala:333) ~[scala-library-2.13.8.jar:?]
2022-11-22T13:05:30.2205107Z 	at
io.joern.scanners.android.ArbitraryFileWritesKotlinTests.$anonfun$new$2(ArbitraryFileWritesKotlinTests.s
```
@ursachec ursachec merged commit e445571 into master Nov 22, 2022
@max-leuthaeuser max-leuthaeuser deleted the claudiu/querydb/multi-lang branch November 22, 2022 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants