mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Java: Update the comments in SupportedExternalApis to include the neutral kind and add a sink neutral example.
This commit is contained in:
@@ -11,15 +11,15 @@ class ExternalApiUsage {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("foo", new Object());
|
||||
|
||||
Duration d = java.time.Duration.ofMillis(1000); // supported as a neutral model
|
||||
Duration d = java.time.Duration.ofMillis(1000); // supported as a neutral summary model
|
||||
|
||||
long l = "foo".length(); // supported as a neutral model
|
||||
long l = "foo".length(); // supported as a neutral summary model
|
||||
|
||||
AtomicReference<String> ref = new AtomicReference<>(); // uninteresting (parameterless constructor)
|
||||
ref.set("foo"); // supported as a summary model
|
||||
ref.toString(); // not supported
|
||||
|
||||
String.class.isAssignableFrom(Object.class); // parameter with generic type, supported as a neutral model
|
||||
String.class.isAssignableFrom(Object.class); // parameter with generic type, supported as a neutral summary model
|
||||
|
||||
System.out.println(d);
|
||||
System.out.println(map);
|
||||
|
||||
Reference in New Issue
Block a user