From 02160b6e19366b27eb24595fd5b6d187436b2f13 Mon Sep 17 00:00:00 2001 From: Werner Dietl Date: Thu, 14 Dec 2023 11:09:58 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: David P. Baker --- initialize-project | 7 ++++--- .../java/com/google/jspecify/nullness/NullSpecVisitor.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/initialize-project b/initialize-project index d240d96..9838d51 100755 --- a/initialize-project +++ b/initialize-project @@ -60,11 +60,12 @@ git_clone() { return fi fi - if [[ "${repo}" == "checker-framework" ]]; then - run "${git[@]}" "https://github.com/eisop/checker-framework.git" "../checker-framework" + if [[ "${repo}" == checker-framework ]]; then + forking_org=https://github.com/eisop else - run "${git[@]}" "https://github.com/jspecify/${repo}.git" "../${repo}" + forking_org=https://github.com/jspecify fi + run "${git[@]}" "${forking_org}/${repo}.git" "../${repo}" } # Fetch all branches even when $SHALLOW is set so we can check out diff --git a/src/main/java/com/google/jspecify/nullness/NullSpecVisitor.java b/src/main/java/com/google/jspecify/nullness/NullSpecVisitor.java index e2263b4..0f0ce88 100644 --- a/src/main/java/com/google/jspecify/nullness/NullSpecVisitor.java +++ b/src/main/java/com/google/jspecify/nullness/NullSpecVisitor.java @@ -116,7 +116,7 @@ protected String extraArgForReturnTypeError(Tree tree) { * the possibly null value (possibly both!). However, this gets tricky: If the branches return * `Foo?` and `Foo*`, then we ideally want to emphasize the `Foo?` branch *but*, at least in * "strict mode," not altogether ignore the `Foo*` branch. - * + / String origin = originStringIfTernary(tree); return origin.isEmpty() ? "" : (origin + "\n"); }