Initial commit

This commit is contained in:
Pit Friedrich
2026-10-11 17:45:06 +02:00
commit d9a9647742
43 changed files with 3723 additions and 0 deletions
@@ -0,0 +1,24 @@
package com.example.leakdemo;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.html.H2;
import com.vaadin.flow.component.html.Paragraph;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.Route;
/** LEAK: the view of one user keeps a reference to a view of a different user. */
@Route("snoop")
public class SnoopView extends VerticalLayout {
private Component peeked;
public SnoopView() {
add(new H2("Snoop"));
synchronized (StaticLeakView.RECENT_VIEWS) {
if (!StaticLeakView.RECENT_VIEWS.isEmpty()) {
peeked = StaticLeakView.RECENT_VIEWS.get(0);
}
}
add(new Paragraph(peeked == null ? "nothing to peek at" : "peeking at " + peeked.getClass().getSimpleName()));
}
}