Repository navigation
Tags
Tags
Bump com.uber.nullaway:nullaway from 0.13.8 to 0.14.0 (#522) Bumps [com.uber.nullaway:nullaway](https://github.com/uber/NullAway) from 0.13.8 to 0.14.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/uber/NullAway/releases">com.uber.nullaway:nullaway's releases</a>.</em></p> <blockquote> <h2>NullAway 0.14.0</h2> <p>This release has significant improvements to JSpecify support, including improved support for wildcards and integration of the standard library nullability annotations from <a href="https://github.com/jspecify/jdk">https://github.com/jspecify/jdk</a>. Much of this new support is gated behind a new <code>JSpecifyExperimental</code> flag, which is off by default. We disable the flag by default since this new support leads to many new errors in existing projects (mostly from the new JDK models), and because we need more real-world testing before enabling it by default. We encourage projects to enable the <code>JSpecifyExperimental</code> flag (alongside JSpecify mode) and to report any issues that arise. We expect to turn <code>JSpecifyExperimental</code> on by default in a future release.</p> <p>Aside from the above, you may observe some newly reported warnings in JSpecify mode, due to other checking improvements.</p> <p>This release also removes the <code>LegacyAnnotationLocations</code> flag. Type-use annotations must now be placed correctly on qualified and array types, even outside JSpecify mode, see details here:</p> <p><a href="https://github.com/uber/NullAway/wiki/JSpecify-Support#type-use-annotation-placement">https://github.com/uber/NullAway/wiki/JSpecify-Support#type-use-annotation-placement</a></p> <p>Beyond the above, we had useful changes from a variety of new contributors; thanks so much!</p> <ul> <li>Remove LegacyAnnotationLocations flag (<a href="https://redirect.github.com/uber/NullAway/issues/1640">#1640</a>)</li> <li>Handle signature-polymorphic calls in InvocationArguments (<a href="https://redirect.github.com/uber/NullAway/issues/1644">#1644</a>)</li> <li>Fix handling of reference to method with <code>@nullable</code> parameter from library model (<a href="https://redirect.github.com/uber/NullAway/issues/1642">#1642</a>)</li> <li>Enable JSpecify JDK models (under a flag) (<a href="https://redirect.github.com/uber/NullAway/issues/1641">#1641</a>)</li> <li>Enable JSpecify JDK models for regression tests (<a href="https://redirect.github.com/uber/NullAway/issues/1646">#1646</a>)</li> <li>Fix bug with lambdas assigned to locals with a wildcard in their type (<a href="https://redirect.github.com/uber/NullAway/issues/1647">#1647</a>)</li> <li>Add JSpecifyExperimental configuration flag (<a href="https://redirect.github.com/uber/NullAway/issues/1648">#1648</a>)</li> <li>Improve wildcard mismatch diagnostics for identical-looking types (<a href="https://redirect.github.com/uber/NullAway/issues/1627">#1627</a>)</li> <li>Enable inference failure warnings in experimental mode, and fix related bug in library models (<a href="https://redirect.github.com/uber/NullAway/issues/1649">#1649</a>)</li> <li>Fix inference bug with generic instance methods (<a href="https://redirect.github.com/uber/NullAway/issues/1654">#1654</a>)</li> <li>Fixes related to captured types and inference (<a href="https://redirect.github.com/uber/NullAway/issues/1655">#1655</a>)</li> <li>Augment NullAway error / fix serialization for Annotator auto fix mode by <a href="https://github.com/nimakarimipour"><code>@nimakarimipour</code></a> (<a href="https://redirect.github.com/uber/NullAway/issues/1322">#1322</a>)</li> <li>More consistent checks for captured types (<a href="https://redirect.github.com/uber/NullAway/issues/1662">#1662</a>)</li> <li>Update to JSpecify 1.0.1 (<a href="https://redirect.github.com/uber/NullAway/issues/1665">#1665</a>)</li> <li>Add test for issue 1671 (<a href="https://redirect.github.com/uber/NullAway/issues/1673">#1673</a>)</li> <li>Test case and fix for issue 1672 (<a href="https://redirect.github.com/uber/NullAway/issues/1674">#1674</a>)</li> <li>Fix subtype checking for nested captured types (<a href="https://redirect.github.com/uber/NullAway/issues/1663">#1663</a>)</li> <li>Handle interaction of captured types and library models (<a href="https://redirect.github.com/uber/NullAway/issues/1666">#1666</a>)</li> <li>Follow-on fix for restoring annotation on captured type wildcards (<a href="https://redirect.github.com/uber/NullAway/issues/1667">#1667</a>)</li> <li>Fix subtle issue with invalid TreePaths (<a href="https://redirect.github.com/uber/NullAway/issues/1681">#1681</a>)</li> <li>Honor <a href="https://github.com/Contract"><code>@Contract</code></a> when a <a href="https://github.com/Nullable"><code>@Nullable</code></a> method is used as a method reference by <a href="https://github.com/Eljees"><code>@Eljees</code></a> (<a href="https://redirect.github.com/uber/NullAway/issues/1679">#1679</a>)</li> <li>Defensively thread path into NestedTypeVarSubstitutionRepairVisitor (<a href="https://redirect.github.com/uber/NullAway/issues/1683">#1683</a>)</li> <li>More TreePath hardening (<a href="https://redirect.github.com/uber/NullAway/issues/1684">#1684</a>)</li> <li>Harden TypeSubstitutionUtils type copies (<a href="https://redirect.github.com/uber/NullAway/issues/1669">#1669</a>)</li> <li>Handle unbound wildcards and interactions with captured types better (<a href="https://redirect.github.com/uber/NullAway/issues/1668">#1668</a>)</li> <li>Improve error messages involving capture variables (<a href="https://redirect.github.com/uber/NullAway/issues/1675">#1675</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/uber/NullAway/blob/master/CHANGELOG.md">com.uber.nullaway:nullaway's changelog</a>.</em></p> <blockquote> <h2>Version 0.14.0</h2> <p>This release has significant improvements to JSpecify support, including improved support for wildcards and integration of the standard library nullability annotations from <a href="https://github.com/jspecify/jdk">https://github.com/jspecify/jdk</a>. Much of this new support is gated behind a new <code>JSpecifyExperimental</code> flag, which is off by default. We disable the flag by default since this new support leads to many new errors in existing projects (mostly from the new JDK models), and because we need more real-world testing before enabling it by default. We encourage projects to enable the <code>JSpecifyExperimental</code> flag (alongside JSpecify mode) and to report any issues that arise. We expect to turn <code>JSpecifyExperimental</code> on by default in a future release.</p> <p>Aside from the above, you may observe some newly reported warnings in JSpecify mode, due to other checking improvements.</p> <p>This release also removes the <code>LegacyAnnotationLocations</code> flag. Type-use annotations must now be placed correctly on qualified and array types, even outside JSpecify mode, see details here:</p> <p><a href="https://github.com/uber/NullAway/wiki/JSpecify-Support#type-use-annotation-placement">https://github.com/uber/NullAway/wiki/JSpecify-Support#type-use-annotation-placement</a></p> <p>Beyond the above, we had useful changes from a variety of new contributors; thanks so much!</p> <ul> <li>Remove LegacyAnnotationLocations flag (<a href="https://redirect.github.com/uber/NullAway/issues/1640">#1640</a>)</li> <li>Handle signature-polymorphic calls in InvocationArguments (<a href="https://redirect.github.com/uber/NullAway/issues/1644">#1644</a>)</li> <li>Fix handling of reference to method with <code>@nullable</code> parameter from library model (<a href="https://redirect.github.com/uber/NullAway/issues/1642">#1642</a>)</li> <li>Enable JSpecify JDK models (under a flag) (<a href="https://redirect.github.com/uber/NullAway/issues/1641">#1641</a>)</li> <li>Enable JSpecify JDK models for regression tests (<a href="https://redirect.github.com/uber/NullAway/issues/1646">#1646</a>)</li> <li>Fix bug with lambdas assigned to locals with a wildcard in their type (<a href="https://redirect.github.com/uber/NullAway/issues/1647">#1647</a>)</li> <li>Add JSpecifyExperimental configuration flag (<a href="https://redirect.github.com/uber/NullAway/issues/1648">#1648</a>)</li> <li>Improve wildcard mismatch diagnostics for identical-looking types (<a href="https://redirect.github.com/uber/NullAway/issues/1627">#1627</a>)</li> <li>Enable inference failure warnings in experimental mode, and fix related bug in library models (<a href="https://redirect.github.com/uber/NullAway/issues/1649">#1649</a>)</li> <li>Fix inference bug with generic instance methods (<a href="https://redirect.github.com/uber/NullAway/issues/1654">#1654</a>)</li> <li>Fixes related to captured types and inference (<a href="https://redirect.github.com/uber/NullAway/issues/1655">#1655</a>)</li> <li>Augment NullAway error / fix serialization for Annotator auto fix mode by <a href="https://github.com/nimakarimipour"><code>@nimakarimipour</code></a> (<a href="https://redirect.github.com/uber/NullAway/issues/1322">#1322</a>)</li> <li>More consistent checks for captured types (<a href="https://redirect.github.com/uber/NullAway/issues/1662">#1662</a>)</li> <li>Update to JSpecify 1.0.1 (<a href="https://redirect.github.com/uber/NullAway/issues/1665">#1665</a>)</li> <li>Add test for issue 1671 (<a href="https://redirect.github.com/uber/NullAway/issues/1673">#1673</a>)</li> <li>Test case and fix for issue 1672 (<a href="https://redirect.github.com/uber/NullAway/issues/1674">#1674</a>)</li> <li>Fix subtype checking for nested captured types (<a href="https://redirect.github.com/uber/NullAway/issues/1663">#1663</a>)</li> <li>Handle interaction of captured types and library models (<a href="https://redirect.github.com/uber/NullAway/issues/1666">#1666</a>)</li> <li>Follow-on fix for restoring annotation on captured type wildcards (<a href="https://redirect.github.com/uber/NullAway/issues/1667">#1667</a>)</li> <li>Fix subtle issue with invalid TreePaths (<a href="https://redirect.github.com/uber/NullAway/issues/1681">#1681</a>)</li> <li>Honor <a href="https://github.com/Contract"><code>@Contract</code></a> when a <a href="https://github.com/Nullable"><code>@Nullable</code></a> method is used as a method reference by <a href="https://github.com/Eljees"><code>@Eljees</code></a> (<a href="https://redirect.github.com/uber/NullAway/issues/1679">#1679</a>)</li> <li>Defensively thread path into NestedTypeVarSubstitutionRepairVisitor (<a href="https://redirect.github.com/uber/NullAway/issues/1683">#1683</a>)</li> <li>More TreePath hardening (<a href="https://redirect.github.com/uber/NullAway/issues/1684">#1684</a>)</li> <li>Harden TypeSubstitutionUtils type copies (<a href="https://redirect.github.com/uber/NullAway/issues/1669">#1669</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/uber/NullAway/commit/3af91d852dab33a58014ca533a26884df30887e4"><code>3af91d8</code></a> Prepare for release 0.14.0.</li> <li><a href="https://github.com/uber/NullAway/commit/ba5aaa14d474425ed3fa1366d1f7d71b5f039393"><code>ba5aaa1</code></a> Release notes for version 0.14.0 (<a href="https://redirect.github.com/uber/NullAway/issues/1713">#1713</a>)</li> <li><a href="https://github.com/uber/NullAway/commit/d008a79f106c80998a9c204d5de478dedc62d106"><code>d008a79</code></a> Rename getExecutableTypeForInference and improve Javadoc (<a href="https://redirect.github.com/uber/NullAway/issues/1709">#1709</a>)</li> <li><a href="https://github.com/uber/NullAway/commit/5cbc09fed8dc014a38120606adaf9654a3fd6179"><code>5cbc09f</code></a> Handle nested generic diamond call inference (<a href="https://redirect.github.com/uber/NullAway/issues/1544">#1544</a>)</li> <li><a href="https://github.com/uber/NullAway/commit/a77c5fcac9d2e01c3356a7cdf4eafe65a99e4734"><code>a77c5fc</code></a> Basic nullability inference for diamond constructor type arguments (<a href="https://redirect.github.com/uber/NullAway/issues/1708">#1708</a>)</li> <li><a href="https://github.com/uber/NullAway/commit/7bb2f8aa186457f01cddb7492accbbfa3ce076ba"><code>7bb2f8a</code></a> Generalize generic-call inference internals to call expressions (<a href="https://redirect.github.com/uber/NullAway/issues/1707">#1707</a>)</li> <li><a href="https://github.com/uber/NullAway/commit/0b9421a8e314ba9a0fbfced8ce8181d46bdc3c32"><code>0b9421a</code></a> Rename MethodInferenceResult to CallInferenceResult (<a href="https://redirect.github.com/uber/NullAway/issues/1692">#1692</a>)</li> <li><a href="https://github.com/uber/NullAway/commit/d4276435f3177f93ca72fe720882357ed25b16da"><code>d427643</code></a> Fix bug with library-modeled return types, method references, and streams (<a href="https://redirect.github.com/uber/NullAway/issues/1">#1</a>...</li> <li><a href="https://github.com/uber/NullAway/commit/63291028002c847cb9fb51da360295d133f7400a"><code>6329102</code></a> Fix JSpecify false negative when override narrows method type variable bound ...</li> <li><a href="https://github.com/uber/NullAway/commit/6bba0e52532948c35076af53689d4af9eca5ec70"><code>6bba0e5</code></a> Add regression test for inner classes inheriting enclosing type arguments (<a href="https://redirect.github.com/uber/NullAway/issues/1">#1</a>...</li> <li>Additional commits viewable in <a href="https://github.com/uber/NullAway/compare/v0.13.8...v0.14.0">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add a cache for compiled regex patterns (#459) cel-java doesn't currently have the optimization from cel-go which optimizes calls to the 'matches' function to compile a regular expression once instead of at every invocation. Override cel-java's builtin matches functions to add a pattern compilation cache (scoped to a Validator).
Follow up fixes to RuleCache (#458) Switch from a global to a per-instance descriptor map now that we're caching the program. Make a few small improvements to the rule cache. Update benchmark to better represent intended use of a validator (creating one instance and re-using it across evaluations).
Register string extension functions to match pv-go (#439) Currently, protovalidate-java doesn't register the same string extension functions at protovalidate-go, making custom CEL rules not supported across platforms. Register the CEL string extension functions available in cel-java. These are identical to the ones available in protovalidate-go except it is missing a `quote` and `reverse` function. We could implement custom versions but it would be better to get this addressed upstream for consistency across CEL runtimes. Fixes #438.
PreviousNext