mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Merge branch 'main' into henrymercer/polish-diagnostics
This commit is contained in:
@@ -38,12 +38,13 @@ jakarta.ws.rs.client,1,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
jakarta.ws.rs.container,,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9,,
|
||||
jakarta.ws.rs.core,2,,149,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,,,,,,,,,94,55
|
||||
java.beans,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
|
||||
java.io,37,,42,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,41,1
|
||||
java.lang,14,,76,,,,,,,,,,,,8,,,,,1,,4,,,1,,,,,,,,,,,,,,,,53,23
|
||||
java.io,42,,42,,17,,,,,,,,,,,,,,,3,,,,,,,,,,,,,22,,,,,,,,41,1
|
||||
java.lang,16,,76,,,,,,,,,,,,8,,,,,3,,4,,,1,,,,,,,,,,,,,,,,53,23
|
||||
java.net,10,3,9,,,,,,,,,,,,,,,10,,,,,,,,,,,,,,,,,,,,,,3,9,
|
||||
java.nio,16,,16,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,16,
|
||||
java.sql,11,,2,,,,,,,,4,,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,1
|
||||
java.sql,13,,2,,,,,,,,4,,,,,,,,,,,,,,,,,,9,,,,,,,,,,,,1,1
|
||||
java.util,44,,465,,,,,,,,,,,,34,,,,,,,,5,2,,1,2,,,,,,,,,,,,,,38,427
|
||||
javafx.scene.web,1,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
javax.faces.context,2,7,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,,,,7,,
|
||||
javax.jms,,9,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9,57,
|
||||
javax.json,,,123,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,100,23
|
||||
@@ -66,6 +67,7 @@ okhttp3,2,,47,,,,,,,,,,,,,,,2,,,,,,,,,,,,,,,,,,,,,,,22,25
|
||||
org.apache.commons.codec,,,6,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6,
|
||||
org.apache.commons.collections,,,800,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,17,783
|
||||
org.apache.commons.collections4,,,800,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,17,783
|
||||
org.apache.commons.compress.archivers.tar,,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,
|
||||
org.apache.commons.io,106,,560,,91,,,,,,,,,,,,,15,,,,,,,,,,,,,,,,,,,,,,,546,14
|
||||
org.apache.commons.jexl2,15,,,,,,,,,,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
org.apache.commons.jexl3,15,,,,,,,,,,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
@@ -80,7 +82,7 @@ org.apache.hc.core5.http,1,2,39,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,2,39,
|
||||
org.apache.hc.core5.net,,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,
|
||||
org.apache.hc.core5.util,,,24,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,18,6
|
||||
org.apache.hive.hcatalog.templeton,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,
|
||||
org.apache.http,27,3,70,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,,,2,,,,3,62,8
|
||||
org.apache.http,27,3,77,,,,,,,,,,,,,,,25,,,,,,,,,,,,,,,,,,2,,,,3,69,8
|
||||
org.apache.ibatis.jdbc,6,,57,,,,,,,,,,,,,,,,,,,,,,,,,,6,,,,,,,,,,,,57,
|
||||
org.apache.log4j,11,,,,,,,,,,,,,,11,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
org.apache.logging.log4j,359,,8,,,,,,,,,,,,359,,,,,,,,,,,,,,,,,,,,,,,,,,4,4
|
||||
@@ -88,6 +90,7 @@ org.apache.shiro.codec,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
|
||||
org.apache.shiro.jndi,1,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
org.apache.velocity.app,4,,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,,,,,,,,,,,,
|
||||
org.apache.velocity.runtime,4,,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,,,,,,,,,,,,
|
||||
org.codehaus.cargo.container.installer,3,,,,2,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
org.codehaus.groovy.control,1,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
org.dom4j,20,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,20,,,,,,,,
|
||||
org.hibernate,7,,,,,,,,,,,,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,,
|
||||
|
||||
|
@@ -13,15 +13,15 @@ Java framework & library support
|
||||
`Apache Commons IO <https://commons.apache.org/proper/commons-io/>`_,``org.apache.commons.io``,,560,106,91,,,,,,15
|
||||
`Apache Commons Lang <https://commons.apache.org/proper/commons-lang/>`_,``org.apache.commons.lang3``,,424,6,,,,,,,
|
||||
`Apache Commons Text <https://commons.apache.org/proper/commons-text/>`_,``org.apache.commons.text``,,272,,,,,,,,
|
||||
`Apache HttpComponents <https://hc.apache.org/>`_,"``org.apache.hc.core5.*``, ``org.apache.http``",5,136,28,,,3,,,,25
|
||||
`Apache HttpComponents <https://hc.apache.org/>`_,"``org.apache.hc.core5.*``, ``org.apache.http``",5,143,28,,,3,,,,25
|
||||
`Apache Log4j 2 <https://logging.apache.org/log4j/2.0/>`_,``org.apache.logging.log4j``,,8,359,,,,,,,
|
||||
`Google Guava <https://guava.dev/>`_,``com.google.common.*``,,728,39,,6,,,,,
|
||||
JBoss Logging,``org.jboss.logging``,,,324,,,,,,,
|
||||
`JSON-java <https://github.com/stleary/JSON-java>`_,``org.json``,,236,,,,,,,,
|
||||
Java Standard Library,``java.*``,3,611,132,28,,,7,,,10
|
||||
Java Standard Library,``java.*``,3,611,141,30,,,9,,,10
|
||||
Java extensions,"``javax.*``, ``jakarta.*``",63,609,32,,,4,,1,1,2
|
||||
Kotlin Standard Library,``kotlin*``,,1835,12,10,,,,,,2
|
||||
`Spring <https://spring.io/>`_,``org.springframework.*``,29,477,101,,,,19,14,,29
|
||||
Others,"``cn.hutool.core.codec``, ``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.core``, ``com.fasterxml.jackson.databind``, ``com.hubspot.jinjava``, ``com.mitchellbosecke.pebble``, ``com.opensymphony.xwork2.ognl``, ``com.rabbitmq.client``, ``com.unboundid.ldap.sdk``, ``com.zaxxer.hikari``, ``flexjson``, ``freemarker.cache``, ``freemarker.template``, ``groovy.lang``, ``groovy.util``, ``jodd.json``, ``net.sf.saxon.s9api``, ``ognl``, ``okhttp3``, ``org.apache.commons.codec``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.commons.logging``, ``org.apache.commons.ognl``, ``org.apache.directory.ldap.client.api``, ``org.apache.hadoop.hive.metastore``, ``org.apache.hive.hcatalog.templeton``, ``org.apache.ibatis.jdbc``, ``org.apache.log4j``, ``org.apache.shiro.codec``, ``org.apache.shiro.jndi``, ``org.apache.velocity.app``, ``org.apache.velocity.runtime``, ``org.codehaus.groovy.control``, ``org.dom4j``, ``org.hibernate``, ``org.jdbi.v3.core``, ``org.jooq``, ``org.mvel2``, ``org.scijava.log``, ``org.slf4j``, ``org.thymeleaf``, ``org.xml.sax``, ``org.xmlpull.v1``, ``play.mvc``, ``ratpack.core.form``, ``ratpack.core.handling``, ``ratpack.core.http``, ``ratpack.exec``, ``ratpack.form``, ``ratpack.func``, ``ratpack.handling``, ``ratpack.http``, ``ratpack.util``, ``retrofit2``",60,300,273,,,,18,18,,3
|
||||
Totals,,217,8458,1569,129,6,10,111,33,1,86
|
||||
Others,"``cn.hutool.core.codec``, ``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.core``, ``com.fasterxml.jackson.databind``, ``com.hubspot.jinjava``, ``com.mitchellbosecke.pebble``, ``com.opensymphony.xwork2.ognl``, ``com.rabbitmq.client``, ``com.unboundid.ldap.sdk``, ``com.zaxxer.hikari``, ``flexjson``, ``freemarker.cache``, ``freemarker.template``, ``groovy.lang``, ``groovy.util``, ``javafx.scene.web``, ``jodd.json``, ``net.sf.saxon.s9api``, ``ognl``, ``okhttp3``, ``org.apache.commons.codec``, ``org.apache.commons.compress.archivers.tar``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.commons.logging``, ``org.apache.commons.ognl``, ``org.apache.directory.ldap.client.api``, ``org.apache.hadoop.hive.metastore``, ``org.apache.hive.hcatalog.templeton``, ``org.apache.ibatis.jdbc``, ``org.apache.log4j``, ``org.apache.shiro.codec``, ``org.apache.shiro.jndi``, ``org.apache.velocity.app``, ``org.apache.velocity.runtime``, ``org.codehaus.cargo.container.installer``, ``org.codehaus.groovy.control``, ``org.dom4j``, ``org.hibernate``, ``org.jdbi.v3.core``, ``org.jooq``, ``org.mvel2``, ``org.scijava.log``, ``org.slf4j``, ``org.thymeleaf``, ``org.xml.sax``, ``org.xmlpull.v1``, ``play.mvc``, ``ratpack.core.form``, ``ratpack.core.handling``, ``ratpack.core.http``, ``ratpack.exec``, ``ratpack.form``, ``ratpack.func``, ``ratpack.handling``, ``ratpack.http``, ``ratpack.util``, ``retrofit2``",60,302,277,2,,,18,18,,5
|
||||
Totals,,217,8467,1582,133,6,10,113,33,1,88
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
from create_database_utils import *
|
||||
|
||||
def say(s):
|
||||
print(s)
|
||||
sys.stdout.flush()
|
||||
|
||||
say('Doing normal compilation')
|
||||
# This is a normal intercepted compilation
|
||||
runSuccessfully([get_cmd('kotlinc'), 'normal.kt'])
|
||||
|
||||
say('Identifying extractor jar')
|
||||
# Find the extractor jar that is being used
|
||||
trapDir = os.environ['CODEQL_EXTRACTOR_JAVA_TRAP_DIR']
|
||||
invocationTrapDir = os.path.join(trapDir, 'invocations')
|
||||
invocationTraps = os.listdir(invocationTrapDir)
|
||||
if len(invocationTraps) != 1:
|
||||
raise Exception('Expected to find 1 invocation TRAP, but found ' + str(invocationTraps))
|
||||
invocationTrap = os.path.join(invocationTrapDir, invocationTraps[0])
|
||||
with open(invocationTrap, 'r') as f:
|
||||
content = f.read()
|
||||
m = re.search('^// Using extractor: (.*)$', content, flags = re.MULTILINE)
|
||||
extractorJar = m.group(1)
|
||||
|
||||
def getManualFlags(invocationTrapName):
|
||||
return ['-Xplugin=' + extractorJar, '-P', 'plugin:kotlin-extractor:invocationTrapFile=' + os.path.join(trapDir, 'invocations', invocationTrapName + '.trap')]
|
||||
|
||||
# This is both normally intercepted, and it has the extractor flags manually added
|
||||
say('Doing double-interception compilation')
|
||||
runSuccessfully([get_cmd('kotlinc'), 'doubleIntercepted.kt'] + getManualFlags('doubleIntercepted'))
|
||||
os.environ['CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN'] = 'true'
|
||||
# We don't see this compilation at all
|
||||
say('Doing unseen compilation')
|
||||
runSuccessfully([get_cmd('kotlinc'), 'notSeen.kt'])
|
||||
# This is extracted as it has the extractor flags manually added
|
||||
say('Doing manual compilation')
|
||||
runSuccessfully([get_cmd('kotlinc'), 'manual.kt'] + getManualFlags('manual'))
|
||||
@@ -0,0 +1,3 @@
|
||||
| code/doubleIntercepted.kt:0:0:0:0 | doubleIntercepted |
|
||||
| code/manual.kt:0:0:0:0 | manual |
|
||||
| code/normal.kt:0:0:0:0 | normal |
|
||||
@@ -0,0 +1,4 @@
|
||||
import java
|
||||
|
||||
from File f
|
||||
select f
|
||||
@@ -0,0 +1,7 @@
|
||||
import sys
|
||||
|
||||
from create_database_utils import *
|
||||
|
||||
run_codeql_database_create(
|
||||
['"%s" build.py' % sys.executable],
|
||||
source="code", lang="java")
|
||||
7
java/ql/lib/change-notes/2023-03-03-delete-deps.md
Normal file
7
java/ql/lib/change-notes/2023-03-03-delete-deps.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Deleted the deprecated `getPath` and `getFolder` predicates from the `XmlFile` class.
|
||||
* Deleted the deprecated `getRepresentedString` predicate from the `StringLiteral` class.
|
||||
* Deleted the deprecated `ServletWriterSource` class.
|
||||
* Deleted the deprecated `getGroupID`, `getArtefactID`, and `artefactMatches` predicates from the `MavenRepoJar` class.
|
||||
11
java/ql/lib/change-notes/2023-03-09-more-models.md
Normal file
11
java/ql/lib/change-notes/2023-03-09-more-models.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
category: majorAnalysis
|
||||
---
|
||||
* Added more sink and summary dataflow models for the following packages:
|
||||
* `java.io`
|
||||
* `java.lang`
|
||||
* `java.sql`
|
||||
* `javafx.scene.web`
|
||||
* `org.apache.commons.compress.archivers.tar`
|
||||
* `org.apache.http.client.utils`
|
||||
* `org.codehaus.cargo.container.installer`
|
||||
4
java/ql/lib/change-notes/2023-03-14-neutral-dispatch.md
Normal file
4
java/ql/lib/change-notes/2023-03-14-neutral-dispatch.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: majorAnalysis
|
||||
---
|
||||
* Removed low-confidence call edges to known neutral call targets from the call graph used in data flow analysis. This includes, for example, custom `List.contains` implementations when the best inferrable type at the call site is simply `List`.
|
||||
@@ -3,8 +3,13 @@ extensions:
|
||||
pack: codeql/java-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["java.io", "File", True, "createTempFile", "(String,String,File)", "", "Argument[2]", "create-file", "ai-generated"]
|
||||
- ["java.io", "File", True, "renameTo", "(File)", "", "Argument[0]", "create-file", "ai-generated"]
|
||||
- ["java.io", "FileInputStream", True, "FileInputStream", "(File)", "", "Argument[0]", "read-file", "ai-generated"]
|
||||
- ["java.io", "FileOutputStream", False, "FileOutputStream", "", "", "Argument[0]", "create-file", "manual"]
|
||||
- ["java.io", "FileOutputStream", False, "write", "", "", "Argument[0]", "write-file", "manual"]
|
||||
- ["java.io", "FileReader", True, "FileReader", "(File)", "", "Argument[0]", "read-file", "ai-generated"]
|
||||
- ["java.io", "FileReader", True, "FileReader", "(String)", "", "Argument[0]", "read-file", "ai-generated"]
|
||||
- ["java.io", "FileWriter", False, "FileWriter", "", "", "Argument[0]", "create-file", "manual"]
|
||||
- ["java.io", "PrintStream", False, "PrintStream", "(File)", "", "Argument[0]", "create-file", "manual"]
|
||||
- ["java.io", "PrintStream", False, "PrintStream", "(File,Charset)", "", "Argument[0]", "create-file", "manual"]
|
||||
@@ -86,7 +91,6 @@ extensions:
|
||||
- ["java.io", "StringReader", False, "StringReader", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"]
|
||||
- ["java.io", "Writer", True, "toString", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
|
||||
- ["java.io", "Writer", True, "write", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: neutralModel
|
||||
|
||||
@@ -3,13 +3,25 @@ extensions:
|
||||
pack: codeql/java-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["java.lang", "Class", False, "getResource", "(String)", "", "Argument[0]", "read-file", "ai-generated"]
|
||||
- ["java.lang", "ClassLoader", True, "getSystemResourceAsStream", "(String)", "", "Argument[0]", "read-file", "ai-generated"]
|
||||
- ["java.lang", "Module", True, "getResourceAsStream", "(String)", "", "Argument[0]", "read-file", "ai-generated"]
|
||||
# suggested label is not supported: - ["java.lang", "ProcessBuilder", True, "ProcessBuilder", "(String[])", "", "Argument[0]", "command-injection", "ai-generated"]
|
||||
# These are modeled in plain CodeQL. TODO: migrate them.
|
||||
# - ["java.lang", "ProcessBuilder", False, "directory", "(File)", "", "Argument[0]", "command-injection", "ai-generated"]
|
||||
# - ["java.lang", "ProcessBuilder", True, "ProcessBuilder", "(String[])", "", "Argument[0]", "command-injection", "ai-generated"]
|
||||
# - ["java.lang", "Runtime", True, "exec", "(String,String[],File)", "", "Argument[2]", "command-injection", "ai-generated"]
|
||||
# - ["java.lang", "Runtime", True, "exec", "(String)", "", "Argument[0]", "command-injection", "ai-generated"]
|
||||
# - ["java.lang", "Runtime", True, "exec", "(String[],String[],File)", "", "Argument[0]", "command-injection", "ai-generated"]
|
||||
# - ["java.lang", "Runtime", True, "exec", "(String[],String[],File)", "", "Argument[2]", "command-injection", "ai-generated"]
|
||||
# - ["java.lang", "Runtime", True, "exec", "(String[])", "", "Argument[0]", "command-injection", "ai-generated"]
|
||||
- ["java.lang", "String", False, "matches", "(String)", "", "Argument[0]", "regex-use[f-1]", "manual"]
|
||||
- ["java.lang", "String", False, "replaceAll", "(String,String)", "", "Argument[0]", "regex-use[-1]", "manual"]
|
||||
- ["java.lang", "String", False, "replaceFirst", "(String,String)", "", "Argument[0]", "regex-use[-1]", "manual"]
|
||||
- ["java.lang", "String", False, "split", "(String)", "", "Argument[0]", "regex-use[-1]", "manual"]
|
||||
- ["java.lang", "String", False, "split", "(String,int)", "", "Argument[0]", "regex-use[-1]", "manual"]
|
||||
# These are modeled in plain CodeQL. TODO: migrate them.
|
||||
# - ["java.lang", "System", False, "load", "(String)", "", "Argument[0]", "command-injection", "ai-generated"] # This is actually injecting a library.
|
||||
# - ["java.lang", "System", False, "loadLibrary", "(String)", "", "Argument[0]", "command-injection", "ai-generated"] # This is actually injecting a library.
|
||||
- ["java.lang", "System$Logger", True, "log", "(Level,Object)", "", "Argument[1]", "logging", "manual"]
|
||||
- ["java.lang", "System$Logger", True, "log", "(Level,ResourceBundle,String,Object[])", "", "Argument[2..3]", "logging", "manual"]
|
||||
- ["java.lang", "System$Logger", True, "log", "(Level,ResourceBundle,String,Throwable)", "", "Argument[2]", "logging", "manual"]
|
||||
@@ -98,7 +110,6 @@ extensions:
|
||||
- ["java.lang", "Throwable", False, "Throwable", "(Throwable)", "", "Argument[0]", "Argument[-1].SyntheticField[java.lang.Throwable.cause]", "value", "manual"]
|
||||
- ["java.lang", "Throwable", True, "getCause", "()", "", "Argument[-1].SyntheticField[java.lang.Throwable.cause]", "ReturnValue", "value", "manual"]
|
||||
- ["java.lang", "Throwable", True, "getMessage", "()", "", "Argument[-1].SyntheticField[java.lang.Throwable.message]", "ReturnValue", "value", "manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: neutralModel
|
||||
@@ -131,7 +142,6 @@ extensions:
|
||||
- ["java.lang", "System", "nanoTime", "()", "manual"]
|
||||
- ["java.lang", "Thread", "currentThread", "()", "manual"]
|
||||
- ["java.lang", "Thread", "sleep", "(long)", "manual"]
|
||||
|
||||
# The below APIs have numeric flow and are currently being stored as neutral models.
|
||||
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.
|
||||
- ["java.lang", "Integer", "intValue", "()", "manual"] # taint-numeric
|
||||
|
||||
@@ -5,6 +5,8 @@ extensions:
|
||||
data:
|
||||
- ["java.sql", "Connection", True, "prepareCall", "", "", "Argument[0]", "sql", "manual"]
|
||||
- ["java.sql", "Connection", True, "prepareStatement", "", "", "Argument[0]", "sql", "manual"]
|
||||
- ["java.sql", "DatabaseMetaData", True, "getColumns", "(String,String,String,String)", "", "Argument[2]", "sql", "ai-generated"]
|
||||
- ["java.sql", "DatabaseMetaData", True, "getPrimaryKeys", "(String,String,String)", "", "Argument[2]", "sql", "ai-generated"]
|
||||
- ["java.sql", "Driver", False, "connect", "(String,Properties)", "", "Argument[0]", "jdbc-url", "manual"]
|
||||
- ["java.sql", "DriverManager", False, "getConnection", "(String)", "", "Argument[0]", "jdbc-url", "manual"]
|
||||
- ["java.sql", "DriverManager", False, "getConnection", "(String,Properties)", "", "Argument[0]", "jdbc-url", "manual"]
|
||||
@@ -14,20 +16,17 @@ extensions:
|
||||
- ["java.sql", "Statement", True, "executeLargeUpdate", "", "", "Argument[0]", "sql", "manual"]
|
||||
- ["java.sql", "Statement", True, "executeQuery", "", "", "Argument[0]", "sql", "manual"]
|
||||
- ["java.sql", "Statement", True, "executeUpdate", "", "", "Argument[0]", "sql", "manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["java.sql", "PreparedStatement", True, "setString", "(int,String)", "", "Argument[1]", "Argument[-1]", "value", "manual"]
|
||||
- ["java.sql", "ResultSet", True, "getString", "(String)", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: neutralModel
|
||||
data:
|
||||
- ["java.sql", "ResultSet", "next", "()", "manual"]
|
||||
|
||||
# The below APIs have numeric flow and are currently being stored as neutral models.
|
||||
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.
|
||||
- ["java.sql", "PreparedStatement", "setInt", "(int,int)", "manual"] # value-numeric
|
||||
|
||||
6
java/ql/lib/ext/javafx.scene.web.model.yml
Normal file
6
java/ql/lib/ext/javafx.scene.web.model.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["javafx.scene.web", "WebEngine", False, "load", "(String)", "", "Argument[0]", "open-url", "ai-generated"]
|
||||
@@ -0,0 +1,7 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.commons.compress.archivers.tar", "TarArchiveEntry", True, "TarArchiveEntry", "(String,boolean)", "", "Argument[0]", "Argument[-1]", "taint", "ai-generated"]
|
||||
- ["org.apache.commons.compress.archivers.tar", "TarArchiveEntry", True, "TarArchiveEntry", "(String)", "", "Argument[0]", "Argument[-1]", "taint", "ai-generated"]
|
||||
12
java/ql/lib/ext/org.apache.http.client.utils.model.yml
Normal file
12
java/ql/lib/ext/org.apache.http.client.utils.model.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.http.client.utils", "URIBuilder", True, "setHost", "(String)", "", "Argument[0]", "Argument[-1]", "taint", "ai-generated"]
|
||||
- ["org.apache.http.client.utils", "URIBuilder", True, "setHost", "(String)", "", "Argument[0]", "ReturnValue", "taint", "ai-generated"]
|
||||
- ["org.apache.http.client.utils", "URIBuilder", True, "setPath", "(String)", "", "Argument[0]", "Argument[-1].SyntheticField[org.apache.http.client.utils.URIBuilder.path]", "taint", "ai-generated"]
|
||||
- ["org.apache.http.client.utils", "URIBuilder", True, "setPathSegments", "(List)", "", "Argument[0]", "Argument[-1].SyntheticField[org.apache.http.client.utils.URIBuilder.path]", "taint", "ai-generated"]
|
||||
- ["org.apache.http.client.utils", "URIBuilder", True, "URIBuilder", "(String)", "", "Argument[0]", "Argument[-1]", "taint", "ai-generated"]
|
||||
- ["org.apache.http.client.utils", "URIBuilder", True, "URIBuilder", "(URI)", "", "Argument[0]", "Argument[-1]", "taint", "ai-generated"]
|
||||
- ["org.apache.http.client.utils", "URLEncodedUtils", True, "parse", "(URI,String)", "", "Argument[0]", "ReturnValue.Element", "taint", "ai-generated"]
|
||||
@@ -0,0 +1,8 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["org.codehaus.cargo.container.installer", "ZipURLInstaller", True, "ZipURLInstaller", "(URL,String,String)", "", "Argument[0]", "open-url", "ai-generated"]
|
||||
- ["org.codehaus.cargo.container.installer", "ZipURLInstaller", True, "ZipURLInstaller", "(URL,String,String)", "", "Argument[1]", "create-file", "ai-generated"]
|
||||
- ["org.codehaus.cargo.container.installer", "ZipURLInstaller", True, "ZipURLInstaller", "(URL,String,String)", "", "Argument[2]", "create-file", "ai-generated"]
|
||||
@@ -701,14 +701,6 @@ class StringLiteral extends Literal, @stringliteral {
|
||||
*/
|
||||
override string getValue() { result = super.getValue() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: This predicate will be removed in a future version because
|
||||
* it is just an alias for `getValue()`; that predicate should be used instead.
|
||||
*
|
||||
* Gets the literal string without the quotes.
|
||||
*/
|
||||
deprecated string getRepresentedString() { result = this.getValue() }
|
||||
|
||||
/** Holds if this string literal is a text block (`""" ... """`). */
|
||||
predicate isTextBlock() { this.getLiteral().matches("\"\"\"%") }
|
||||
|
||||
|
||||
@@ -132,9 +132,9 @@ private newtype TPrintAstNode =
|
||||
TGenericTypeNode(GenericType ty) { shouldPrint(ty, _) } or
|
||||
TGenericCallableNode(GenericCallable c) { shouldPrint(c, _) } or
|
||||
TDocumentableNode(Documentable d) { shouldPrint(d, _) and exists(d.getJavadoc()) } or
|
||||
TJavadocNode(Javadoc jd) { exists(Documentable d | d.getJavadoc() = jd | shouldPrint(d, _)) } or
|
||||
TJavadocElementNode(JavadocElement jd) {
|
||||
exists(Documentable d | d.getJavadoc() = jd.getParent*() | shouldPrint(d, _))
|
||||
TJavadocNode(Javadoc jd, Documentable d) { d.getJavadoc() = jd and shouldPrint(d, _) } or
|
||||
TJavadocElementNode(JavadocElement jd, Documentable d) {
|
||||
d.getJavadoc() = jd.getParent*() and shouldPrint(d, _)
|
||||
} or
|
||||
TImportsNode(CompilationUnit cu) {
|
||||
shouldPrint(cu, _) and exists(Import i | i.getCompilationUnit() = cu)
|
||||
@@ -794,6 +794,7 @@ final class DocumentableNode extends PrintAstNode, TDocumentableNode {
|
||||
override Location getLocation() { none() }
|
||||
|
||||
override JavadocNode getChild(int childIndex) {
|
||||
result.getDocumentable() = d and
|
||||
result.getJavadoc() =
|
||||
rank[childIndex](Javadoc jd, string file, int line, int column |
|
||||
jd.getCommentedElement() = d and jd.getLocation().hasLocationInfo(file, line, column, _, _)
|
||||
@@ -814,14 +815,16 @@ final class DocumentableNode extends PrintAstNode, TDocumentableNode {
|
||||
*/
|
||||
final class JavadocNode extends PrintAstNode, TJavadocNode {
|
||||
Javadoc jd;
|
||||
Documentable d;
|
||||
|
||||
JavadocNode() { this = TJavadocNode(jd) }
|
||||
JavadocNode() { this = TJavadocNode(jd, d) and not duplicateMetadata(d) }
|
||||
|
||||
override string toString() { result = getQlClass(jd) + jd.toString() }
|
||||
|
||||
override Location getLocation() { result = jd.getLocation() }
|
||||
|
||||
override JavadocElementNode getChild(int childIndex) {
|
||||
result.getDocumentable() = d and
|
||||
result.getJavadocElement() = jd.getChild(childIndex)
|
||||
}
|
||||
|
||||
@@ -829,6 +832,11 @@ final class JavadocNode extends PrintAstNode, TJavadocNode {
|
||||
* Gets the `Javadoc` represented by this node.
|
||||
*/
|
||||
Javadoc getJavadoc() { result = jd }
|
||||
|
||||
/**
|
||||
* Gets the `Documentable` whose `Javadoc` is represented by this node.
|
||||
*/
|
||||
Documentable getDocumentable() { result = d }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -837,14 +845,16 @@ final class JavadocNode extends PrintAstNode, TJavadocNode {
|
||||
*/
|
||||
final class JavadocElementNode extends PrintAstNode, TJavadocElementNode {
|
||||
JavadocElement jd;
|
||||
Documentable d;
|
||||
|
||||
JavadocElementNode() { this = TJavadocElementNode(jd) }
|
||||
JavadocElementNode() { this = TJavadocElementNode(jd, d) and not duplicateMetadata(d) }
|
||||
|
||||
override string toString() { result = getQlClass(jd) + jd.toString() }
|
||||
|
||||
override Location getLocation() { result = jd.getLocation() }
|
||||
|
||||
override JavadocElementNode getChild(int childIndex) {
|
||||
result.getDocumentable() = d and
|
||||
result.getJavadocElement() = jd.(JavadocParent).getChild(childIndex)
|
||||
}
|
||||
|
||||
@@ -852,6 +862,11 @@ final class JavadocElementNode extends PrintAstNode, TJavadocElementNode {
|
||||
* Gets the `JavadocElement` represented by this node.
|
||||
*/
|
||||
JavadocElement getJavadocElement() { result = jd }
|
||||
|
||||
/**
|
||||
* Gets the `Documentable` whose `JavadocElement` is represented by this node.
|
||||
*/
|
||||
Documentable getDocumentable() { result = d }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -171,6 +171,8 @@ class SummarizedCallableBase extends TSummarizedCallableBase {
|
||||
|
||||
class SummarizedCallable = Impl::Public::SummarizedCallable;
|
||||
|
||||
class NeutralCallable = Impl::Public::NeutralCallable;
|
||||
|
||||
/**
|
||||
* An adapter class to add the flow summaries specified on `SyntheticCallable`
|
||||
* to `SummarizedCallable`.
|
||||
|
||||
@@ -11,6 +11,8 @@ private module DispatchImpl {
|
||||
private predicate hasHighConfidenceTarget(Call c) {
|
||||
exists(SummarizedCallable sc | sc.getACall() = c and not sc.isAutoGenerated())
|
||||
or
|
||||
exists(NeutralCallable nc | nc.getACall() = c and nc.isManual())
|
||||
or
|
||||
exists(Callable srcTgt |
|
||||
srcTgt = VirtualDispatch::viableCallable(c) and
|
||||
not VirtualDispatch::lowConfidenceDispatchTarget(c, srcTgt)
|
||||
|
||||
@@ -182,6 +182,7 @@ private module LambdaFlow {
|
||||
boolean toJump, DataFlowCallOption lastCall
|
||||
) {
|
||||
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
|
||||
not expectsContent(node, _) and
|
||||
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
|
||||
then compatibleTypes(t, getNodeDataFlowType(node))
|
||||
else any()
|
||||
|
||||
@@ -301,8 +301,8 @@ module Private {
|
||||
TWithoutContentSummaryComponent(ContentSet c) or
|
||||
TWithContentSummaryComponent(ContentSet c)
|
||||
|
||||
private TParameterSummaryComponent thisParam() {
|
||||
result = TParameterSummaryComponent(instanceParameterPosition())
|
||||
private TParameterSummaryComponent callbackSelfParam() {
|
||||
result = TParameterSummaryComponent(callbackSelfParameterPosition())
|
||||
}
|
||||
|
||||
newtype TSummaryComponentStack =
|
||||
@@ -311,7 +311,7 @@ module Private {
|
||||
any(RequiredSummaryComponentStack x).required(head, tail)
|
||||
or
|
||||
any(RequiredSummaryComponentStack x).required(TParameterSummaryComponent(_), tail) and
|
||||
head = thisParam()
|
||||
head = callbackSelfParam()
|
||||
or
|
||||
derivedFluentFlowPush(_, _, _, head, tail, _)
|
||||
}
|
||||
@@ -336,7 +336,7 @@ module Private {
|
||||
callbackRef = s.drop(_) and
|
||||
(isCallbackParameter(callbackRef) or callbackRef.head() = TReturnSummaryComponent(_)) and
|
||||
input = callbackRef.tail() and
|
||||
output = TConsSummaryComponentStack(thisParam(), input) and
|
||||
output = TConsSummaryComponentStack(callbackSelfParam(), input) and
|
||||
preservesValue = true
|
||||
)
|
||||
or
|
||||
@@ -439,6 +439,9 @@ module Private {
|
||||
out.head() = TParameterSummaryComponent(_) and
|
||||
s = out.tail()
|
||||
)
|
||||
or
|
||||
// Add the post-update node corresponding to the requested argument node
|
||||
outputState(c, s) and isCallbackParameter(s)
|
||||
}
|
||||
|
||||
private newtype TSummaryNodeState =
|
||||
@@ -1012,7 +1015,7 @@ module Private {
|
||||
private predicate relevantSummaryElementGenerated(
|
||||
AccessPath inSpec, AccessPath outSpec, string kind
|
||||
) {
|
||||
summaryElement(this, inSpec, outSpec, kind, "generated") and
|
||||
summaryElement(this, inSpec, outSpec, kind, ["generated", "ai-generated"]) and
|
||||
not summaryElement(this, _, _, _, "manual")
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ private module SyntheticGlobals {
|
||||
DataFlowCallable inject(SummarizedCallable c) { result.asSummarizedCallable() = c }
|
||||
|
||||
/** Gets the parameter position of the instance parameter. */
|
||||
ArgumentPosition instanceParameterPosition() { result = -1 }
|
||||
ArgumentPosition callbackSelfParameterPosition() { result = -1 }
|
||||
|
||||
/** Gets the synthesized summary data-flow node for the given values. */
|
||||
Node summaryNode(SummarizedCallable c, SummaryNodeState state) { result = getSummaryNode(c, state) }
|
||||
|
||||
@@ -236,6 +236,12 @@ private VirtualMethodAccess objectToString(ObjNode n) {
|
||||
result.getQualifier() = n.asExpr() and sink(n)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `ma` is an `Object.toString()` call taking possibly improved type
|
||||
* bounds into account.
|
||||
*/
|
||||
predicate objectToStringCall(VirtualMethodAccess ma) { ma = objectToString(_) }
|
||||
|
||||
/**
|
||||
* Holds if the qualifier of the `Object.toString()` call `ma` might have type `t`.
|
||||
*/
|
||||
|
||||
@@ -93,7 +93,8 @@ private module Dispatch {
|
||||
exists(RefType t | qualUnionType(ma, t, false) |
|
||||
lowConfidenceDispatchType(t.getSourceDeclaration())
|
||||
)
|
||||
)
|
||||
) and
|
||||
not ObjFlow::objectToStringCall(ma)
|
||||
}
|
||||
|
||||
private predicate lowConfidenceDispatchType(SrcRefType t) {
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/** Provide classes to reason about Android Intents that can install APKs. */
|
||||
|
||||
import java
|
||||
import semmle.code.java.frameworks.android.Intent
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
private import semmle.code.java.dataflow.ExternalFlow
|
||||
private import semmle.code.java.dataflow.FlowSources
|
||||
|
||||
/** A string literal that represents the MIME type for Android APKs. */
|
||||
class PackageArchiveMimeTypeLiteral extends StringLiteral {
|
||||
PackageArchiveMimeTypeLiteral() { this.getValue() = "application/vnd.android.package-archive" }
|
||||
}
|
||||
|
||||
/** The `android.content.Intent.ACTION_INSTALL_PACKAGE` constant. */
|
||||
class InstallPackageAction extends Expr {
|
||||
InstallPackageAction() {
|
||||
this.(StringLiteral).getValue() = "android.intent.action.INSTALL_PACKAGE"
|
||||
or
|
||||
exists(VarAccess va |
|
||||
va.getVariable().hasName("ACTION_INSTALL_PACKAGE") and
|
||||
va.getQualifier().getType() instanceof TypeIntent
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** A method that sets the MIME type of an intent. */
|
||||
class SetTypeMethod extends Method {
|
||||
SetTypeMethod() {
|
||||
this.hasName(["setType", "setTypeAndNormalize"]) and
|
||||
this.getDeclaringType() instanceof TypeIntent
|
||||
}
|
||||
}
|
||||
|
||||
/** A method that sets the data URI and the MIME type of an intent. */
|
||||
class SetDataAndTypeMethod extends Method {
|
||||
SetDataAndTypeMethod() {
|
||||
this.hasName(["setDataAndType", "setDataAndTypeAndNormalize"]) and
|
||||
this.getDeclaringType() instanceof TypeIntent
|
||||
}
|
||||
}
|
||||
|
||||
/** A method that sets the data URI of an intent. */
|
||||
class SetDataMethod extends Method {
|
||||
SetDataMethod() {
|
||||
this.hasName(["setData", "setDataAndNormalize", "setDataAndType", "setDataAndTypeAndNormalize"]) and
|
||||
this.getDeclaringType() instanceof TypeIntent
|
||||
}
|
||||
}
|
||||
|
||||
/** A dataflow sink for the URI of an intent. */
|
||||
class SetDataSink extends DataFlow::ExprNode {
|
||||
SetDataSink() {
|
||||
exists(MethodAccess ma |
|
||||
this.getExpr() = ma.getQualifier() and
|
||||
ma.getMethod() instanceof SetDataMethod
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** A method that generates a URI. */
|
||||
class UriConstructorMethod extends Method {
|
||||
UriConstructorMethod() {
|
||||
this.hasQualifiedName("android.net", "Uri", ["fromFile", "fromParts"]) or
|
||||
this.hasQualifiedName("androidx.core.content", "FileProvider", "getUriForFile")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A dataflow source representing the URIs which an APK not controlled by the
|
||||
* application may come from. Including external storage and web URLs.
|
||||
*/
|
||||
class ExternalApkSource extends DataFlow::Node {
|
||||
ExternalApkSource() {
|
||||
sourceNode(this, "android-external-storage-dir") or
|
||||
this.asExpr().(MethodAccess).getMethod() instanceof UriConstructorMethod or
|
||||
this.asExpr().(StringLiteral).getValue().matches("file://%") or
|
||||
this instanceof RemoteFlowSource
|
||||
}
|
||||
}
|
||||
|
||||
/** The `setAction` method of the `android.content.Intent` class. */
|
||||
class SetActionMethod extends Method {
|
||||
SetActionMethod() {
|
||||
this.hasName("setAction") and
|
||||
this.getDeclaringType() instanceof TypeIntent
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
/** Provides dataflow configurations to reason about installation of arbitrary Android APKs. */
|
||||
|
||||
import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
private import semmle.code.java.security.ArbitraryApkInstallation
|
||||
|
||||
/**
|
||||
* A dataflow configuration for flow from an external source of an APK to the
|
||||
* `setData[AndType][AndNormalize]` method of an intent.
|
||||
*/
|
||||
private module ApkInstallationConfiguration implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node node) { node instanceof ExternalApkSource }
|
||||
|
||||
predicate isSink(DataFlow::Node node) {
|
||||
exists(MethodAccess ma |
|
||||
ma.getMethod() instanceof SetDataMethod and
|
||||
ma.getArgument(0) = node.asExpr() and
|
||||
(
|
||||
PackageArchiveMimeTypeFlow::hasFlowToExpr(ma.getQualifier())
|
||||
or
|
||||
InstallPackageActionFlow::hasFlowToExpr(ma.getQualifier())
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module ApkInstallationFlow = DataFlow::Make<ApkInstallationConfiguration>;
|
||||
|
||||
private newtype ActionState =
|
||||
ActionUnset() or
|
||||
HasInstallPackageAction()
|
||||
|
||||
/**
|
||||
* A dataflow configuration tracking the flow from the `android.content.Intent.ACTION_INSTALL_PACKAGE`
|
||||
* constant to either the constructor of an intent or the `setAction` method of an intent.
|
||||
*
|
||||
* This is used to track if an intent is used to install an APK.
|
||||
*/
|
||||
private module InstallPackageActionConfiguration implements DataFlow::StateConfigSig {
|
||||
class FlowState = ActionState;
|
||||
|
||||
predicate isSource(DataFlow::Node source, FlowState state) {
|
||||
source.asExpr() instanceof InstallPackageAction and state instanceof ActionUnset
|
||||
}
|
||||
|
||||
predicate isAdditionalFlowStep(
|
||||
DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2
|
||||
) {
|
||||
state1 instanceof ActionUnset and
|
||||
state2 instanceof HasInstallPackageAction and
|
||||
(
|
||||
exists(ConstructorCall cc |
|
||||
cc.getConstructedType() instanceof TypeIntent and
|
||||
node1.asExpr() = cc.getArgument(0) and
|
||||
node1.asExpr().getType() instanceof TypeString and
|
||||
node2.asExpr() = cc
|
||||
)
|
||||
or
|
||||
exists(MethodAccess ma |
|
||||
ma.getMethod() instanceof SetActionMethod and
|
||||
node1.asExpr() = ma.getArgument(0) and
|
||||
node2.asExpr() = ma.getQualifier()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node node, FlowState state) {
|
||||
state instanceof HasInstallPackageAction and node.asExpr().getType() instanceof TypeIntent
|
||||
}
|
||||
|
||||
predicate isBarrier(DataFlow::Node node, FlowState state) { none() }
|
||||
}
|
||||
|
||||
private module InstallPackageActionFlow =
|
||||
TaintTracking::MakeWithState<InstallPackageActionConfiguration>;
|
||||
|
||||
private newtype MimeTypeState =
|
||||
MimeTypeUnset() or
|
||||
HasPackageArchiveMimeType()
|
||||
|
||||
/**
|
||||
* A dataflow configuration tracking the flow of the Android APK MIME type to
|
||||
* the `setType` or `setTypeAndNormalize` method of an intent, followed by a call
|
||||
* to `setData[AndType][AndNormalize]`.
|
||||
*/
|
||||
private module PackageArchiveMimeTypeConfiguration implements DataFlow::StateConfigSig {
|
||||
class FlowState = MimeTypeState;
|
||||
|
||||
predicate isSource(DataFlow::Node node, FlowState state) {
|
||||
node.asExpr() instanceof PackageArchiveMimeTypeLiteral and
|
||||
state instanceof MimeTypeUnset
|
||||
}
|
||||
|
||||
predicate isAdditionalFlowStep(
|
||||
DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2
|
||||
) {
|
||||
state1 instanceof MimeTypeUnset and
|
||||
state2 instanceof HasPackageArchiveMimeType and
|
||||
exists(MethodAccess ma |
|
||||
ma.getQualifier() = node2.asExpr() and
|
||||
(
|
||||
ma.getMethod() instanceof SetTypeMethod and
|
||||
ma.getArgument(0) = node1.asExpr()
|
||||
or
|
||||
ma.getMethod() instanceof SetDataAndTypeMethod and
|
||||
ma.getArgument(1) = node1.asExpr()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node node, FlowState state) {
|
||||
state instanceof HasPackageArchiveMimeType and
|
||||
node instanceof SetDataSink
|
||||
}
|
||||
|
||||
predicate isBarrier(DataFlow::Node node, FlowState state) { none() }
|
||||
}
|
||||
|
||||
private module PackageArchiveMimeTypeFlow =
|
||||
TaintTracking::MakeWithState<PackageArchiveMimeTypeConfiguration>;
|
||||
@@ -104,11 +104,6 @@ class XssVulnerableWriterSource extends MethodAccess {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `XssVulnerableWriterSource` instead.
|
||||
*/
|
||||
deprecated class ServletWriterSource = XssVulnerableWriterSource;
|
||||
|
||||
/**
|
||||
* Holds if `s` is an HTTP Content-Type vulnerable to XSS.
|
||||
*/
|
||||
|
||||
@@ -454,21 +454,11 @@ class MavenRepoJar extends File {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: name changed to `getGroupId` for consistent use of camel-case.
|
||||
*/
|
||||
deprecated string getGroupID() { result = this.getGroupId() }
|
||||
|
||||
/**
|
||||
* Gets the `artifactId` of this jar.
|
||||
*/
|
||||
string getArtifactId() { result = this.getParentContainer().getParentContainer().getBaseName() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: name changed to `getArtifactId` for consistent casing and consistent spelling with Maven.
|
||||
*/
|
||||
deprecated string getArtefactID() { result = this.getArtifactId() }
|
||||
|
||||
/**
|
||||
* Gets the artifact version string of this jar.
|
||||
*/
|
||||
@@ -482,11 +472,6 @@ class MavenRepoJar extends File {
|
||||
pom.getArtifact().getValue() = this.getArtifactId()
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: name changed to `artifactMatches` for consistent spelling with Maven.
|
||||
*/
|
||||
deprecated predicate artefactMatches(ProtoPom pom) { this.artifactMatches(pom) }
|
||||
|
||||
/**
|
||||
* Holds if this jar is both an artifact for the POM, and has a version string that matches the POM
|
||||
* version string. Only soft and hard version matches are supported.
|
||||
|
||||
@@ -108,20 +108,6 @@ class XmlFile extends XmlParent, File {
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of this XML file.
|
||||
*/
|
||||
deprecated string getPath() { result = this.getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `getParentContainer().getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of the folder that contains this XML file.
|
||||
*/
|
||||
deprecated string getFolder() { result = this.getParentContainer().getAbsolutePath() }
|
||||
|
||||
/** Gets the encoding of this XML file. */
|
||||
string getEncoding() { xmlEncoding(this, result) }
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
<overview>
|
||||
<p>
|
||||
Android allows an application to install an Android Package Kit (APK)
|
||||
using an <code>Intent</code> with
|
||||
the <code>"application/vnd.android.package-archive"</code> MIME type. If
|
||||
the file used in the <code>Intent</code> is from a location that is not
|
||||
controlled by the application (for example, an SD card that is
|
||||
universally writable), this can result in the unintended installation of untrusted applications.
|
||||
</p>
|
||||
</overview>
|
||||
|
||||
<recommendation>
|
||||
<p>
|
||||
You should install packages using
|
||||
the <code>PackageInstaller</code> class.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you need to install from a file, you should use
|
||||
a <code>FileProvider</code>. Content providers can provide more specific
|
||||
permissions than file system permissions can.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When your application does not require package installations, do not add
|
||||
the <code>REQUEST_INSTALL_PACKAGES</code> permission in the manifest file.
|
||||
</p>
|
||||
</recommendation>
|
||||
|
||||
<example>
|
||||
|
||||
<p>
|
||||
In the following (bad) example, the package is installed from a file which
|
||||
may be altered by another application:
|
||||
</p>
|
||||
|
||||
<sample src="InstallApkWithFile.java"/>
|
||||
|
||||
<p>
|
||||
In the following (good) example, the package is installed by using
|
||||
a <code>FileProvider</code>:
|
||||
</p>
|
||||
|
||||
<sample src="InstallApkWithFileProvider.java"/>
|
||||
|
||||
<p>
|
||||
In the following (good) example, the package is installed using an
|
||||
instance of the <code>android.content.pm.PackageInstaller</code> class:
|
||||
</p>
|
||||
|
||||
<sample src="InstallApkWithPackageInstaller.java"/>
|
||||
</example>
|
||||
|
||||
<references>
|
||||
<li>
|
||||
Android Developers: <a href="https://developer.android.com/reference/android/content/Intent#ACTION_INSTALL_PACKAGE">Intent.ACTION_INSTALL_PACKAGE</a>.
|
||||
</li>
|
||||
<li>
|
||||
Android Developers: <a href="https://developer.android.com/reference/android/Manifest.permission#REQUEST_INSTALL_PACKAGES">Manifest.permission.REQUEST_INSTALL_PACKAGES</a>.
|
||||
</li>
|
||||
<li>
|
||||
Android Developers: <a href="https://developer.android.com/reference/android/content/pm/PackageInstaller">PackageInstaller</a>.
|
||||
</li>
|
||||
<li>
|
||||
Android Developers: <a href="https://developer.android.com/reference/androidx/core/content/FileProvider">FileProvider</a>.
|
||||
</li>
|
||||
</references>
|
||||
</qhelp>
|
||||
19
java/ql/src/Security/CWE/CWE-094/ArbitraryApkInstallation.ql
Normal file
19
java/ql/src/Security/CWE/CWE-094/ArbitraryApkInstallation.ql
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @id java/android/arbitrary-apk-installation
|
||||
* @name Android APK installation
|
||||
* @description Creating an intent with a URI pointing to a untrusted file can lead to the installation of an untrusted application.
|
||||
* @kind path-problem
|
||||
* @security-severity 9.3
|
||||
* @problem.severity error
|
||||
* @precision medium
|
||||
* @tags security
|
||||
* external/cwe/cwe-094
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.security.ArbitraryApkInstallationQuery
|
||||
import ApkInstallationFlow::PathGraph
|
||||
|
||||
from ApkInstallationFlow::PathNode source, ApkInstallationFlow::PathNode sink
|
||||
where ApkInstallationFlow::hasFlowPath(source, sink)
|
||||
select sink.getNode(), source, sink, "Arbitrary Android APK installation."
|
||||
14
java/ql/src/Security/CWE/CWE-094/InstallApkWithFile.java
Normal file
14
java/ql/src/Security/CWE/CWE-094/InstallApkWithFile.java
Normal file
@@ -0,0 +1,14 @@
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/* Get a file from external storage */
|
||||
File file = new File(Environment.getExternalStorageDirectory(), "myapp.apk");
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
/* Set the mimetype to APK */
|
||||
intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive");
|
||||
|
||||
startActivity(intent);
|
||||
@@ -0,0 +1,31 @@
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
String tempFilename = "temporary.apk";
|
||||
byte[] buffer = new byte[16384];
|
||||
|
||||
/* Copy application asset into temporary file */
|
||||
try (InputStream is = getAssets().open(assetName);
|
||||
FileOutputStream fout = openFileOutput(tempFilename, Context.MODE_PRIVATE)) {
|
||||
int n;
|
||||
while ((n=is.read(buffer)) >= 0) {
|
||||
fout.write(buffer, 0, n);
|
||||
}
|
||||
}
|
||||
|
||||
/* Expose temporary file with FileProvider */
|
||||
File toInstall = new File(this.getFilesDir(), tempFilename);
|
||||
Uri applicationUri = FileProvider.getUriForFile(this, "com.example.apkprovider", toInstall);
|
||||
|
||||
/* Create Intent and set data to APK file. */
|
||||
Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
|
||||
intent.setData(applicationUri);
|
||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
|
||||
startActivity(intent);
|
||||
@@ -0,0 +1,32 @@
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInstaller;
|
||||
|
||||
private static final String PACKAGE_INSTALLED_ACTION =
|
||||
"com.example.SESSION_API_PACKAGE_INSTALLED";
|
||||
|
||||
/* Create the package installer and session */
|
||||
PackageInstaller packageInstaller = getPackageManager().getPackageInstaller();
|
||||
PackageInstaller.SessionParams params =
|
||||
new PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL);
|
||||
int sessionId = packageInstaller.createSession(params);
|
||||
session = packageInstaller.openSession(sessionId);
|
||||
|
||||
/* Load asset into session */
|
||||
try (OutputStream packageInSession = session.openWrite("package", 0, -1);
|
||||
InputStream is = getAssets().open(assetName)) {
|
||||
byte[] buffer = new byte[16384];
|
||||
int n;
|
||||
while ((n = is.read(buffer)) >= 0) {
|
||||
packageInSession.write(buffer, 0, n);
|
||||
}
|
||||
}
|
||||
|
||||
/* Create status receiver */
|
||||
Intent intent = new Intent(this, InstallApkSessionApi.class);
|
||||
intent.setAction(PACKAGE_INSTALLED_ACTION);
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
|
||||
IntentSender statusReceiver = pendingIntent.getIntentSender();
|
||||
|
||||
/* Commit the session */
|
||||
session.commit(statusReceiver);
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
category: newQuery
|
||||
---
|
||||
* Added a new query, `java/android/arbitrary-apk-installation`, to detect installation of APKs from untrusted sources.
|
||||
|
||||
@@ -182,4 +182,18 @@ public class A {
|
||||
|
||||
public Object field1;
|
||||
public Object field2;
|
||||
|
||||
void foo4() {
|
||||
Producer1Consumer3<Integer> pc = new Producer1Consumer3<Integer>() {
|
||||
int cfield = 0;
|
||||
@Override public Integer[] make() {
|
||||
return new Integer[] { cfield };
|
||||
}
|
||||
@Override public void eat(Integer[] xs) {
|
||||
cfield = xs[0];
|
||||
}
|
||||
};
|
||||
applyConsumer3(new Integer[] { (Integer)source(21) }, pc);
|
||||
sink(applyProducer1(pc)[0]); // $ flow=21
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package generatedtest;
|
||||
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
||||
|
||||
// Test case generated by GenerateFlowTestCase.ql
|
||||
public class Test {
|
||||
|
||||
Object source() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void sink(Object o) {}
|
||||
|
||||
public void test() throws Exception {
|
||||
{
|
||||
// "org.apache.commons.compress.archivers.tar;TarArchiveEntry;true;TarArchiveEntry;(String);;Argument[0];Argument[-1];taint;ai-generated"
|
||||
TarArchiveEntry out = null;
|
||||
String in = (String) source();
|
||||
out = new TarArchiveEntry(in);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.apache.commons.compress.archivers.tar;TarArchiveEntry;true;TarArchiveEntry;(String,boolean);;Argument[0];Argument[-1];taint;ai-generated"
|
||||
TarArchiveEntry out = null;
|
||||
String in = (String) source();
|
||||
out = new TarArchiveEntry(in, false);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/apache-commons-compress
|
||||
@@ -0,0 +1,2 @@
|
||||
import java
|
||||
import TestUtilities.InlineFlowTest
|
||||
@@ -0,0 +1,80 @@
|
||||
package generatedtest;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.client.utils.URLEncodedUtils;
|
||||
|
||||
// Test case generated by GenerateFlowTestCase.ql
|
||||
public class Client {
|
||||
|
||||
<T> T getElement(Iterable<T> it) {
|
||||
return it.iterator().next();
|
||||
}
|
||||
|
||||
Object getURIBuilder_pathDefault(Object container) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Object taint() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void sink(Object o) {}
|
||||
|
||||
public void test() throws Exception {
|
||||
|
||||
{
|
||||
// "org.apache.http.client.utils;URIBuilder;true;URIBuilder;(String);;Argument[0];Argument[-1];taint;ai-generated"
|
||||
URIBuilder out = null;
|
||||
String in = (String) taint();
|
||||
out = new URIBuilder(in);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.apache.http.client.utils;URIBuilder;true;URIBuilder;(URI);;Argument[0];Argument[-1];taint;ai-generated"
|
||||
URIBuilder out = null;
|
||||
URI in = (URI) taint();
|
||||
out = new URIBuilder(in);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.apache.http.client.utils;URIBuilder;true;setHost;(String);;Argument[0];Argument[-1];taint;ai-generated"
|
||||
URIBuilder out = null;
|
||||
String in = (String) taint();
|
||||
out.setHost(in);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.apache.http.client.utils;URIBuilder;true;setHost;(String);;Argument[0];ReturnValue;taint;ai-generated"
|
||||
URIBuilder out = null;
|
||||
String in = (String) taint();
|
||||
URIBuilder instance = null;
|
||||
out = instance.setHost(in);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.apache.http.client.utils;URIBuilder;true;setPath;(String);;Argument[0];Argument[-1].SyntheticField[org.apache.http.client.utils.URIBuilder.path];taint;ai-generated"
|
||||
URIBuilder out = null;
|
||||
String in = (String) taint();
|
||||
out.setPath(in);
|
||||
sink(getURIBuilder_pathDefault(out)); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.apache.http.client.utils;URIBuilder;true;setPathSegments;(List);;Argument[0];Argument[-1].SyntheticField[org.apache.http.client.utils.URIBuilder.path];taint;ai-generated"
|
||||
URIBuilder out = null;
|
||||
List in = (List) taint();
|
||||
out.setPathSegments(in);
|
||||
sink(getURIBuilder_pathDefault(out)); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.apache.http.client.utils;URLEncodedUtils;true;parse;(URI,String);;Argument[0];ReturnValue.Element;taint;ai-generated"
|
||||
List out = null;
|
||||
URI in = (URI) taint();
|
||||
out = URLEncodedUtils.parse(in, (String) null);
|
||||
sink(getElement(out)); // $ hasTaintFlow
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-tests
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["generatedtest", "Client", False, "getURIBuilder_pathDefault", "(Object)", "", "Argument[0].SyntheticField[org.apache.http.client.utils.URIBuilder.path]", "ReturnValue", "taint", "manual"]
|
||||
@@ -56,4 +56,18 @@ class A {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
enum E {
|
||||
/**
|
||||
* Javadoc for enum constant
|
||||
*/
|
||||
A,
|
||||
B,
|
||||
C;
|
||||
}
|
||||
|
||||
/**
|
||||
* Javadoc for fields
|
||||
*/
|
||||
int i, j, k;
|
||||
}
|
||||
@@ -125,3 +125,30 @@ A.java:
|
||||
# 55| 1: [LocalVariableDeclExpr] rte
|
||||
# 55| 1: [BlockStmt] { ... }
|
||||
# 56| 0: [ReturnStmt] return ...
|
||||
# 60| 10: [Class] E
|
||||
# 64| 3: [FieldDeclaration] E A;
|
||||
#-----| -3: (Javadoc)
|
||||
# 61| 1: [Javadoc] /** Javadoc for enum constant */
|
||||
# 62| 0: [JavadocText] Javadoc for enum constant
|
||||
# 64| -1: [TypeAccess] E
|
||||
# 64| 0: [ClassInstanceExpr] new E(...)
|
||||
# 64| -3: [TypeAccess] E
|
||||
# 65| 4: [FieldDeclaration] E B;
|
||||
#-----| -3: (Javadoc)
|
||||
# 61| 1: [Javadoc] /** Javadoc for enum constant */
|
||||
# 62| 0: [JavadocText] Javadoc for enum constant
|
||||
# 65| -1: [TypeAccess] E
|
||||
# 65| 0: [ClassInstanceExpr] new E(...)
|
||||
# 65| -3: [TypeAccess] E
|
||||
# 66| 5: [FieldDeclaration] E C;
|
||||
#-----| -3: (Javadoc)
|
||||
# 61| 1: [Javadoc] /** Javadoc for enum constant */
|
||||
# 62| 0: [JavadocText] Javadoc for enum constant
|
||||
# 66| -1: [TypeAccess] E
|
||||
# 66| 0: [ClassInstanceExpr] new E(...)
|
||||
# 66| -3: [TypeAccess] E
|
||||
# 72| 11: [FieldDeclaration] int i, ...;
|
||||
#-----| -3: (Javadoc)
|
||||
# 69| 1: [Javadoc] /** Javadoc for fields */
|
||||
# 70| 0: [JavadocText] Javadoc for fields
|
||||
# 72| -1: [TypeAccess] int
|
||||
|
||||
@@ -14,7 +14,22 @@ edges
|
||||
| Test.java:95:14:95:34 | getHostName(...) : String | Test.java:99:12:99:33 | new URI(...) |
|
||||
| Test.java:95:14:95:34 | getHostName(...) : String | Test.java:100:12:100:45 | new URI(...) |
|
||||
| Test.java:95:14:95:34 | getHostName(...) : String | Test.java:101:12:101:54 | new URI(...) |
|
||||
| Test.java:105:14:105:34 | getHostName(...) : String | Test.java:107:46:107:46 | t |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:17:61:17:72 | source(...) : String |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:19:41:19:52 | source(...) : String |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:25:38:25:49 | source(...) : String |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:27:36:27:47 | source(...) : String |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:29:31:29:42 | source(...) : String |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:31:33:31:44 | source(...) : String |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:33:50:33:61 | source(...) : String |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:35:54:35:65 | source(...) : String |
|
||||
| mad/Test.java:17:61:17:72 | source(...) : String | mad/Test.java:17:52:17:72 | (...)... |
|
||||
| mad/Test.java:19:41:19:52 | source(...) : String | mad/Test.java:19:32:19:52 | (...)... |
|
||||
| mad/Test.java:25:38:25:49 | source(...) : String | mad/Test.java:25:31:25:49 | (...)... |
|
||||
| mad/Test.java:27:36:27:47 | source(...) : String | mad/Test.java:27:29:27:47 | (...)... |
|
||||
| mad/Test.java:29:31:29:42 | source(...) : String | mad/Test.java:29:24:29:42 | (...)... |
|
||||
| mad/Test.java:31:33:31:44 | source(...) : String | mad/Test.java:31:24:31:44 | (...)... |
|
||||
| mad/Test.java:33:50:33:61 | source(...) : String | mad/Test.java:33:41:33:61 | (...)... |
|
||||
| mad/Test.java:35:54:35:65 | source(...) : String | mad/Test.java:35:45:35:65 | (...)... |
|
||||
nodes
|
||||
| Test.java:19:18:19:38 | getHostName(...) : String | semmle.label | getHostName(...) : String |
|
||||
| Test.java:24:20:24:23 | temp | semmle.label | temp |
|
||||
@@ -35,8 +50,23 @@ nodes
|
||||
| Test.java:99:12:99:33 | new URI(...) | semmle.label | new URI(...) |
|
||||
| Test.java:100:12:100:45 | new URI(...) | semmle.label | new URI(...) |
|
||||
| Test.java:101:12:101:54 | new URI(...) | semmle.label | new URI(...) |
|
||||
| Test.java:105:14:105:34 | getHostName(...) : String | semmle.label | getHostName(...) : String |
|
||||
| Test.java:107:46:107:46 | t | semmle.label | t |
|
||||
| mad/Test.java:12:16:12:36 | getHostName(...) : String | semmle.label | getHostName(...) : String |
|
||||
| mad/Test.java:17:52:17:72 | (...)... | semmle.label | (...)... |
|
||||
| mad/Test.java:17:61:17:72 | source(...) : String | semmle.label | source(...) : String |
|
||||
| mad/Test.java:19:32:19:52 | (...)... | semmle.label | (...)... |
|
||||
| mad/Test.java:19:41:19:52 | source(...) : String | semmle.label | source(...) : String |
|
||||
| mad/Test.java:25:31:25:49 | (...)... | semmle.label | (...)... |
|
||||
| mad/Test.java:25:38:25:49 | source(...) : String | semmle.label | source(...) : String |
|
||||
| mad/Test.java:27:29:27:47 | (...)... | semmle.label | (...)... |
|
||||
| mad/Test.java:27:36:27:47 | source(...) : String | semmle.label | source(...) : String |
|
||||
| mad/Test.java:29:24:29:42 | (...)... | semmle.label | (...)... |
|
||||
| mad/Test.java:29:31:29:42 | source(...) : String | semmle.label | source(...) : String |
|
||||
| mad/Test.java:31:24:31:44 | (...)... | semmle.label | (...)... |
|
||||
| mad/Test.java:31:33:31:44 | source(...) : String | semmle.label | source(...) : String |
|
||||
| mad/Test.java:33:41:33:61 | (...)... | semmle.label | (...)... |
|
||||
| mad/Test.java:33:50:33:61 | source(...) : String | semmle.label | source(...) : String |
|
||||
| mad/Test.java:35:45:35:65 | (...)... | semmle.label | (...)... |
|
||||
| mad/Test.java:35:54:35:65 | source(...) : String | semmle.label | source(...) : String |
|
||||
subpaths
|
||||
#select
|
||||
| Test.java:24:11:24:24 | new File(...) | Test.java:19:18:19:38 | getHostName(...) : String | Test.java:24:20:24:23 | temp | This path depends on a $@. | Test.java:19:18:19:38 | getHostName(...) | user-provided value |
|
||||
@@ -50,4 +80,11 @@ subpaths
|
||||
| Test.java:99:3:99:34 | new File(...) | Test.java:95:14:95:34 | getHostName(...) : String | Test.java:99:12:99:33 | new URI(...) | This path depends on a $@. | Test.java:95:14:95:34 | getHostName(...) | user-provided value |
|
||||
| Test.java:100:3:100:46 | new File(...) | Test.java:95:14:95:34 | getHostName(...) : String | Test.java:100:12:100:45 | new URI(...) | This path depends on a $@. | Test.java:95:14:95:34 | getHostName(...) | user-provided value |
|
||||
| Test.java:101:3:101:55 | new File(...) | Test.java:95:14:95:34 | getHostName(...) : String | Test.java:101:12:101:54 | new URI(...) | This path depends on a $@. | Test.java:95:14:95:34 | getHostName(...) | user-provided value |
|
||||
| Test.java:107:46:107:46 | t | Test.java:105:14:105:34 | getHostName(...) : String | Test.java:107:46:107:46 | t | This path depends on a $@. | Test.java:105:14:105:34 | getHostName(...) | user-provided value |
|
||||
| mad/Test.java:17:52:17:72 | (...)... | mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:17:52:17:72 | (...)... | This path depends on a $@. | mad/Test.java:12:16:12:36 | getHostName(...) | user-provided value |
|
||||
| mad/Test.java:19:32:19:52 | (...)... | mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:19:32:19:52 | (...)... | This path depends on a $@. | mad/Test.java:12:16:12:36 | getHostName(...) | user-provided value |
|
||||
| mad/Test.java:25:31:25:49 | (...)... | mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:25:31:25:49 | (...)... | This path depends on a $@. | mad/Test.java:12:16:12:36 | getHostName(...) | user-provided value |
|
||||
| mad/Test.java:27:29:27:47 | (...)... | mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:27:29:27:47 | (...)... | This path depends on a $@. | mad/Test.java:12:16:12:36 | getHostName(...) | user-provided value |
|
||||
| mad/Test.java:29:24:29:42 | (...)... | mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:29:24:29:42 | (...)... | This path depends on a $@. | mad/Test.java:12:16:12:36 | getHostName(...) | user-provided value |
|
||||
| mad/Test.java:31:9:31:45 | new FileReader(...) | mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:31:24:31:44 | (...)... | This path depends on a $@. | mad/Test.java:12:16:12:36 | getHostName(...) | user-provided value |
|
||||
| mad/Test.java:33:41:33:61 | (...)... | mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:33:41:33:61 | (...)... | This path depends on a $@. | mad/Test.java:12:16:12:36 | getHostName(...) | user-provided value |
|
||||
| mad/Test.java:35:45:35:65 | (...)... | mad/Test.java:12:16:12:36 | getHostName(...) : String | mad/Test.java:35:45:35:65 | (...)... | This path depends on a $@. | mad/Test.java:12:16:12:36 | getHostName(...) | user-provided value |
|
||||
|
||||
@@ -101,9 +101,4 @@ class Test {
|
||||
new File(new URI(null, null, null, 0, t, null, null));
|
||||
}
|
||||
|
||||
void doGet6(InetAddress address) throws IOException {
|
||||
String t = address.getHostName();
|
||||
// BAD: accessing local resource with user input
|
||||
getClass().getModule().getResourceAsStream(t);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.URL;
|
||||
import org.codehaus.cargo.container.installer.ZipURLInstaller;
|
||||
|
||||
public class Test {
|
||||
|
||||
public Object source(InetAddress address) {
|
||||
return address.getHostName();
|
||||
}
|
||||
|
||||
void test(InetAddress address) throws IOException {
|
||||
// "java.lang;Module;true;getResourceAsStream;(String);;Argument[0];read-file;ai-generated"
|
||||
getClass().getModule().getResourceAsStream((String) source(null));
|
||||
// "java.lang;Class;false;getResource;(String);;Argument[0];read-file;ai-generated"
|
||||
getClass().getResource((String) source(null));
|
||||
// "java.lang;ClassLoader;true;getSystemResourceAsStream;(String);;Argument[0];read-file;ai-generated"
|
||||
ClassLoader.getSystemResource((String) source(null));
|
||||
// "java.io;File;true;createTempFile;(String,String,File);;Argument[2];create-file;ai-generated"
|
||||
File.createTempFile(";", (String) source(null));
|
||||
// "java.io;File;true;renameTo;(File);;Argument[0];create-file;ai-generated"
|
||||
new File("").renameTo((File) source(null));
|
||||
// "java.io;FileInputStream;true;FileInputStream;(File);;Argument[0];read-file;ai-generated"
|
||||
new FileInputStream((File) source(null));
|
||||
// "java.io;FileReader;true;FileReader;(File);;Argument[0];read-file;ai-generated"
|
||||
new FileReader((File) source(null));
|
||||
// "java.io;FileReader;true;FileReader;(String);;Argument[0];read-file;ai-generated"
|
||||
new FileReader((String) source(null));
|
||||
// "org.codehaus.cargo.container.installer;ZipURLInstaller;true;ZipURLInstaller;(URL,String,String);;Argument[1];create-file;ai-generated"
|
||||
new ZipURLInstaller((URL) null, (String) source(null), "");
|
||||
// "org.codehaus.cargo.container.installer;ZipURLInstaller;true;ZipURLInstaller;(URL,String,String);;Argument[2];create-file;ai-generated"
|
||||
new ZipURLInstaller((URL) null, "", (String) source(null));
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/servlet-api-2.4:${testdir}/../../../../../stubs/apache-commons-io-2.6
|
||||
// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/servlet-api-2.4:${testdir}/../../../../../stubs/apache-commons-io-2.6:${testdir}/../../../../../stubs/cargo
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
import org.apache.hadoop.hive.metastore.api.ColumnStatistics;
|
||||
import org.apache.hadoop.hive.metastore.api.DefaultConstraintsRequest;
|
||||
import org.apache.hadoop.hive.metastore.ObjectStore;
|
||||
import org.apache.hive.hcatalog.templeton.ColumnDesc;
|
||||
import org.apache.hive.hcatalog.templeton.HcatDelegator;
|
||||
import java.util.List;
|
||||
|
||||
public class Hive {
|
||||
|
||||
public static Object source() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void test(ObjectStore objStore, HcatDelegator hcatDel) throws Exception {
|
||||
{
|
||||
String taint = (String) source();
|
||||
new DefaultConstraintsRequest("", taint, ""); // $ sqlInjection
|
||||
}
|
||||
{
|
||||
ColumnStatistics taint = (ColumnStatistics) source();
|
||||
//objStore.updatePartitionColumnStatistics(taint, (List<String>) null, (String) null, 0L); // $ sqlInjection
|
||||
objStore.updatePartitionColumnStatistics(taint, (List<String>) null); // $ sqlInjection
|
||||
}
|
||||
{
|
||||
ColumnDesc taint = (ColumnDesc) source();
|
||||
hcatDel.addOneColumn(null, null, null, taint); // $ sqlInjection
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,7 @@
|
||||
| good | 4 | Test.java:126:20:126:88 | "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY=? ORDER BY PRICE" |
|
||||
| good | 5 | Test.java:127:62:127:67 | query2 |
|
||||
| good | 6 | Test.java:128:24:128:24 | 1 |
|
||||
| source | 1 | mad/Test.java:11:16:11:19 | null |
|
||||
| tableNames | 4 | Test.java:187:32:187:56 | "SELECT ITEM,PRICE FROM " |
|
||||
| tableNames | 5 | Test.java:188:8:188:55 | " WHERE ITEM_CATEGORY='Biscuits' ORDER BY PRICE" |
|
||||
| tableNames | 10 | Test.java:193:33:193:57 | "SELECT ITEM,PRICE FROM " |
|
||||
@@ -97,6 +98,18 @@
|
||||
| tainted | 58 | Test.java:87:8:87:15 | category |
|
||||
| tainted | 58 | Test.java:87:19:87:36 | "' ORDER BY PRICE" |
|
||||
| tainted | 59 | Test.java:88:47:88:52 | query1 |
|
||||
| test | 3 | mad/Test.java:17:24:17:25 | "" |
|
||||
| test | 3 | mad/Test.java:17:28:17:29 | "" |
|
||||
| test | 3 | mad/Test.java:17:39:17:40 | "" |
|
||||
| test | 4 | mad/Test.java:26:43:26:44 | "" |
|
||||
| test | 4 | mad/Test.java:26:54:26:55 | "" |
|
||||
| test | 5 | mad/Test.java:19:28:19:29 | "" |
|
||||
| test | 5 | mad/Test.java:19:32:19:33 | "" |
|
||||
| test | 13 | mad/Test.java:35:13:35:80 | updatePartitionColumnStatistics(...) |
|
||||
| test | 13 | mad/Test.java:35:76:35:79 | null |
|
||||
| test | 18 | mad/Test.java:40:34:40:37 | null |
|
||||
| test | 18 | mad/Test.java:40:40:40:43 | null |
|
||||
| test | 18 | mad/Test.java:40:46:40:49 | null |
|
||||
| unescaped | 4 | Test.java:96:28:96:81 | "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" |
|
||||
| unescaped | 5 | Test.java:97:23:97:40 | "' ORDER BY PRICE" |
|
||||
| unescaped | 11 | Test.java:103:19:103:72 | "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" |
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.util.List;
|
||||
import org.apache.hadoop.hive.metastore.api.ColumnStatistics;
|
||||
import org.apache.hadoop.hive.metastore.api.DefaultConstraintsRequest;
|
||||
import org.apache.hadoop.hive.metastore.ObjectStore;
|
||||
import org.apache.hive.hcatalog.templeton.HcatDelegator;
|
||||
import org.apache.hive.hcatalog.templeton.ColumnDesc;
|
||||
|
||||
public class Test {
|
||||
public static Object source() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void test(DatabaseMetaData dmd) throws Exception {
|
||||
String taint = (String) source();
|
||||
// java.sql;DatabaseMetaData;true;getColumns;(String,String,String,String);;Argument[2];sql;ai-generated
|
||||
dmd.getColumns("", "", taint, ""); // $ sqlInjection
|
||||
// java.sql;DatabaseMetaData;true;getPrimaryKeys;(String,String,String);;Argument[2];sql;ai-generated
|
||||
dmd.getPrimaryKeys("", "", taint); // $ sqlInjection
|
||||
}
|
||||
|
||||
public void test(ObjectStore objStore, HcatDelegator hcatDel) throws Exception {
|
||||
{
|
||||
String taint = (String) source();
|
||||
// "org.apache.hadoop.hive.metastore.api;DefaultConstraintsRequest;true;DefaultConstraintsRequest;(String,String,String);;Argument[1];sql;ai-generated"
|
||||
new DefaultConstraintsRequest("", taint, ""); // $ sqlInjection
|
||||
}
|
||||
{
|
||||
ColumnStatistics taint = (ColumnStatistics) source();
|
||||
// "org.apache.hadoop.hive.metastore;ObjectStore;true;updatePartitionColumnStatistics;(ColumnStatistics,List,String,long);;Argument[0];sql;ai-generated"
|
||||
// @formatter:off
|
||||
// objStore.updatePartitionColumnStatistics(taint, (List<String>) null, (String) null, 0L); // $ sqlInjection
|
||||
// @formatter:on
|
||||
// "org.apache.hadoop.hive.metastore;ObjectStore;true;updatePartitionColumnStatistics;(ColumnStatistics,List);;Argument[0];sql;ai-generated"
|
||||
objStore.updatePartitionColumnStatistics(taint, (List<String>) null); // $ sqlInjection
|
||||
}
|
||||
{
|
||||
ColumnDesc taint = (ColumnDesc) source();
|
||||
// "org.apache.hive.hcatalog.templeton;HcatDelegator;true;addOneColumn;(String,String,String,ColumnDesc);;Argument[3];sql;ai-generated"
|
||||
hcatDel.addOneColumn(null, null, null, taint); // $ sqlInjection
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ApkInstallation extends Activity {
|
||||
static final String APK_MIMETYPE = "application/vnd.android.package-archive";
|
||||
|
||||
public void installAPK(String path) {
|
||||
// BAD: the path is not checked
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(Uri.fromFile(new File(path)), "application/vnd.android.package-archive"); // $ hasApkInstallation
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void installAPK3(String path) {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setType(APK_MIMETYPE);
|
||||
// BAD: the path is not checked
|
||||
intent.setData(Uri.fromFile(new File(path))); // $ hasApkInstallation
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void installAPKFromExternalStorage(String path) {
|
||||
// BAD: file is from external storage
|
||||
File file = new File(Environment.getExternalStorageDirectory(), path);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(Uri.fromFile(file), APK_MIMETYPE); // $ hasApkInstallation
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void installAPKFromExternalStorageWithActionInstallPackage(String path) {
|
||||
// BAD: file is from external storage
|
||||
File file = new File(Environment.getExternalStorageDirectory(), path);
|
||||
Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
|
||||
intent.setData(Uri.fromFile(file)); // $ hasApkInstallation
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void installAPKInstallPackageLiteral(String path) {
|
||||
File file = new File(Environment.getExternalStorageDirectory(), path);
|
||||
Intent intent = new Intent("android.intent.action.INSTALL_PACKAGE");
|
||||
intent.setData(Uri.fromFile(file)); // $ hasApkInstallation
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void otherIntent(File file) {
|
||||
Intent intent = new Intent(this, OtherActivity.class);
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
// BAD: the file is from unknown source
|
||||
intent.setData(Uri.fromFile(file)); // $ hasApkInstallation
|
||||
}
|
||||
}
|
||||
|
||||
class OtherActivity extends Activity {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
import semmle.code.java.security.ArbitraryApkInstallationQuery
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class HasApkInstallationTest extends InlineExpectationsTest {
|
||||
HasApkInstallationTest() { this = "HasApkInstallationTest" }
|
||||
|
||||
override string getARelevantTag() { result = "hasApkInstallation" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "hasApkInstallation" and
|
||||
exists(DataFlow::Node sink | ApkInstallationFlow::hasFlowTo(sink) |
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/validation-api-2.0.1.Final:${testdir}/../../../stubs/springframework-5.3.8:${testdir}/../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../stubs/apache-commons-logging-1.2:${testdir}/../../../stubs/mvel2-2.4.7:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/scriptengine:${testdir}/../../../stubs/jsr223-api:${testdir}/../../../stubs/apache-freemarker-2.3.31:${testdir}/../../../stubs/jinjava-2.6.0:${testdir}/../../../stubs/pebble-3.1.5:${testdir}/../../../stubs/thymeleaf-3.0.14:${testdir}/../../../stubs/apache-velocity-2.3
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/validation-api-2.0.1.Final:${testdir}/../../../stubs/springframework-5.3.8:${testdir}/../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../stubs/apache-commons-logging-1.2:${testdir}/../../../stubs/mvel2-2.4.7:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/scriptengine:${testdir}/../../../stubs/jsr223-api:${testdir}/../../../stubs/apache-freemarker-2.3.31:${testdir}/../../../stubs/jinjava-2.6.0:${testdir}/../../../stubs/pebble-3.1.5:${testdir}/../../../stubs/thymeleaf-3.0.14:${testdir}/../../../stubs/apache-velocity-2.3:${testdir}/../../..//stubs/google-android-9.0.0
|
||||
|
||||
@@ -20,7 +20,7 @@ public class JdbcUrlSSRF extends HttpServlet {
|
||||
|
||||
String jdbcUrl = request.getParameter("jdbcUrl");
|
||||
Driver driver = new org.postgresql.Driver();
|
||||
DataSourceBuilder dsBuilder = new DataSourceBuilder();
|
||||
DataSourceBuilder dsBuilder = DataSourceBuilder.create();
|
||||
|
||||
try {
|
||||
driver.connect(jdbcUrl, null); // $ SSRF
|
||||
|
||||
22
java/ql/test/query-tests/security/CWE-918/mad/Test.java
Normal file
22
java/ql/test/query-tests/security/CWE-918/mad/Test.java
Normal file
@@ -0,0 +1,22 @@
|
||||
import java.net.URL;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javafx.scene.web.WebEngine;
|
||||
import org.codehaus.cargo.container.installer.ZipURLInstaller;
|
||||
|
||||
public class Test {
|
||||
|
||||
public static Object source(HttpServletRequest request) {
|
||||
return request.getParameter(null);
|
||||
}
|
||||
|
||||
public void test(WebEngine webEngine) {
|
||||
// "javafx.scene.web;WebEngine;false;load;(String);;Argument[0];open-url;ai-generated"
|
||||
webEngine.load((String) source(null)); // $ SSRF
|
||||
}
|
||||
|
||||
public void test() {
|
||||
// "org.codehaus.cargo.container.installer;ZipURLInstaller;true;ZipURLInstaller;(URL,String,String);;Argument[0];open-url:ai-generated"
|
||||
new ZipURLInstaller((URL) source(null), "", ""); // $ SSRF
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
//semmle-extractor-options: --javac-args -source 11 -target 11 -cp ${testdir}/../../../stubs/springframework-5.3.8:${testdir}/../../../stubs/javax-ws-rs-api-2.1.1:${testdir}/../../../stubs/javax-ws-rs-api-3.0.0:${testdir}/../../../stubs/apache-http-4.4.13/:${testdir}/../../../stubs/servlet-api-2.4/:${testdir}/../../../stubs/projectreactor-3.4.3/:${testdir}/../../../stubs/postgresql-42.3.3/:${testdir}/../../../stubs/HikariCP-3.4.5/:${testdir}/../../../stubs/spring-jdbc-5.3.8/:${testdir}/../../../stubs/jdbi3-core-3.27.2/
|
||||
//semmle-extractor-options: --javac-args -source 11 -target 11 -cp ${testdir}/../../../stubs/springframework-5.3.8:${testdir}/../../../stubs/javax-ws-rs-api-2.1.1:${testdir}/../../../stubs/javax-ws-rs-api-3.0.0:${testdir}/../../../stubs/apache-http-4.4.13/:${testdir}/../../../stubs/servlet-api-2.4/:${testdir}/../../../stubs/projectreactor-3.4.3/:${testdir}/../../../stubs/postgresql-42.3.3/:${testdir}/../../../stubs/HikariCP-3.4.5/:${testdir}/../../../stubs/spring-jdbc-5.3.8/:${testdir}/../../../stubs/jdbi3-core-3.27.2/:${testdir}/../../../stubs/cargo:${testdir}/../../../stubs/javafx-web
|
||||
|
||||
|
||||
14
java/ql/test/stubs/apache-commons-compress/org/apache/commons/compress/archivers/ArchiveEntry.java
generated
Normal file
14
java/ql/test/stubs/apache-commons-compress/org/apache/commons/compress/archivers/ArchiveEntry.java
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// Generated automatically from org.apache.commons.compress.archivers.ArchiveEntry for testing purposes
|
||||
|
||||
package org.apache.commons.compress.archivers;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface ArchiveEntry
|
||||
{
|
||||
Date getLastModifiedDate();
|
||||
String getName();
|
||||
boolean isDirectory();
|
||||
long getSize();
|
||||
static long SIZE_UNKNOWN = 0;
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
// Generated automatically from org.apache.commons.compress.archivers.tar.TarArchiveEntry for testing purposes
|
||||
|
||||
package org.apache.commons.compress.archivers.tar;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import org.apache.commons.compress.archivers.ArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.tar.TarConstants;
|
||||
import org.apache.commons.compress.archivers.zip.ZipEncoding;
|
||||
|
||||
public class TarArchiveEntry implements ArchiveEntry, TarConstants
|
||||
{
|
||||
protected TarArchiveEntry() {}
|
||||
public Date getLastModifiedDate(){ return null; }
|
||||
public Date getModTime(){ return null; }
|
||||
public File getFile(){ return null; }
|
||||
public Map<String, String> getExtraPaxHeaders(){ return null; }
|
||||
public String getExtraPaxHeader(String p0){ return null; }
|
||||
public String getGroupName(){ return null; }
|
||||
public String getLinkName(){ return null; }
|
||||
public String getName(){ return null; }
|
||||
public String getUserName(){ return null; }
|
||||
public TarArchiveEntry(File p0){}
|
||||
public TarArchiveEntry(File p0, String p1){}
|
||||
public TarArchiveEntry(String p0){}
|
||||
public TarArchiveEntry(String p0, boolean p1){}
|
||||
public TarArchiveEntry(String p0, byte p1){}
|
||||
public TarArchiveEntry(String p0, byte p1, boolean p2){}
|
||||
public TarArchiveEntry(byte[] p0){}
|
||||
public TarArchiveEntry(byte[] p0, ZipEncoding p1){}
|
||||
public TarArchiveEntry(byte[] p0, ZipEncoding p1, boolean p2){}
|
||||
public TarArchiveEntry[] getDirectoryEntries(){ return null; }
|
||||
public boolean equals(Object p0){ return false; }
|
||||
public boolean equals(TarArchiveEntry p0){ return false; }
|
||||
public boolean isBlockDevice(){ return false; }
|
||||
public boolean isCharacterDevice(){ return false; }
|
||||
public boolean isCheckSumOK(){ return false; }
|
||||
public boolean isDescendent(TarArchiveEntry p0){ return false; }
|
||||
public boolean isDirectory(){ return false; }
|
||||
public boolean isExtended(){ return false; }
|
||||
public boolean isFIFO(){ return false; }
|
||||
public boolean isFile(){ return false; }
|
||||
public boolean isGNULongLinkEntry(){ return false; }
|
||||
public boolean isGNULongNameEntry(){ return false; }
|
||||
public boolean isGNUSparse(){ return false; }
|
||||
public boolean isGlobalPaxHeader(){ return false; }
|
||||
public boolean isLink(){ return false; }
|
||||
public boolean isOldGNUSparse(){ return false; }
|
||||
public boolean isPaxGNUSparse(){ return false; }
|
||||
public boolean isPaxHeader(){ return false; }
|
||||
public boolean isSparse(){ return false; }
|
||||
public boolean isStarSparse(){ return false; }
|
||||
public boolean isSymbolicLink(){ return false; }
|
||||
public int getDevMajor(){ return 0; }
|
||||
public int getDevMinor(){ return 0; }
|
||||
public int getGroupId(){ return 0; }
|
||||
public int getMode(){ return 0; }
|
||||
public int getUserId(){ return 0; }
|
||||
public int hashCode(){ return 0; }
|
||||
public long getLongGroupId(){ return 0; }
|
||||
public long getLongUserId(){ return 0; }
|
||||
public long getRealSize(){ return 0; }
|
||||
public long getSize(){ return 0; }
|
||||
public static int DEFAULT_DIR_MODE = 0;
|
||||
public static int DEFAULT_FILE_MODE = 0;
|
||||
public static int MAX_NAMELEN = 0;
|
||||
public static int MILLIS_PER_SECOND = 0;
|
||||
public static long UNKNOWN = 0;
|
||||
public void addPaxHeader(String p0, String p1){}
|
||||
public void clearExtraPaxHeaders(){}
|
||||
public void parseTarHeader(byte[] p0){}
|
||||
public void parseTarHeader(byte[] p0, ZipEncoding p1){}
|
||||
public void setDevMajor(int p0){}
|
||||
public void setDevMinor(int p0){}
|
||||
public void setGroupId(int p0){}
|
||||
public void setGroupId(long p0){}
|
||||
public void setGroupName(String p0){}
|
||||
public void setIds(int p0, int p1){}
|
||||
public void setLinkName(String p0){}
|
||||
public void setModTime(Date p0){}
|
||||
public void setModTime(long p0){}
|
||||
public void setMode(int p0){}
|
||||
public void setName(String p0){}
|
||||
public void setNames(String p0, String p1){}
|
||||
public void setSize(long p0){}
|
||||
public void setUserId(int p0){}
|
||||
public void setUserId(long p0){}
|
||||
public void setUserName(String p0){}
|
||||
public void writeEntryHeader(byte[] p0){}
|
||||
public void writeEntryHeader(byte[] p0, ZipEncoding p1, boolean p2){}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// Generated automatically from org.apache.commons.compress.archivers.tar.TarConstants for testing purposes
|
||||
|
||||
package org.apache.commons.compress.archivers.tar;
|
||||
|
||||
|
||||
public interface TarConstants
|
||||
{
|
||||
static String GNU_LONGLINK = null;
|
||||
static String MAGIC_ANT = null;
|
||||
static String MAGIC_GNU = null;
|
||||
static String MAGIC_POSIX = null;
|
||||
static String MAGIC_XSTAR = null;
|
||||
static String VERSION_ANT = null;
|
||||
static String VERSION_GNU_SPACE = null;
|
||||
static String VERSION_GNU_ZERO = null;
|
||||
static String VERSION_POSIX = null;
|
||||
static byte LF_BLK = 0;
|
||||
static byte LF_CHR = 0;
|
||||
static byte LF_CONTIG = 0;
|
||||
static byte LF_DIR = 0;
|
||||
static byte LF_FIFO = 0;
|
||||
static byte LF_GNUTYPE_LONGLINK = 0;
|
||||
static byte LF_GNUTYPE_LONGNAME = 0;
|
||||
static byte LF_GNUTYPE_SPARSE = 0;
|
||||
static byte LF_LINK = 0;
|
||||
static byte LF_NORMAL = 0;
|
||||
static byte LF_OLDNORM = 0;
|
||||
static byte LF_PAX_EXTENDED_HEADER_LC = 0;
|
||||
static byte LF_PAX_EXTENDED_HEADER_UC = 0;
|
||||
static byte LF_PAX_GLOBAL_EXTENDED_HEADER = 0;
|
||||
static byte LF_SYMLINK = 0;
|
||||
static int ATIMELEN_GNU = 0;
|
||||
static int ATIMELEN_XSTAR = 0;
|
||||
static int CHKSUMLEN = 0;
|
||||
static int CHKSUM_OFFSET = 0;
|
||||
static int CTIMELEN_GNU = 0;
|
||||
static int CTIMELEN_XSTAR = 0;
|
||||
static int DEFAULT_BLKSIZE = 0;
|
||||
static int DEFAULT_RCDSIZE = 0;
|
||||
static int DEVLEN = 0;
|
||||
static int FORMAT_OLDGNU = 0;
|
||||
static int FORMAT_POSIX = 0;
|
||||
static int FORMAT_XSTAR = 0;
|
||||
static int GIDLEN = 0;
|
||||
static int GNAMELEN = 0;
|
||||
static int ISEXTENDEDLEN_GNU = 0;
|
||||
static int ISEXTENDEDLEN_GNU_SPARSE = 0;
|
||||
static int LONGNAMESLEN_GNU = 0;
|
||||
static int MAGICLEN = 0;
|
||||
static int MAGIC_OFFSET = 0;
|
||||
static int MODELEN = 0;
|
||||
static int MODTIMELEN = 0;
|
||||
static int NAMELEN = 0;
|
||||
static int OFFSETLEN_GNU = 0;
|
||||
static int PAD2LEN_GNU = 0;
|
||||
static int PREFIXLEN = 0;
|
||||
static int PREFIXLEN_XSTAR = 0;
|
||||
static int REALSIZELEN_GNU = 0;
|
||||
static int SIZELEN = 0;
|
||||
static int SPARSELEN_GNU = 0;
|
||||
static int SPARSELEN_GNU_SPARSE = 0;
|
||||
static int UIDLEN = 0;
|
||||
static int UNAMELEN = 0;
|
||||
static int VERSIONLEN = 0;
|
||||
static int VERSION_OFFSET = 0;
|
||||
static int XSTAR_MAGIC_LEN = 0;
|
||||
static int XSTAR_MAGIC_OFFSET = 0;
|
||||
static long MAXID = 0;
|
||||
static long MAXSIZE = 0;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Generated automatically from org.apache.commons.compress.archivers.zip.ZipEncoding for testing purposes
|
||||
|
||||
package org.apache.commons.compress.archivers.zip;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public interface ZipEncoding
|
||||
{
|
||||
ByteBuffer encode(String p0);
|
||||
String decode(byte[] p0);
|
||||
boolean canEncode(String p0);
|
||||
}
|
||||
@@ -1,53 +1,11 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
// Generated automatically from org.apache.http.Header for testing purposes
|
||||
|
||||
package org.apache.http;
|
||||
|
||||
/**
|
||||
* Represents an HTTP header field.
|
||||
*
|
||||
* <p>The HTTP header fields follow the same generic format as
|
||||
* that given in Section 3.1 of RFC 822. Each header field consists
|
||||
* of a name followed by a colon (":") and the field value. Field names
|
||||
* are case-insensitive. The field value MAY be preceded by any amount
|
||||
* of LWS, though a single SP is preferred.
|
||||
*
|
||||
*<pre>
|
||||
* message-header = field-name ":" [ field-value ]
|
||||
* field-name = token
|
||||
* field-value = *( field-content | LWS )
|
||||
* field-content = <the OCTETs making up the field-value
|
||||
* and consisting of either *TEXT or combinations
|
||||
* of token, separators, and quoted-string>
|
||||
*</pre>
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public interface Header extends NameValuePair {
|
||||
HeaderElement[] getElements() throws ParseException;
|
||||
import org.apache.http.HeaderElement;
|
||||
import org.apache.http.NameValuePair;
|
||||
|
||||
public interface Header extends NameValuePair
|
||||
{
|
||||
HeaderElement[] getElements();
|
||||
}
|
||||
|
||||
@@ -1,65 +1,15 @@
|
||||
/*
|
||||
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HeaderElement.java $
|
||||
* $Revision: 569828 $
|
||||
* $Date: 2007-08-26 08:49:38 -0700 (Sun, 26 Aug 2007) $
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
// Generated automatically from org.apache.http.HeaderElement for testing purposes
|
||||
|
||||
package org.apache.http;
|
||||
|
||||
/**
|
||||
* One element of an HTTP {@link Header header} value.
|
||||
*
|
||||
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
|
||||
*
|
||||
*
|
||||
* <!-- empty lines above to avoid 'svn diff' context problems -->
|
||||
* @version $Revision: 569828 $ $Date: 2007-08-26 08:49:38 -0700 (Sun, 26 Aug
|
||||
* 2007) $
|
||||
*
|
||||
* @since 4.0
|
||||
*
|
||||
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
|
||||
* visit <a href=
|
||||
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
|
||||
* webpage</a> for further details.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface HeaderElement {
|
||||
|
||||
String getName();
|
||||
|
||||
String getValue();
|
||||
import org.apache.http.NameValuePair;
|
||||
|
||||
public interface HeaderElement
|
||||
{
|
||||
NameValuePair getParameter(int p0);
|
||||
NameValuePair getParameterByName(String p0);
|
||||
NameValuePair[] getParameters();
|
||||
|
||||
NameValuePair getParameterByName(String name);
|
||||
|
||||
String getName();
|
||||
String getValue();
|
||||
int getParameterCount();
|
||||
|
||||
NameValuePair getParameter(int index);
|
||||
}
|
||||
|
||||
@@ -1,33 +1,4 @@
|
||||
/*
|
||||
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpEntity.java $
|
||||
* $Revision: 645824 $
|
||||
* $Date: 2008-04-08 03:12:41 -0700 (Tue, 08 Apr 2008) $
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
// Generated automatically from org.apache.http.HttpEntity for testing purposes
|
||||
|
||||
package org.apache.http;
|
||||
|
||||
@@ -35,152 +6,15 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* An entity that can be sent or received with an HTTP message. Entities can be
|
||||
* found in some {@link HttpEntityEnclosingRequest requests} and in
|
||||
* {@link HttpResponse responses}, where they are optional.
|
||||
* <p>
|
||||
* In some places, the JavaDoc distinguishes three kinds of entities, depending
|
||||
* on where their {@link #getContent content} originates:
|
||||
* <ul>
|
||||
* <li><b>streamed</b>: The content is received from a stream, or generated on
|
||||
* the fly. In particular, this category includes entities being received from a
|
||||
* {@link HttpConnection connection}. {@link #isStreaming Streamed} entities are
|
||||
* generally not {@link #isRepeatable repeatable}.</li>
|
||||
* <li><b>self-contained</b>: The content is in memory or obtained by means that
|
||||
* are independent from a connection or other entity. Self-contained entities
|
||||
* are generally {@link #isRepeatable repeatable}.</li>
|
||||
* <li><b>wrapping</b>: The content is obtained from another entity.</li>
|
||||
* </ul>
|
||||
* This distinction is important for connection management with incoming
|
||||
* entities. For entities that are created by an application and only sent using
|
||||
* the HTTP components framework, the difference between streamed and
|
||||
* self-contained is of little importance. In that case, it is suggested to
|
||||
* consider non-repeatable entities as streamed, and those that are repeatable
|
||||
* (without a huge effort) as self-contained.
|
||||
*
|
||||
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
|
||||
*
|
||||
* @version $Revision: 645824 $
|
||||
*
|
||||
* @since 4.0
|
||||
*
|
||||
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
|
||||
* visit <a href=
|
||||
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
|
||||
* webpage</a> for further details.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface HttpEntity {
|
||||
|
||||
/**
|
||||
* Tells if the entity is capable to produce its data more than once. A
|
||||
* repeatable entity's getContent() and writeTo(OutputStream) methods can be
|
||||
* called more than once whereas a non-repeatable entity's can not.
|
||||
*
|
||||
* @return true if the entity is repeatable, false otherwise.
|
||||
*/
|
||||
boolean isRepeatable();
|
||||
|
||||
/**
|
||||
* Tells about chunked encoding for this entity. The primary purpose of this
|
||||
* method is to indicate whether chunked encoding should be used when the entity
|
||||
* is sent. For entities that are received, it can also indicate whether the
|
||||
* entity was received with chunked encoding. <br/>
|
||||
* The behavior of wrapping entities is implementation dependent, but should
|
||||
* respect the primary purpose.
|
||||
*
|
||||
* @return <code>true</code> if chunked encoding is preferred for this entity,
|
||||
* or <code>false</code> if it is not
|
||||
*/
|
||||
boolean isChunked();
|
||||
|
||||
/**
|
||||
* Tells the length of the content, if known.
|
||||
*
|
||||
* @return the number of bytes of the content, or a negative number if unknown.
|
||||
* If the content length is known but exceeds
|
||||
* {@link java.lang.Long#MAX_VALUE Long.MAX_VALUE}, a negative number is
|
||||
* returned.
|
||||
*/
|
||||
long getContentLength();
|
||||
|
||||
/**
|
||||
* Obtains the Content-Type header, if known. This is the header that should be
|
||||
* used when sending the entity, or the one that was received with the entity.
|
||||
* It can include a charset attribute.
|
||||
*
|
||||
* @return the Content-Type header for this entity, or <code>null</code> if the
|
||||
* content type is unknown
|
||||
*/
|
||||
Header getContentType();
|
||||
|
||||
/**
|
||||
* Obtains the Content-Encoding header, if known. This is the header that should
|
||||
* be used when sending the entity, or the one that was received with the
|
||||
* entity. Wrapping entities that modify the content encoding should adjust this
|
||||
* header accordingly.
|
||||
*
|
||||
* @return the Content-Encoding header for this entity, or <code>null</code> if
|
||||
* the content encoding is unknown
|
||||
*/
|
||||
public interface HttpEntity
|
||||
{
|
||||
Header getContentEncoding();
|
||||
|
||||
/**
|
||||
* Creates a new InputStream object of the entity. It is a programming error to
|
||||
* return the same InputStream object more than once. Entities that are not
|
||||
* {@link #isRepeatable repeatable} will throw an exception if this method is
|
||||
* called multiple times.
|
||||
*
|
||||
* @return a new input stream that returns the entity data.
|
||||
*
|
||||
* @throws IOException if the stream could not be created
|
||||
* @throws IllegalStateException if this entity is not repeatable and the stream
|
||||
* has already been obtained previously
|
||||
*/
|
||||
Header getContentType();
|
||||
InputStream getContent() throws IOException, IllegalStateException;
|
||||
|
||||
/**
|
||||
* Writes the entity content to the output stream.
|
||||
*
|
||||
* @param outstream the output stream to write entity content to
|
||||
*
|
||||
* @throws IOException if an I/O error occurs
|
||||
*/
|
||||
void writeTo(OutputStream outstream) throws IOException;
|
||||
|
||||
/**
|
||||
* Tells whether this entity depends on an underlying stream. Streamed entities
|
||||
* should return <code>true</code> until the content has been consumed,
|
||||
* <code>false</code> afterwards. Self-contained entities should return
|
||||
* <code>false</code>. Wrapping entities should delegate this call to the
|
||||
* wrapped entity. <br/>
|
||||
* The content of a streamed entity is consumed when the stream returned by
|
||||
* {@link #getContent getContent} has been read to EOF, or after
|
||||
* {@link #consumeContent consumeContent} has been called. If a streamed entity
|
||||
* can not detect whether the stream has been read to EOF, it should return
|
||||
* <code>true</code> until {@link #consumeContent consumeContent} is called.
|
||||
*
|
||||
* @return <code>true</code> if the entity content is streamed and not yet
|
||||
* consumed, <code>false</code> otherwise
|
||||
*/
|
||||
boolean isStreaming(); // don't expect an exception here
|
||||
|
||||
/**
|
||||
* TODO: The name of this method is misnomer. It will be renamed to #finish() in
|
||||
* the next major release. <br/>
|
||||
* This method is called to indicate that the content of this entity is no
|
||||
* longer required. All entity implementations are expected to release all
|
||||
* allocated resources as a result of this method invocation. Content streaming
|
||||
* entities are also expected to dispose of the remaining content, if any.
|
||||
* Wrapping entities should delegate this call to the wrapped entity. <br/>
|
||||
* This method is of particular importance for entities being received from a
|
||||
* {@link HttpConnection connection}. The entity needs to be consumed completely
|
||||
* in order to re-use the connection with keep-alive.
|
||||
*
|
||||
* @throws IOException if an I/O error occurs. This indicates that connection
|
||||
* keep-alive is not possible.
|
||||
*/
|
||||
boolean isChunked();
|
||||
boolean isRepeatable();
|
||||
boolean isStreaming();
|
||||
long getContentLength();
|
||||
void consumeContent() throws IOException;
|
||||
|
||||
} // interface HttpEntity
|
||||
void writeTo(OutputStream outstream) throws IOException;
|
||||
}
|
||||
|
||||
@@ -1,124 +1,10 @@
|
||||
/*
|
||||
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/NameValuePair.java $
|
||||
* $Revision: 496070 $
|
||||
* $Date: 2007-01-14 04:18:34 -0800 (Sun, 14 Jan 2007) $
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
// Generated automatically from org.apache.http.NameValuePair for testing purposes
|
||||
|
||||
package org.apache.http;
|
||||
|
||||
/**
|
||||
* A simple class encapsulating an attribute/value pair.
|
||||
* <p>
|
||||
* This class comforms to the generic grammar and formatting rules outlined in
|
||||
* the <a href=
|
||||
* "http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2">Section
|
||||
* 2.2</a> and <a href=
|
||||
* "http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6">Section
|
||||
* 3.6</a> of <a href="http://www.w3.org/Protocols/rfc2616/rfc2616.txt">RFC
|
||||
* 2616</a>
|
||||
* </p>
|
||||
* <h>2.2 Basic Rules</h>
|
||||
* <p>
|
||||
* The following rules are used throughout this specification to describe basic
|
||||
* parsing constructs. The US-ASCII coded character set is defined by ANSI
|
||||
* X3.4-1986.
|
||||
* </p>
|
||||
*
|
||||
* <pre>
|
||||
* OCTET = <any 8-bit sequence of data>
|
||||
* CHAR = <any US-ASCII character (octets 0 - 127)>
|
||||
* UPALPHA = <any US-ASCII uppercase letter "A".."Z">
|
||||
* LOALPHA = <any US-ASCII lowercase letter "a".."z">
|
||||
* ALPHA = UPALPHA | LOALPHA
|
||||
* DIGIT = <any US-ASCII digit "0".."9">
|
||||
* CTL = <any US-ASCII control character
|
||||
* (octets 0 - 31) and DEL (127)>
|
||||
* CR = <US-ASCII CR, carriage return (13)>
|
||||
* LF = <US-ASCII LF, linefeed (10)>
|
||||
* SP = <US-ASCII SP, space (32)>
|
||||
* HT = <US-ASCII HT, horizontal-tab (9)>
|
||||
* <"> = <US-ASCII double-quote mark (34)>
|
||||
* </pre>
|
||||
* <p>
|
||||
* Many HTTP/1.1 header field values consist of words separated by LWS or
|
||||
* special characters. These special characters MUST be in a quoted string to be
|
||||
* used within a parameter value (as defined in section 3.6).
|
||||
* <p>
|
||||
*
|
||||
* <pre>
|
||||
* token = 1*<any CHAR except CTLs or separators>
|
||||
* separators = "(" | ")" | "<" | ">" | "@"
|
||||
* | "," | ";" | ":" | "\" | <">
|
||||
* | "/" | "[" | "]" | "?" | "="
|
||||
* | "{" | "}" | SP | HT
|
||||
* </pre>
|
||||
* <p>
|
||||
* A string of text is parsed as a single word if it is quoted using
|
||||
* double-quote marks.
|
||||
* </p>
|
||||
*
|
||||
* <pre>
|
||||
* quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
|
||||
* qdtext = <any TEXT except <">>
|
||||
* </pre>
|
||||
* <p>
|
||||
* The backslash character ("\") MAY be used as a single-character quoting
|
||||
* mechanism only within quoted-string and comment constructs.
|
||||
* </p>
|
||||
*
|
||||
* <pre>
|
||||
* quoted-pair = "\" CHAR
|
||||
* </pre>
|
||||
*
|
||||
* <h>3.6 Transfer Codings</h>
|
||||
* <p>
|
||||
* Parameters are in the form of attribute/value pairs.
|
||||
* </p>
|
||||
*
|
||||
* <pre>
|
||||
* parameter = attribute "=" value
|
||||
* attribute = token
|
||||
* value = token | quoted-string
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="mailto:oleg at ural.com">Oleg Kalnichevski</a>
|
||||
*
|
||||
*
|
||||
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
|
||||
* visit <a href=
|
||||
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
|
||||
* webpage</a> for further details.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface NameValuePair {
|
||||
|
||||
public interface NameValuePair
|
||||
{
|
||||
String getName();
|
||||
|
||||
String getValue();
|
||||
|
||||
}
|
||||
|
||||
51
java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/utils/URIBuilder.java
generated
Normal file
51
java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/utils/URIBuilder.java
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
// Generated automatically from org.apache.http.client.utils.URIBuilder for testing purposes
|
||||
|
||||
package org.apache.http.client.utils;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
import org.apache.http.NameValuePair;
|
||||
|
||||
public class URIBuilder
|
||||
{
|
||||
public Charset getCharset(){ return null; }
|
||||
public List<NameValuePair> getQueryParams(){ return null; }
|
||||
public List<String> getPathSegments(){ return null; }
|
||||
public String getFragment(){ return null; }
|
||||
public String getHost(){ return null; }
|
||||
public String getPath(){ return null; }
|
||||
public String getScheme(){ return null; }
|
||||
public String getUserInfo(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public URI build(){ return null; }
|
||||
public URIBuilder addParameter(String p0, String p1){ return null; }
|
||||
public URIBuilder addParameters(List<NameValuePair> p0){ return null; }
|
||||
public URIBuilder clearParameters(){ return null; }
|
||||
public URIBuilder removeQuery(){ return null; }
|
||||
public URIBuilder setCharset(Charset p0){ return null; }
|
||||
public URIBuilder setCustomQuery(String p0){ return null; }
|
||||
public URIBuilder setFragment(String p0){ return null; }
|
||||
public URIBuilder setHost(String p0){ return null; }
|
||||
public URIBuilder setParameter(String p0, String p1){ return null; }
|
||||
public URIBuilder setParameters(List<NameValuePair> p0){ return null; }
|
||||
public URIBuilder setParameters(NameValuePair... p0){ return null; }
|
||||
public URIBuilder setPath(String p0){ return null; }
|
||||
public URIBuilder setPathSegments(List<String> p0){ return null; }
|
||||
public URIBuilder setPathSegments(String... p0){ return null; }
|
||||
public URIBuilder setPort(int p0){ return null; }
|
||||
public URIBuilder setQuery(String p0){ return null; }
|
||||
public URIBuilder setScheme(String p0){ return null; }
|
||||
public URIBuilder setUserInfo(String p0){ return null; }
|
||||
public URIBuilder setUserInfo(String p0, String p1){ return null; }
|
||||
public URIBuilder(){}
|
||||
public URIBuilder(String p0){}
|
||||
public URIBuilder(String p0, Charset p1){}
|
||||
public URIBuilder(URI p0){}
|
||||
public URIBuilder(URI p0, Charset p1){}
|
||||
public boolean isAbsolute(){ return false; }
|
||||
public boolean isOpaque(){ return false; }
|
||||
public boolean isPathEmpty(){ return false; }
|
||||
public boolean isQueryEmpty(){ return false; }
|
||||
public int getPort(){ return 0; }
|
||||
}
|
||||
34
java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/utils/URLEncodedUtils.java
generated
Normal file
34
java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/utils/URLEncodedUtils.java
generated
Normal file
@@ -0,0 +1,34 @@
|
||||
// Generated automatically from org.apache.http.client.utils.URLEncodedUtils for testing purposes
|
||||
|
||||
package org.apache.http.client.utils;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.util.CharArrayBuffer;
|
||||
|
||||
public class URLEncodedUtils
|
||||
{
|
||||
public URLEncodedUtils(){}
|
||||
public static List<NameValuePair> parse(CharArrayBuffer p0, Charset p1, char... p2){ return null; }
|
||||
public static List<NameValuePair> parse(HttpEntity p0){ return null; }
|
||||
public static List<NameValuePair> parse(String p0, Charset p1){ return null; }
|
||||
public static List<NameValuePair> parse(String p0, Charset p1, char... p2){ return null; }
|
||||
public static List<NameValuePair> parse(URI p0, Charset p1){ return null; }
|
||||
public static List<NameValuePair> parse(URI p0, String p1){ return null; }
|
||||
public static List<String> parsePathSegments(CharSequence p0){ return null; }
|
||||
public static List<String> parsePathSegments(CharSequence p0, Charset p1){ return null; }
|
||||
public static String CONTENT_TYPE = null;
|
||||
public static String format(Iterable<? extends NameValuePair> p0, Charset p1){ return null; }
|
||||
public static String format(Iterable<? extends NameValuePair> p0, char p1, Charset p2){ return null; }
|
||||
public static String format(List<? extends NameValuePair> p0, String p1){ return null; }
|
||||
public static String format(List<? extends NameValuePair> p0, char p1, String p2){ return null; }
|
||||
public static String formatSegments(Iterable<String> p0, Charset p1){ return null; }
|
||||
public static String formatSegments(String... p0){ return null; }
|
||||
public static boolean isEncoded(HttpEntity p0){ return false; }
|
||||
public static void parse(List<NameValuePair> p0, Scanner p1, String p2){}
|
||||
public static void parse(List<NameValuePair> p0, Scanner p1, String p2, String p3){}
|
||||
}
|
||||
@@ -1,93 +1,28 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
// Generated automatically from org.apache.http.util.ByteArrayBuffer for testing purposes
|
||||
|
||||
package org.apache.http.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.http.util.CharArrayBuffer;
|
||||
|
||||
public final class ByteArrayBuffer implements Serializable {
|
||||
public ByteArrayBuffer(final int capacity) {
|
||||
}
|
||||
|
||||
public void append(final byte[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final int b) {
|
||||
}
|
||||
|
||||
public void append(final char[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
}
|
||||
|
||||
public byte[] toByteArray() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int byteAt(final int i) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int capacity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int length() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ensureCapacity(final int required) {
|
||||
}
|
||||
|
||||
public byte[] buffer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setLength(final int len) {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int indexOf(final byte b, final int from, final int to) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int indexOf(final byte b) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public class ByteArrayBuffer implements Serializable
|
||||
{
|
||||
protected ByteArrayBuffer() {}
|
||||
public ByteArrayBuffer(int p0){}
|
||||
public boolean isEmpty(){ return false; }
|
||||
public boolean isFull(){ return false; }
|
||||
public byte[] buffer(){ return null; }
|
||||
public byte[] toByteArray(){ return null; }
|
||||
public int byteAt(int p0){ return 0; }
|
||||
public int capacity(){ return 0; }
|
||||
public int indexOf(byte p0){ return 0; }
|
||||
public int indexOf(byte p0, int p1, int p2){ return 0; }
|
||||
public int length(){ return 0; }
|
||||
public void append(CharArrayBuffer p0, int p1, int p2){}
|
||||
public void append(byte[] p0, int p1, int p2){}
|
||||
public void append(char[] p0, int p1, int p2){}
|
||||
public void append(int p0){}
|
||||
public void clear(){}
|
||||
public void ensureCapacity(int p0){}
|
||||
public void setLength(int p0){}
|
||||
}
|
||||
|
||||
@@ -1,127 +1,36 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
// Generated automatically from org.apache.http.util.CharArrayBuffer for testing purposes
|
||||
|
||||
package org.apache.http.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.CharBuffer;
|
||||
|
||||
|
||||
public final class CharArrayBuffer implements CharSequence, Serializable {
|
||||
public CharArrayBuffer(final int capacity) {
|
||||
}
|
||||
|
||||
public void append(final char[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final String str) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b) {
|
||||
}
|
||||
|
||||
public void append(final char ch) {
|
||||
}
|
||||
|
||||
public void append(final byte[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final ByteArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final Object obj) {
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
}
|
||||
|
||||
public char[] toCharArray() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public char charAt(final int i) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public char[] buffer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int capacity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int length() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ensureCapacity(final int required) {
|
||||
}
|
||||
|
||||
public void setLength(final int len) {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int indexOf(final int ch, final int from, final int to) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int indexOf(final int ch) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String substring(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String substringTrimmed(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence subSequence(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
import org.apache.http.util.ByteArrayBuffer;
|
||||
|
||||
public class CharArrayBuffer implements CharSequence, Serializable
|
||||
{
|
||||
protected CharArrayBuffer() {}
|
||||
public CharArrayBuffer(int p0){}
|
||||
public CharSequence subSequence(int p0, int p1){ return null; }
|
||||
public String substring(int p0, int p1){ return null; }
|
||||
public String substringTrimmed(int p0, int p1){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean isEmpty(){ return false; }
|
||||
public boolean isFull(){ return false; }
|
||||
public char charAt(int p0){ return '0'; }
|
||||
public char[] buffer(){ return null; }
|
||||
public char[] toCharArray(){ return null; }
|
||||
public int capacity(){ return 0; }
|
||||
public int indexOf(int p0){ return 0; }
|
||||
public int indexOf(int p0, int p1, int p2){ return 0; }
|
||||
public int length(){ return 0; }
|
||||
public void append(ByteArrayBuffer p0, int p1, int p2){}
|
||||
public void append(CharArrayBuffer p0){}
|
||||
public void append(CharArrayBuffer p0, int p1, int p2){}
|
||||
public void append(Object p0){}
|
||||
public void append(String p0){}
|
||||
public void append(byte[] p0, int p1, int p2){}
|
||||
public void append(char p0){}
|
||||
public void append(char[] p0, int p1, int p2){}
|
||||
public void clear(){}
|
||||
public void ensureCapacity(int p0){}
|
||||
public void setLength(int p0){}
|
||||
}
|
||||
|
||||
11
java/ql/test/stubs/cargo/org/codehaus/cargo/container/installer/Installer.java
generated
Normal file
11
java/ql/test/stubs/cargo/org/codehaus/cargo/container/installer/Installer.java
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
// Generated automatically from org.codehaus.cargo.container.installer.Installer for testing purposes
|
||||
|
||||
package org.codehaus.cargo.container.installer;
|
||||
|
||||
import org.codehaus.cargo.util.log.Loggable;
|
||||
|
||||
public interface Installer extends Loggable
|
||||
{
|
||||
String getHome();
|
||||
void install();
|
||||
}
|
||||
23
java/ql/test/stubs/cargo/org/codehaus/cargo/container/installer/Proxy.java
generated
Normal file
23
java/ql/test/stubs/cargo/org/codehaus/cargo/container/installer/Proxy.java
generated
Normal file
@@ -0,0 +1,23 @@
|
||||
// Generated automatically from org.codehaus.cargo.container.installer.Proxy for testing purposes
|
||||
|
||||
package org.codehaus.cargo.container.installer;
|
||||
|
||||
import java.util.Map;
|
||||
import org.codehaus.cargo.util.log.LoggedObject;
|
||||
|
||||
public class Proxy extends LoggedObject
|
||||
{
|
||||
public Map<String, String> configure(){ return null; }
|
||||
public Proxy(){}
|
||||
public String getExcludeHosts(){ return null; }
|
||||
public String getHost(){ return null; }
|
||||
public String getPassword(){ return null; }
|
||||
public String getUser(){ return null; }
|
||||
public int getPort(){ return 0; }
|
||||
public void clear(Map<String, String> p0){}
|
||||
public void setExcludeHosts(String p0){}
|
||||
public void setHost(String p0){}
|
||||
public void setPassword(String p0){}
|
||||
public void setPort(int p0){}
|
||||
public void setUser(String p0){}
|
||||
}
|
||||
34
java/ql/test/stubs/cargo/org/codehaus/cargo/container/installer/ZipURLInstaller.java
generated
Normal file
34
java/ql/test/stubs/cargo/org/codehaus/cargo/container/installer/ZipURLInstaller.java
generated
Normal file
@@ -0,0 +1,34 @@
|
||||
// Generated automatically from org.codehaus.cargo.container.installer.ZipURLInstaller for testing purposes
|
||||
|
||||
package org.codehaus.cargo.container.installer;
|
||||
|
||||
import java.net.URL;
|
||||
import org.codehaus.cargo.container.installer.Installer;
|
||||
import org.codehaus.cargo.container.installer.Proxy;
|
||||
import org.codehaus.cargo.util.FileHandler;
|
||||
import org.codehaus.cargo.util.log.LoggedObject;
|
||||
import org.codehaus.cargo.util.log.Logger;
|
||||
|
||||
public class ZipURLInstaller extends LoggedObject implements Installer
|
||||
{
|
||||
protected ZipURLInstaller() {}
|
||||
protected String getSourceFileName(){ return null; }
|
||||
protected void doDownload(){}
|
||||
public FileHandler getFileHandler(){ return null; }
|
||||
public String getDownloadDir(){ return null; }
|
||||
public String getDownloadFile(){ return null; }
|
||||
public String getExtractDir(){ return null; }
|
||||
public String getHome(){ return null; }
|
||||
public ZipURLInstaller(URL p0){}
|
||||
public ZipURLInstaller(URL p0, String p1, String p2){}
|
||||
public boolean isAlreadyDownloaded(){ return false; }
|
||||
public boolean isAlreadyExtracted(){ return false; }
|
||||
public void download(){}
|
||||
public void install(){}
|
||||
public void registerInstallation(){}
|
||||
public void setDownloadDir(String p0){}
|
||||
public void setExtractDir(String p0){}
|
||||
public void setFileHandler(FileHandler p0){}
|
||||
public void setLogger(Logger p0){}
|
||||
public void setProxy(Proxy p0){}
|
||||
}
|
||||
49
java/ql/test/stubs/cargo/org/codehaus/cargo/util/FileHandler.java
generated
Normal file
49
java/ql/test/stubs/cargo/org/codehaus/cargo/util/FileHandler.java
generated
Normal file
@@ -0,0 +1,49 @@
|
||||
// Generated automatically from org.codehaus.cargo.util.FileHandler for testing purposes
|
||||
|
||||
package org.codehaus.cargo.util;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.codehaus.cargo.util.XmlReplacement;
|
||||
import org.codehaus.cargo.util.log.Loggable;
|
||||
|
||||
public interface FileHandler extends Loggable
|
||||
{
|
||||
InputStream getInputStream(String p0);
|
||||
OutputStream getOutputStream(String p0);
|
||||
String append(String p0, String p1);
|
||||
String createDirectory(String p0, String p1);
|
||||
String createUniqueTmpDirectory();
|
||||
String getAbsolutePath(String p0);
|
||||
String getName(String p0);
|
||||
String getParent(String p0);
|
||||
String getTmpPath(String p0);
|
||||
String getURL(String p0);
|
||||
String readTextFile(String p0, Charset p1);
|
||||
String[] getChildren(String p0);
|
||||
String[] getChildren(String p0, List<String> p1);
|
||||
boolean exists(String p0);
|
||||
boolean isDirectory(String p0);
|
||||
boolean isDirectoryEmpty(String p0);
|
||||
long getSize(String p0);
|
||||
static String NEW_LINE = null;
|
||||
void copy(InputStream p0, OutputStream p1);
|
||||
void copy(InputStream p0, OutputStream p1, int p2);
|
||||
void copyDirectory(String p0, String p1);
|
||||
void copyDirectory(String p0, String p1, List<String> p2);
|
||||
void copyDirectory(String p0, String p1, Map<String, String> p2, Charset p3);
|
||||
void copyFile(String p0, String p1);
|
||||
void copyFile(String p0, String p1, Map<String, String> p2, Charset p3);
|
||||
void copyFile(String p0, String p1, boolean p2);
|
||||
void createFile(String p0);
|
||||
void delete(String p0);
|
||||
void explode(String p0, String p1);
|
||||
void mkdirs(String p0);
|
||||
void replaceInFile(String p0, Map<String, String> p1, Charset p2);
|
||||
void replaceInFile(String p0, Map<String, String> p1, Charset p2, boolean p3);
|
||||
void replaceInXmlFile(XmlReplacement... p0);
|
||||
void writeTextFile(String p0, String p1, Charset p2);
|
||||
}
|
||||
28
java/ql/test/stubs/cargo/org/codehaus/cargo/util/XmlReplacement.java
generated
Normal file
28
java/ql/test/stubs/cargo/org/codehaus/cargo/util/XmlReplacement.java
generated
Normal file
@@ -0,0 +1,28 @@
|
||||
// Generated automatically from org.codehaus.cargo.util.XmlReplacement for testing purposes
|
||||
|
||||
package org.codehaus.cargo.util;
|
||||
|
||||
|
||||
public class XmlReplacement
|
||||
{
|
||||
public String getAttributeName(){ return null; }
|
||||
public String getFile(){ return null; }
|
||||
public String getValue(){ return null; }
|
||||
public String getXpathExpression(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public XmlReplacement(){}
|
||||
public XmlReplacement(String p0, String p1, String p2, XmlReplacement.ReplacementBehavior p3, String p4){}
|
||||
public XmlReplacement.ReplacementBehavior getReplacementBehavior(){ return null; }
|
||||
public boolean equals(Object p0){ return false; }
|
||||
public int hashCode(){ return 0; }
|
||||
public void setAttributeName(String p0){}
|
||||
public void setFile(String p0){}
|
||||
public void setReplacementBehavior(XmlReplacement.ReplacementBehavior p0){}
|
||||
public void setValue(String p0){}
|
||||
public void setXpathExpression(String p0){}
|
||||
static public enum ReplacementBehavior
|
||||
{
|
||||
ADD_MISSING_NODES, IGNORE_IF_NON_EXISTING, THROW_EXCEPTION;
|
||||
private ReplacementBehavior() {}
|
||||
}
|
||||
}
|
||||
18
java/ql/test/stubs/cargo/org/codehaus/cargo/util/log/LogLevel.java
generated
Normal file
18
java/ql/test/stubs/cargo/org/codehaus/cargo/util/log/LogLevel.java
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from org.codehaus.cargo.util.log.LogLevel for testing purposes
|
||||
|
||||
package org.codehaus.cargo.util.log;
|
||||
|
||||
|
||||
public class LogLevel implements Comparable<LogLevel>
|
||||
{
|
||||
protected LogLevel() {}
|
||||
public String getLevel(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean equals(Object p0){ return false; }
|
||||
public int compareTo(LogLevel p0){ return 0; }
|
||||
public int hashCode(){ return 0; }
|
||||
public static LogLevel DEBUG = null;
|
||||
public static LogLevel INFO = null;
|
||||
public static LogLevel WARN = null;
|
||||
public static LogLevel toLevel(String p0){ return null; }
|
||||
}
|
||||
11
java/ql/test/stubs/cargo/org/codehaus/cargo/util/log/Loggable.java
generated
Normal file
11
java/ql/test/stubs/cargo/org/codehaus/cargo/util/log/Loggable.java
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
// Generated automatically from org.codehaus.cargo.util.log.Loggable for testing purposes
|
||||
|
||||
package org.codehaus.cargo.util.log;
|
||||
|
||||
import org.codehaus.cargo.util.log.Logger;
|
||||
|
||||
public interface Loggable
|
||||
{
|
||||
Logger getLogger();
|
||||
void setLogger(Logger p0);
|
||||
}
|
||||
13
java/ql/test/stubs/cargo/org/codehaus/cargo/util/log/LoggedObject.java
generated
Normal file
13
java/ql/test/stubs/cargo/org/codehaus/cargo/util/log/LoggedObject.java
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
// Generated automatically from org.codehaus.cargo.util.log.LoggedObject for testing purposes
|
||||
|
||||
package org.codehaus.cargo.util.log;
|
||||
|
||||
import org.codehaus.cargo.util.log.Loggable;
|
||||
import org.codehaus.cargo.util.log.Logger;
|
||||
|
||||
public class LoggedObject implements Loggable
|
||||
{
|
||||
public LoggedObject(){}
|
||||
public Logger getLogger(){ return null; }
|
||||
public void setLogger(Logger p0){}
|
||||
}
|
||||
14
java/ql/test/stubs/cargo/org/codehaus/cargo/util/log/Logger.java
generated
Normal file
14
java/ql/test/stubs/cargo/org/codehaus/cargo/util/log/Logger.java
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// Generated automatically from org.codehaus.cargo.util.log.Logger for testing purposes
|
||||
|
||||
package org.codehaus.cargo.util.log;
|
||||
|
||||
import org.codehaus.cargo.util.log.LogLevel;
|
||||
|
||||
public interface Logger
|
||||
{
|
||||
LogLevel getLevel();
|
||||
void debug(String p0, String p1);
|
||||
void info(String p0, String p1);
|
||||
void setLevel(LogLevel p0);
|
||||
void warn(String p0, String p1);
|
||||
}
|
||||
26
java/ql/test/stubs/javafx-web/com/sun/javafx/tk/TKClipboard.java
generated
Normal file
26
java/ql/test/stubs/javafx-web/com/sun/javafx/tk/TKClipboard.java
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
// Generated automatically from com.sun.javafx.tk.TKClipboard for testing purposes
|
||||
|
||||
package com.sun.javafx.tk;
|
||||
|
||||
import java.security.AccessControlContext;
|
||||
import java.util.Set;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.input.DataFormat;
|
||||
import javafx.scene.input.TransferMode;
|
||||
import javafx.util.Pair;
|
||||
|
||||
public interface TKClipboard
|
||||
{
|
||||
Image getDragView();
|
||||
Object getContent(DataFormat p0);
|
||||
Set<DataFormat> getContentTypes();
|
||||
Set<TransferMode> getTransferModes();
|
||||
boolean hasContent(DataFormat p0);
|
||||
boolean putContent(Pair<DataFormat, Object>... p0);
|
||||
double getDragViewOffsetX();
|
||||
double getDragViewOffsetY();
|
||||
void setDragView(Image p0);
|
||||
void setDragViewOffsetX(double p0);
|
||||
void setDragViewOffsetY(double p0);
|
||||
void setSecurityContext(AccessControlContext p0);
|
||||
}
|
||||
10
java/ql/test/stubs/javafx-web/com/sun/javafx/tk/TKDragGestureListener.java
generated
Normal file
10
java/ql/test/stubs/javafx-web/com/sun/javafx/tk/TKDragGestureListener.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from com.sun.javafx.tk.TKDragGestureListener for testing purposes
|
||||
|
||||
package com.sun.javafx.tk;
|
||||
|
||||
import com.sun.javafx.tk.TKClipboard;
|
||||
|
||||
public interface TKDragGestureListener
|
||||
{
|
||||
void dragGestureRecognized(double p0, double p1, double p2, double p3, int p4, TKClipboard p5);
|
||||
}
|
||||
9
java/ql/test/stubs/javafx-web/com/sun/javafx/tk/TKPulseListener.java
generated
Normal file
9
java/ql/test/stubs/javafx-web/com/sun/javafx/tk/TKPulseListener.java
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
// Generated automatically from com.sun.javafx.tk.TKPulseListener for testing purposes
|
||||
|
||||
package com.sun.javafx.tk;
|
||||
|
||||
|
||||
public interface TKPulseListener
|
||||
{
|
||||
void pulse();
|
||||
}
|
||||
93
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/HikariConfig.java
generated
Normal file
93
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/HikariConfig.java
generated
Normal file
@@ -0,0 +1,93 @@
|
||||
// Generated automatically from com.zaxxer.hikari.HikariConfig for testing purposes
|
||||
|
||||
package com.zaxxer.hikari;
|
||||
|
||||
import com.zaxxer.hikari.HikariConfigMXBean;
|
||||
import com.zaxxer.hikari.metrics.MetricsTrackerFactory;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
public class HikariConfig implements HikariConfigMXBean
|
||||
{
|
||||
protected void loadProperties(String p0){}
|
||||
public DataSource getDataSource(){ return null; }
|
||||
public HikariConfig(){}
|
||||
public HikariConfig(Properties p0){}
|
||||
public HikariConfig(String p0){}
|
||||
public MetricsTrackerFactory getMetricsTrackerFactory(){ return null; }
|
||||
public Object getHealthCheckRegistry(){ return null; }
|
||||
public Object getMetricRegistry(){ return null; }
|
||||
public Properties getDataSourceProperties(){ return null; }
|
||||
public Properties getHealthCheckProperties(){ return null; }
|
||||
public ScheduledExecutorService getScheduledExecutor(){ return null; }
|
||||
public ScheduledThreadPoolExecutor getScheduledExecutorService(){ return null; }
|
||||
public String getCatalog(){ return null; }
|
||||
public String getConnectionInitSql(){ return null; }
|
||||
public String getConnectionTestQuery(){ return null; }
|
||||
public String getDataSourceClassName(){ return null; }
|
||||
public String getDataSourceJNDI(){ return null; }
|
||||
public String getDriverClassName(){ return null; }
|
||||
public String getJdbcUrl(){ return null; }
|
||||
public String getPassword(){ return null; }
|
||||
public String getPoolName(){ return null; }
|
||||
public String getTransactionIsolation(){ return null; }
|
||||
public String getUsername(){ return null; }
|
||||
public ThreadFactory getThreadFactory(){ return null; }
|
||||
public boolean isAllowPoolSuspension(){ return false; }
|
||||
public boolean isAutoCommit(){ return false; }
|
||||
public boolean isInitializationFailFast(){ return false; }
|
||||
public boolean isIsolateInternalQueries(){ return false; }
|
||||
public boolean isJdbc4ConnectionTest(){ return false; }
|
||||
public boolean isReadOnly(){ return false; }
|
||||
public boolean isRegisterMbeans(){ return false; }
|
||||
public int getMaximumPoolSize(){ return 0; }
|
||||
public int getMinimumIdle(){ return 0; }
|
||||
public long getConnectionTimeout(){ return 0; }
|
||||
public long getIdleTimeout(){ return 0; }
|
||||
public long getInitializationFailTimeout(){ return 0; }
|
||||
public long getLeakDetectionThreshold(){ return 0; }
|
||||
public long getMaxLifetime(){ return 0; }
|
||||
public long getValidationTimeout(){ return 0; }
|
||||
public void addDataSourceProperty(String p0, Object p1){}
|
||||
public void addHealthCheckProperty(String p0, String p1){}
|
||||
public void copyState(HikariConfig p0){}
|
||||
public void setAllowPoolSuspension(boolean p0){}
|
||||
public void setAutoCommit(boolean p0){}
|
||||
public void setCatalog(String p0){}
|
||||
public void setConnectionInitSql(String p0){}
|
||||
public void setConnectionTestQuery(String p0){}
|
||||
public void setConnectionTimeout(long p0){}
|
||||
public void setDataSource(DataSource p0){}
|
||||
public void setDataSourceClassName(String p0){}
|
||||
public void setDataSourceJNDI(String p0){}
|
||||
public void setDataSourceProperties(Properties p0){}
|
||||
public void setDriverClassName(String p0){}
|
||||
public void setHealthCheckProperties(Properties p0){}
|
||||
public void setHealthCheckRegistry(Object p0){}
|
||||
public void setIdleTimeout(long p0){}
|
||||
public void setInitializationFailFast(boolean p0){}
|
||||
public void setInitializationFailTimeout(long p0){}
|
||||
public void setIsolateInternalQueries(boolean p0){}
|
||||
public void setJdbc4ConnectionTest(boolean p0){}
|
||||
public void setJdbcUrl(String p0){}
|
||||
public void setLeakDetectionThreshold(long p0){}
|
||||
public void setMaxLifetime(long p0){}
|
||||
public void setMaximumPoolSize(int p0){}
|
||||
public void setMetricRegistry(Object p0){}
|
||||
public void setMetricsTrackerFactory(MetricsTrackerFactory p0){}
|
||||
public void setMinimumIdle(int p0){}
|
||||
public void setPassword(String p0){}
|
||||
public void setPoolName(String p0){}
|
||||
public void setReadOnly(boolean p0){}
|
||||
public void setRegisterMbeans(boolean p0){}
|
||||
public void setScheduledExecutor(ScheduledExecutorService p0){}
|
||||
public void setScheduledExecutorService(ScheduledThreadPoolExecutor p0){}
|
||||
public void setThreadFactory(ThreadFactory p0){}
|
||||
public void setTransactionIsolation(String p0){}
|
||||
public void setUsername(String p0){}
|
||||
public void setValidationTimeout(long p0){}
|
||||
public void validate(){}
|
||||
}
|
||||
25
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/HikariConfigMXBean.java
generated
Normal file
25
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/HikariConfigMXBean.java
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
// Generated automatically from com.zaxxer.hikari.HikariConfigMXBean for testing purposes
|
||||
|
||||
package com.zaxxer.hikari;
|
||||
|
||||
|
||||
public interface HikariConfigMXBean
|
||||
{
|
||||
String getPoolName();
|
||||
int getMaximumPoolSize();
|
||||
int getMinimumIdle();
|
||||
long getConnectionTimeout();
|
||||
long getIdleTimeout();
|
||||
long getLeakDetectionThreshold();
|
||||
long getMaxLifetime();
|
||||
long getValidationTimeout();
|
||||
void setConnectionTimeout(long p0);
|
||||
void setIdleTimeout(long p0);
|
||||
void setLeakDetectionThreshold(long p0);
|
||||
void setMaxLifetime(long p0);
|
||||
void setMaximumPoolSize(int p0);
|
||||
void setMinimumIdle(int p0);
|
||||
void setPassword(String p0);
|
||||
void setUsername(String p0);
|
||||
void setValidationTimeout(long p0);
|
||||
}
|
||||
40
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/HikariDataSource.java
generated
Normal file
40
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/HikariDataSource.java
generated
Normal file
@@ -0,0 +1,40 @@
|
||||
// Generated automatically from com.zaxxer.hikari.HikariDataSource for testing purposes
|
||||
|
||||
package com.zaxxer.hikari;
|
||||
|
||||
import com.zaxxer.hikari.HikariConfig;
|
||||
import com.zaxxer.hikari.HikariConfigMXBean;
|
||||
import com.zaxxer.hikari.HikariPoolMXBean;
|
||||
import com.zaxxer.hikari.metrics.MetricsTrackerFactory;
|
||||
import java.io.Closeable;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.util.logging.Logger;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
public class HikariDataSource extends HikariConfig implements Closeable, DataSource
|
||||
{
|
||||
public <T> T unwrap(java.lang.Class<T> p0){ return null; }
|
||||
public Connection getConnection(){ return null; }
|
||||
public Connection getConnection(String p0, String p1){ return null; }
|
||||
public HikariConfigMXBean getHikariConfigMXBean(){ return null; }
|
||||
public HikariDataSource(){}
|
||||
public HikariDataSource(HikariConfig p0){}
|
||||
public HikariPoolMXBean getHikariPoolMXBean(){ return null; }
|
||||
public Logger getParentLogger(){ return null; }
|
||||
public PrintWriter getLogWriter(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean isClosed(){ return false; }
|
||||
public boolean isWrapperFor(Class<? extends Object> p0){ return false; }
|
||||
public int getLoginTimeout(){ return 0; }
|
||||
public void close(){}
|
||||
public void evictConnection(Connection p0){}
|
||||
public void resumePool(){}
|
||||
public void setHealthCheckRegistry(Object p0){}
|
||||
public void setLogWriter(PrintWriter p0){}
|
||||
public void setLoginTimeout(int p0){}
|
||||
public void setMetricRegistry(Object p0){}
|
||||
public void setMetricsTrackerFactory(MetricsTrackerFactory p0){}
|
||||
public void shutdown(){}
|
||||
public void suspendPool(){}
|
||||
}
|
||||
15
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/HikariPoolMXBean.java
generated
Normal file
15
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/HikariPoolMXBean.java
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
// Generated automatically from com.zaxxer.hikari.HikariPoolMXBean for testing purposes
|
||||
|
||||
package com.zaxxer.hikari;
|
||||
|
||||
|
||||
public interface HikariPoolMXBean
|
||||
{
|
||||
int getActiveConnections();
|
||||
int getIdleConnections();
|
||||
int getThreadsAwaitingConnection();
|
||||
int getTotalConnections();
|
||||
void resumePool();
|
||||
void softEvictConnections();
|
||||
void suspendPool();
|
||||
}
|
||||
13
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/metrics/MetricsTracker.java
generated
Normal file
13
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/metrics/MetricsTracker.java
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
// Generated automatically from com.zaxxer.hikari.metrics.MetricsTracker for testing purposes
|
||||
|
||||
package com.zaxxer.hikari.metrics;
|
||||
|
||||
|
||||
public class MetricsTracker implements AutoCloseable
|
||||
{
|
||||
public MetricsTracker(){}
|
||||
public void close(){}
|
||||
public void recordConnectionAcquiredNanos(long p0){}
|
||||
public void recordConnectionTimeout(){}
|
||||
public void recordConnectionUsageMillis(long p0){}
|
||||
}
|
||||
11
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/metrics/MetricsTrackerFactory.java
generated
Normal file
11
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/metrics/MetricsTrackerFactory.java
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
// Generated automatically from com.zaxxer.hikari.metrics.MetricsTrackerFactory for testing purposes
|
||||
|
||||
package com.zaxxer.hikari.metrics;
|
||||
|
||||
import com.zaxxer.hikari.metrics.MetricsTracker;
|
||||
import com.zaxxer.hikari.metrics.PoolStats;
|
||||
|
||||
public interface MetricsTrackerFactory
|
||||
{
|
||||
MetricsTracker create(String p0, PoolStats p1);
|
||||
}
|
||||
19
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/metrics/PoolStats.java
generated
Normal file
19
java/ql/test/stubs/javafx-web/com/zaxxer/hikari/metrics/PoolStats.java
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
// Generated automatically from com.zaxxer.hikari.metrics.PoolStats for testing purposes
|
||||
|
||||
package com.zaxxer.hikari.metrics;
|
||||
|
||||
|
||||
abstract public class PoolStats
|
||||
{
|
||||
protected PoolStats() {}
|
||||
protected abstract void update();
|
||||
protected int activeConnections = 0;
|
||||
protected int idleConnections = 0;
|
||||
protected int pendingThreads = 0;
|
||||
protected int totalConnections = 0;
|
||||
public PoolStats(long p0){}
|
||||
public int getActiveConnections(){ return 0; }
|
||||
public int getIdleConnections(){ return 0; }
|
||||
public int getPendingThreads(){ return 0; }
|
||||
public int getTotalConnections(){ return 0; }
|
||||
}
|
||||
9
java/ql/test/stubs/javafx-web/io/micrometer/observation/Context.java
generated
Normal file
9
java/ql/test/stubs/javafx-web/io/micrometer/observation/Context.java
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
// Generated automatically from io.micrometer.observation.Context for testing purposes
|
||||
|
||||
package io.micrometer.observation;
|
||||
|
||||
|
||||
public class Context
|
||||
{
|
||||
protected Context() {}
|
||||
}
|
||||
9
java/ql/test/stubs/javafx-web/io/micrometer/observation/ObservationRegistry.java
generated
Normal file
9
java/ql/test/stubs/javafx-web/io/micrometer/observation/ObservationRegistry.java
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
// Generated automatically from io.micrometer.observation.ObservationRegistry for testing purposes
|
||||
|
||||
package io.micrometer.observation;
|
||||
|
||||
|
||||
public class ObservationRegistry
|
||||
{
|
||||
protected ObservationRegistry() {}
|
||||
}
|
||||
10
java/ql/test/stubs/javafx-web/jakarta/ws/rs/RuntimeType.java
generated
Normal file
10
java/ql/test/stubs/javafx-web/jakarta/ws/rs/RuntimeType.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from jakarta.ws.rs.RuntimeType for testing purposes
|
||||
|
||||
package jakarta.ws.rs;
|
||||
|
||||
|
||||
public enum RuntimeType
|
||||
{
|
||||
CLIENT, SERVER;
|
||||
private RuntimeType() {}
|
||||
}
|
||||
47
java/ql/test/stubs/javafx-web/jakarta/ws/rs/client/AsyncInvoker.java
generated
Normal file
47
java/ql/test/stubs/javafx-web/jakarta/ws/rs/client/AsyncInvoker.java
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
// Generated automatically from jakarta.ws.rs.client.AsyncInvoker for testing purposes
|
||||
|
||||
package jakarta.ws.rs.client;
|
||||
|
||||
import jakarta.ws.rs.client.Entity;
|
||||
import jakarta.ws.rs.client.InvocationCallback;
|
||||
import jakarta.ws.rs.core.GenericType;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
public interface AsyncInvoker
|
||||
{
|
||||
<T> java.util.concurrent.Future<T> delete(jakarta.ws.rs.client.InvocationCallback<T> p0);
|
||||
<T> java.util.concurrent.Future<T> delete(jakarta.ws.rs.core.GenericType<T> p0);
|
||||
<T> java.util.concurrent.Future<T> delete(java.lang.Class<T> p0);
|
||||
<T> java.util.concurrent.Future<T> get(jakarta.ws.rs.client.InvocationCallback<T> p0);
|
||||
<T> java.util.concurrent.Future<T> get(jakarta.ws.rs.core.GenericType<T> p0);
|
||||
<T> java.util.concurrent.Future<T> get(java.lang.Class<T> p0);
|
||||
<T> java.util.concurrent.Future<T> method(String p0, Entity<? extends Object> p1, jakarta.ws.rs.client.InvocationCallback<T> p2);
|
||||
<T> java.util.concurrent.Future<T> method(String p0, Entity<? extends Object> p1, jakarta.ws.rs.core.GenericType<T> p2);
|
||||
<T> java.util.concurrent.Future<T> method(String p0, Entity<? extends Object> p1, java.lang.Class<T> p2);
|
||||
<T> java.util.concurrent.Future<T> method(String p0, jakarta.ws.rs.client.InvocationCallback<T> p1);
|
||||
<T> java.util.concurrent.Future<T> method(String p0, jakarta.ws.rs.core.GenericType<T> p1);
|
||||
<T> java.util.concurrent.Future<T> method(String p0, java.lang.Class<T> p1);
|
||||
<T> java.util.concurrent.Future<T> options(jakarta.ws.rs.client.InvocationCallback<T> p0);
|
||||
<T> java.util.concurrent.Future<T> options(jakarta.ws.rs.core.GenericType<T> p0);
|
||||
<T> java.util.concurrent.Future<T> options(java.lang.Class<T> p0);
|
||||
<T> java.util.concurrent.Future<T> post(Entity<? extends Object> p0, jakarta.ws.rs.client.InvocationCallback<T> p1);
|
||||
<T> java.util.concurrent.Future<T> post(Entity<? extends Object> p0, jakarta.ws.rs.core.GenericType<T> p1);
|
||||
<T> java.util.concurrent.Future<T> post(Entity<? extends Object> p0, java.lang.Class<T> p1);
|
||||
<T> java.util.concurrent.Future<T> put(Entity<? extends Object> p0, jakarta.ws.rs.client.InvocationCallback<T> p1);
|
||||
<T> java.util.concurrent.Future<T> put(Entity<? extends Object> p0, jakarta.ws.rs.core.GenericType<T> p1);
|
||||
<T> java.util.concurrent.Future<T> put(Entity<? extends Object> p0, java.lang.Class<T> p1);
|
||||
<T> java.util.concurrent.Future<T> trace(jakarta.ws.rs.client.InvocationCallback<T> p0);
|
||||
<T> java.util.concurrent.Future<T> trace(jakarta.ws.rs.core.GenericType<T> p0);
|
||||
<T> java.util.concurrent.Future<T> trace(java.lang.Class<T> p0);
|
||||
java.util.concurrent.Future<Response> delete();
|
||||
java.util.concurrent.Future<Response> get();
|
||||
java.util.concurrent.Future<Response> head();
|
||||
java.util.concurrent.Future<Response> head(InvocationCallback<Response> p0);
|
||||
java.util.concurrent.Future<Response> method(String p0);
|
||||
java.util.concurrent.Future<Response> method(String p0, Entity<? extends Object> p1);
|
||||
java.util.concurrent.Future<Response> options();
|
||||
java.util.concurrent.Future<Response> post(Entity<? extends Object> p0);
|
||||
java.util.concurrent.Future<Response> put(Entity<? extends Object> p0);
|
||||
java.util.concurrent.Future<Response> trace();
|
||||
}
|
||||
24
java/ql/test/stubs/javafx-web/jakarta/ws/rs/client/Client.java
generated
Normal file
24
java/ql/test/stubs/javafx-web/jakarta/ws/rs/client/Client.java
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
// Generated automatically from jakarta.ws.rs.client.Client for testing purposes
|
||||
|
||||
package jakarta.ws.rs.client;
|
||||
|
||||
import jakarta.ws.rs.client.Invocation;
|
||||
import jakarta.ws.rs.client.WebTarget;
|
||||
import jakarta.ws.rs.core.Configurable;
|
||||
import jakarta.ws.rs.core.Link;
|
||||
import jakarta.ws.rs.core.UriBuilder;
|
||||
import java.net.URI;
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.SSLContext;
|
||||
|
||||
public interface Client extends AutoCloseable, Configurable<Client>
|
||||
{
|
||||
HostnameVerifier getHostnameVerifier();
|
||||
Invocation.Builder invocation(Link p0);
|
||||
SSLContext getSslContext();
|
||||
WebTarget target(Link p0);
|
||||
WebTarget target(String p0);
|
||||
WebTarget target(URI p0);
|
||||
WebTarget target(UriBuilder p0);
|
||||
void close();
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user