diff --git a/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll b/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll index 04f72fa454e..61f2637d37d 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll @@ -7,11 +7,11 @@ private import semmle.code.java.dataflow.ExternalFlow private class EntryType extends RefType { EntryType() { - this.getSourceDeclaration().getASourceSupertype*().hasQualifiedName("java.util", "Map<>$Entry") + this.getSourceDeclaration().getASourceSupertype*().hasQualifiedName("java.util", "Map$Entry") } RefType getValueType() { - exists(GenericType t | t.hasQualifiedName("java.util", "Map<>$Entry") | + exists(GenericType t | t.hasQualifiedName("java.util", "Map$Entry") | indirectlyInstantiates(this, t, 1, result) ) } @@ -95,10 +95,10 @@ private class ContainerFlowSummaries extends SummaryModelCsv { override predicate row(string row) { row = [ - "java.util;Map<>$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", - "java.util;Map<>$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", - "java.util;Map<>$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", - "java.util;Map<>$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", + "java.util;Map$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", + "java.util;Map$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", + "java.util;Map$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", + "java.util;Map$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", "java.lang;Iterable;true;iterator;();;Element of Argument[-1];Element of ReturnValue;value", "java.lang;Iterable;true;spliterator;();;Element of Argument[-1];Element of ReturnValue;value", "java.util;Iterator;true;next;;;Element of Argument[-1];ReturnValue;value", diff --git a/java/ql/src/semmle/code/java/frameworks/play/Play.qll b/java/ql/src/semmle/code/java/frameworks/play/Play.qll index 96c45cb2244..efe2e128fee 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/Play.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/Play.qll @@ -26,10 +26,10 @@ class PlayMvcHttpRequestHeader extends RefType { } /** - * A `play.mvc.BodyParser<>$Of` annotation. + * A `play.mvc.BodyParser$Of` annotation. */ class PlayBodyParserAnnotation extends Annotation { - PlayBodyParserAnnotation() { this.getType().hasQualifiedName("play.mvc", "BodyParser<>$Of") } + PlayBodyParserAnnotation() { this.getType().hasQualifiedName("play.mvc", "BodyParser$Of") } } /** diff --git a/java/ql/test/library-tests/dataflow/collections/B.java b/java/ql/test/library-tests/dataflow/collections/B.java index 3cafd3ecbb9..b9c5b883a77 100644 --- a/java/ql/test/library-tests/dataflow/collections/B.java +++ b/java/ql/test/library-tests/dataflow/collections/B.java @@ -49,22 +49,22 @@ public class B { void foo() throws InterruptedException { { - // "java.util;Map<>$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", + // "java.util;Map$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", Object out = null; Object in = storeMapKeyEntry(source()); out = ((Map.Entry)in).getKey(); sink(out); // $ hasValueFlow } { - // "java.util;Map<>$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", + // "java.util;Map$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", Object out = null; Object in = storeMapValueEntry(source()); out = ((Map.Entry)in).getValue(); sink(out); // $ hasValueFlow } { - // "java.util;Map<>$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", + // "java.util;Map$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", Object out = null; Object in = storeMapValueEntry(source()); out = ((Map.Entry)in).setValue(null); sink(out); // $ hasValueFlow } { - // "java.util;Map<>$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", + // "java.util;Map$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", Map.Entry out = null; Object in = source(); out.setValue(in); sink(readMapValue(out)); // $ hasValueFlow } diff --git a/java/ql/test/library-tests/frameworks/play/PlayBodyParserAnnotation.expected b/java/ql/test/library-tests/frameworks/play/PlayBodyParserAnnotation.expected index b32653c5784..fabd1df0dfc 100644 --- a/java/ql/test/library-tests/frameworks/play/PlayBodyParserAnnotation.expected +++ b/java/ql/test/library-tests/frameworks/play/PlayBodyParserAnnotation.expected @@ -1 +1 @@ -| play.mvc.BodyParser<>$Of | +| play.mvc.BodyParser$Of |