зеркало из https://github.com/github/codeql.git
Merge pull request #13587 from github/koesie10/update-java-external-api-name
Java: Fix external API name for nested types
This commit is contained in:
Коммит
b2e8167407
|
@ -27,8 +27,9 @@ class ExternalApi extends Callable {
|
|||
*/
|
||||
string getApiName() {
|
||||
result =
|
||||
this.getDeclaringType().getPackage() + "." + this.getDeclaringType().getSourceDeclaration() +
|
||||
"#" + this.getName() + paramsString(this)
|
||||
this.getDeclaringType().getPackage() + "." +
|
||||
this.getDeclaringType().getSourceDeclaration().nestedName() + "#" + this.getName() +
|
||||
paramsString(this)
|
||||
}
|
||||
|
||||
private string getJarName() {
|
||||
|
|
|
@ -7,5 +7,9 @@
|
|||
| java.net.URL#openStream() | 1 |
|
||||
| java.net.URLConnection#getInputStream() | 1 |
|
||||
| java.time.Duration#ofMillis(long) | 1 |
|
||||
| java.util.Iterator#next() | 1 |
|
||||
| java.util.Map#entrySet() | 1 |
|
||||
| java.util.Map#put(Object,Object) | 1 |
|
||||
| java.util.Map$Entry#getKey() | 1 |
|
||||
| java.util.Set#iterator() | 1 |
|
||||
| org.apache.commons.io.FileUtils#deleteDirectory(File) | 1 |
|
||||
|
|
|
@ -15,6 +15,7 @@ class SupportedExternalApis {
|
|||
|
||||
Map<String, Object> map = new HashMap<>(); // uninteresting (parameterless constructor)
|
||||
map.put("foo", new Object()); // supported summary
|
||||
map.entrySet().iterator().next().getKey(); // nested class (Map.Entry), supported summaries (entrySet, iterator, next, getKey)
|
||||
|
||||
Duration d = java.time.Duration.ofMillis(1000); // supported neutral
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче