publicfinalclass NPE { abstractstaticclass Test {
String name;
Test(String name) { this.name = name; }
abstractvoid run();
}
static Test load = new Test("ServiceLoader.load(null)") { void run() { ServiceLoader.load(null); }
};
static Test loadWithClassLoader = new Test("ServiceLoader.load(null, loader)") { void run() { ServiceLoader.load(null, NPE.class.getClassLoader()); }
};
static Test loadInstalled = new Test("ServiceLoader.loadInstalled(null)") { void run() { ServiceLoader.loadInstalled(null); }
};
publicstaticvoid main(String[] args) throws Exception { for (Test t : Arrays.asList(load, loadWithClassLoader, loadInstalled)) {
NullPointerException caught = null; try {
t.run();
} catch (NullPointerException e) {
caught = e;
} if (caught == null) { thrownew RuntimeException("NullPointerException expected for method invocation of " + t.name);
}
}
}
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.30Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.