Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Execution Condition with empty path #4688

MFalkner ·

I've a step to publish Aritfacts.
The Execution Condition has two conditions:

  1. If all previous sibling steps are successful
  2. If specified path exists.
    The path is being returned by a variable that runs a groovy script.
    This variable might return "" in case there is no path to return.
    In this case the step is marked as being cancelled, what is kind of strange for me.
    What is best to return instead of "" to avoid this?
image.png
  • solved #2
  • replies 3
  • views 28
  • stars 0
robinshen ADMIN ·

With QB15, this will cause a NullPointerException which is expected as a path is required. How about returning some non-existant path in this case?

MFalkner ·

Sure, I tried it and it helped.
So an empty string results in a NullPointerException?
I didn’t expect that, since I’m not returning a null value but an empty string.
Anyway, I can live with this solution.
Thanks, Martin

robinshen ADMIN ·

Yes, I tested with QB15 for a simple build and NPE is thrown instead of job cancelling.