Skip to content

Commit bd317ee

Browse files
javier-godoypaodb
authored andcommitted
chore(demo): hide code that changes production mode
1 parent a6c5935 commit bd317ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/java/com/flowingcode/vaadin/addons/errorwindow/ErrorwindowDemo.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public ErrorwindowDemo() {
101101
new ErrorWindow(e, "CUSTOM ERROR MESSAGE", errorWindowI18n).open();
102102
}
103103
});
104-
104+
105+
// #if vaadin eq 0
105106
Checkbox productionModeCb = new Checkbox("Production Mode");
106107
productionModeCb.setValue(getProductionMode());
107108
productionModeCb.addValueChangeListener(
@@ -110,6 +111,7 @@ public ErrorwindowDemo() {
110111
Notification.show(
111112
"Currently production mode is: " + System.getProperty("productionMode"));
112113
});
114+
// #endif
113115

114116
Upload upload = new Upload(new NullMemoryBuffer());
115117
upload.addSucceededListener(ev -> {
@@ -138,6 +140,7 @@ public ErrorwindowDemo() {
138140

139141
}
140142

143+
// #if vaadin eq 0
141144
private boolean getProductionMode() {
142145
return Optional.ofNullable(System.getProperty("errorWindowProductionMode"))
143146
.map(Boolean::valueOf).orElseGet(() -> {
@@ -149,4 +152,5 @@ private boolean getProductionMode() {
149152
private void setProductionMode(boolean mode) {
150153
System.setProperty("errorWindowProductionMode", Boolean.toString(mode));
151154
}
155+
// #endif
152156
}

0 commit comments

Comments
 (0)