|
16 | 16 | * #L% |
17 | 17 | */ |
18 | 18 |
|
19 | | -import com.vaadin.experimental.FeatureFlags; |
20 | 19 | import com.vaadin.flow.component.AttachEvent; |
21 | 20 | import com.vaadin.flow.component.Component; |
22 | 21 | import com.vaadin.flow.component.ComponentEventListener; |
23 | 22 | import com.vaadin.flow.component.HasSize; |
24 | 23 | import com.vaadin.flow.component.HasTheme; |
25 | | -import com.vaadin.flow.component.UI; |
26 | 24 | import com.vaadin.flow.component.map.configuration.AbstractConfigurationObject; |
27 | 25 | import com.vaadin.flow.component.map.configuration.Configuration; |
28 | 26 | import com.vaadin.flow.component.map.configuration.Coordinate; |
@@ -95,7 +93,6 @@ public void setView(View view) { |
95 | 93 | @Override |
96 | 94 | protected void onAttach(AttachEvent attachEvent) { |
97 | 95 | super.onAttach(attachEvent); |
98 | | - checkFeatureFlag(); |
99 | 96 | getElement().executeJs("window.Vaadin.Flow.mapConnector.init(this)"); |
100 | 97 | // Ensure the full configuration is synced when (re-)attaching the |
101 | 98 | // component |
@@ -219,35 +216,6 @@ public Registration addFeatureClickListener( |
219 | 216 | return addListener(MapFeatureClickEvent.class, listener); |
220 | 217 | } |
221 | 218 |
|
222 | | - /** |
223 | | - * Checks whether the map component feature flag is active. Succeeds if the |
224 | | - * flag is enabled, and throws otherwise. |
225 | | - * |
226 | | - * @throws ExperimentalFeatureException |
227 | | - * when the {@link FeatureFlags#MAP_COMPONENT} feature is not |
228 | | - * enabled |
229 | | - */ |
230 | | - private void checkFeatureFlag() { |
231 | | - boolean enabled = getFeatureFlags() |
232 | | - .isEnabled(FeatureFlags.MAP_COMPONENT); |
233 | | - |
234 | | - if (!enabled) { |
235 | | - throw new ExperimentalFeatureException(); |
236 | | - } |
237 | | - } |
238 | | - |
239 | | - /** |
240 | | - * Gets the feature flags for the current UI. |
241 | | - * <p> |
242 | | - * Extracted with protected visibility to support mocking |
243 | | - * |
244 | | - * @return the current set of feature flags |
245 | | - */ |
246 | | - protected FeatureFlags getFeatureFlags() { |
247 | | - return FeatureFlags |
248 | | - .get(UI.getCurrent().getSession().getService().getContext()); |
249 | | - } |
250 | | - |
251 | 219 | /** |
252 | 220 | * Adds theme variants to the component. |
253 | 221 | * |
|
0 commit comments