Java: Inline expectation should have space after $

This was a regex-find-replace from `// \$(?! )` (using a negative lookahead) to `// $ `.
This commit is contained in:
Owen Mansel-Chan
2026-03-03 14:56:35 +00:00
parent 219ea28217
commit ef345a3279
87 changed files with 2744 additions and 2746 deletions

View File

@@ -19,35 +19,35 @@ public class Test {
Optional<Object> out = null;
Optional<Object> in = newWithElement(source());
out = in.filter(null);
sink(getElement(out)); // $hasValueFlow
sink(getElement(out)); // $ hasValueFlow
}
{
// "java.util;Optional;false;get;;;Element of Argument[this];ReturnValue;value;manual"
Object out = null;
Optional<Object> in = newWithElement(source());
out = in.get();
sink(out); // $hasValueFlow
sink(out); // $ hasValueFlow
}
{
// "java.util;Optional;false;of;;;Argument[0];Element of ReturnValue;value;manual"
Optional<Object> out = null;
Object in = (Object)source();
out = Optional.of(in);
sink(getElement(out)); // $hasValueFlow
sink(getElement(out)); // $ hasValueFlow
}
{
// "java.util;Optional;false;ofNullable;;;Argument[0];Element of ReturnValue;value;manual"
Optional<Object> out = null;
Object in = (Object)source();
out = Optional.ofNullable(in);
sink(getElement(out)); // $hasValueFlow
sink(getElement(out)); // $ hasValueFlow
}
{
// "java.util;Optional;false;or;;;Element of Argument[this];Element of ReturnValue;value;manual"
Optional<Object> out = null;
Optional<Object> in = newWithElement(source());
out = in.or(null);
sink(getElement(out)); // $hasValueFlow
sink(getElement(out)); // $ hasValueFlow
}
{
// "java.util;Optional;false;orElse;;;Argument[0];ReturnValue;value;manual"
@@ -55,44 +55,44 @@ public class Test {
Object in = (Object)source();
Optional<Object> instance = null;
out = instance.orElse(in);
sink(out); // $hasValueFlow
sink(out); // $ hasValueFlow
}
{
// "java.util;Optional;false;orElse;;;Element of Argument[this];ReturnValue;value;manual"
Object out = null;
Optional<Object> in = newWithElement(source());
out = in.orElse(null);
sink(out); // $hasValueFlow
sink(out); // $ hasValueFlow
}
{
// "java.util;Optional;false;orElseGet;;;Element of Argument[this];ReturnValue;value;manual"
Object out = null;
Optional<Object> in = newWithElement(source());
out = in.orElseGet(null);
sink(out); // $hasValueFlow
sink(out); // $ hasValueFlow
}
{
// "java.util;Optional;false;orElseThrow;;;Element of Argument[this];ReturnValue;value;manual"
Object out = null;
Optional<Object> in = newWithElement(source());
out = in.orElseThrow(null);
sink(out); // $hasValueFlow
sink(out); // $ hasValueFlow
}
{
// "java.util;Optional;false;orElseThrow;;;Element of Argument[this];ReturnValue;value;manual"
Object out = null;
Optional<Object> in = newWithElement(source());
out = in.orElseThrow();
sink(out); // $hasValueFlow
sink(out); // $ hasValueFlow
}
{
// "java.util;Optional;false;stream;;;Element of Argument[this];Element of ReturnValue;value;manual"
Stream<Object> out = null;
Optional<Object> in = newWithElement(source());
out = in.stream();
sink(getStreamElement(out)); // $hasValueFlow
sink(getStreamElement(out)); // $ hasValueFlow
}
}
}
}