@CheckForNull private static ProxyConfiguration _get() { JenkinsJVM.checkJenkinsJVM(); // this code could be called between the JVM flag being set and theInstance initialized Jenkins jenkins = Jenkins.getInstance(); return jenkins == null ? null : jenkins.proxy; }
@CheckForNull private static ProxyConfiguration _get() { JenkinsJVM.checkJenkinsJVM(); // this code could be called between the JVM flag being set and theInstance initialized Jenkins jenkins = Jenkins.getInstance(); return jenkins == null ? null : jenkins.proxy; }
private void pregenerateNote(String html) { if (!notes.containsKey(html)) { JenkinsJVM.checkJenkinsJVM(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { new SimpleHtmlNote(html).encodeTo(baos); } catch (IOException x) { // should be impossible throw new RuntimeException(x); } notes.put(html, baos.toByteArray()); } }
static byte[][] createNotes() { JenkinsJVM.checkJenkinsJVM(); return Stream.of(new MavenMojoNote(), new Maven3MojoNote(), new MavenWarningNote(), new MavenErrorNote()).map(note -> { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { note.encodeTo(baos); } catch (IOException x) { // should be impossible throw new RuntimeException(x); } return baos.toByteArray(); }).toArray(byte[][]::new); }