}
});
- getConsumer().addProfilerData(stack.getFirst(), totalList);
+ if (getConsumer() != null) {
+ getConsumer().addProfilerData(stack.getFirst(), totalList);
+ }
}
/**
return;
}
- getConsumer().addBootstrapData(timings);
+ if (getConsumer() != null) {
+ getConsumer().addBootstrapData(timings);
+ }
}
}
* <b>Warning!</b> This is internal API and should not be used by
* applications or add-ons.
*
- * @since 7.1
+ * @since 7.1.4
* @param profilerResultConsumer
* the consumer that gets profiler data
*/
- public static void setProfilerResultConsuer(
+ public static void setProfilerResultConsumer(
ProfilerResultConsumer profilerResultConsumer) {
if (consumer != null) {
throw new IllegalStateException("The consumer has already been set");
}
private static ProfilerResultConsumer getConsumer() {
- if (consumer == null) {
- throw new IllegalStateException("No consumer has been registered");
- } else {
- return consumer;
- }
+ return consumer;
}
private static Logger getLogger() {
private final FlowPanel content = new FlowPanel();
public ProfilerSection() {
- Profiler.setProfilerResultConsuer(new ProfilerResultConsumer() {
+ Profiler.setProfilerResultConsumer(new ProfilerResultConsumer() {
@Override
public void addProfilerData(Node rootNode, List<Node> totals) {
double totalTime = 0;