RFR: Do not print "Optional[repo name]" for backport PR command

Magnus Ihse Bursie ihse at openjdk.java.net
Thu Oct 7 12:52:02 UTC 2021


The sneaky `var` notation has caused a type problem. :-( `var repoName` was in fact `Optional<String>`, not `String`, so when printing this to the user, it was presented like this:

"Could not automatically backport 481a0456 to Optional[openjdk/jdk11u-dev] due to conflicts in the following files:"

The naming here is perhaps not my proudest moment, but I did not want to mess with the usage by `potentialTargetRepo` and so I wanted to keep the original value. I think the else-string will never actually show up, due to the isEmpty() check on potentialTargetRepo.

-------------

Commit messages:
 - Do not print "Optional[repo name]" for backport PR command

Changes: https://git.openjdk.java.net/skara/pull/1232/files
 Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1232&range=00
  Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/skara/pull/1232.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1232/head:pull/1232

PR: https://git.openjdk.java.net/skara/pull/1232


More information about the skara-dev mailing list