Using Jenkins.getInstanceOrNull.
@@ -192,7 +192,7 @@ public abstract class ConsoleNote<T> implements Serializable, Describable<Consol
DataOutputStream dos = new DataOutputStream(new Base64OutputStream(buf2,true,-1,null));
try {
buf2.write(PREAMBLE);
- if (Jenkins.getInstance() != null) { // else we are in another JVM and cannot sign; TODO 1.653+ use getInstanceOrNull
+ if (Jenkins.getInstanceOrNull() != null) { // else we are in another JVM and cannot sign; result will be ignored unless INSECURE
byte[] mac = MAC.mac(buf.toByteArray());
dos.writeInt(- mac.length); // negative to differentiate from older form
dos.write(mac);
