Skip to content

Commit 167ba71

Browse files
authored
fix: avoid "leaking" experimental features to stable interfaces (#22939)
* Avoid "leaking" experimental features to stable interfaces Note, might be still binary incompatible, but at least shouldn't for users to implement this yet. * Also add default impl for Classlist
1 parent 0694256 commit 167ba71

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

flow-server/src/main/java/com/vaadin/flow/dom/ClassList.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ default boolean set(String className, boolean set) {
7575
* thrown when there is already an existing binding
7676
* @since 25.0
7777
*/
78-
void bind(String name, Signal<Boolean> signal);
78+
default void bind(String name, Signal<Boolean> signal) {
79+
// experimental API, do not force implementation
80+
throw new UnsupportedOperationException();
81+
};
7982

8083
}

flow-server/src/main/java/com/vaadin/flow/dom/Style.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ public interface Style extends Serializable {
233233
*
234234
* @since 25.0
235235
*/
236-
Style bind(String name, Signal<String> signal);
236+
default Style bind(String name, Signal<String> signal) {
237+
// experimental API, do not force implementation
238+
throw new UnsupportedOperationException();
239+
};
237240

238241
/**
239242
* Sets the <code>background</code> property.

0 commit comments

Comments
 (0)