|
44 | 44 | import com.vaadin.flow.component.webcomponent.WebComponent; |
45 | 45 | import com.vaadin.flow.component.webcomponent.WebComponentConfiguration; |
46 | 46 | import com.vaadin.flow.internal.CurrentInstance; |
| 47 | +import com.vaadin.flow.internal.JacksonUtils; |
47 | 48 | import com.vaadin.flow.server.InvalidCustomElementNameException; |
48 | 49 | import com.vaadin.flow.server.MockInstantiator; |
49 | 50 | import com.vaadin.flow.server.VaadinContext; |
@@ -188,6 +189,14 @@ public void duplicatePropertyRegistration_doesNotCauseIssues() |
188 | 189 | servletContext); |
189 | 190 | } |
190 | 191 |
|
| 192 | + @Test |
| 193 | + public void jacksonPropertyRegistration_doesNotCauseIssues() |
| 194 | + throws ServletException { |
| 195 | + initializer.process( |
| 196 | + Collections.singleton(JacksonPropertyExporter.class), |
| 197 | + servletContext); |
| 198 | + } |
| 199 | + |
191 | 200 | @Test |
192 | 201 | public void duplicatePropertyRegistrationBetweenParentAndChild_doesNotCauseIssues() |
193 | 202 | throws ServletException { |
@@ -328,6 +337,22 @@ public void configureInstance(WebComponent<MyComponent> webComponent, |
328 | 337 | } |
329 | 338 | } |
330 | 339 |
|
| 340 | + public static class JacksonPropertyExporter |
| 341 | + extends WebComponentExporter<MyComponent> { |
| 342 | + |
| 343 | + public JacksonPropertyExporter() { |
| 344 | + super("tag-2"); |
| 345 | + addProperty("property", |
| 346 | + JacksonUtils.createObjectNode().put("foo", "bar")); |
| 347 | + } |
| 348 | + |
| 349 | + @Override |
| 350 | + public void configureInstance(WebComponent<MyComponent> webComponent, |
| 351 | + MyComponent component) { |
| 352 | + |
| 353 | + } |
| 354 | + } |
| 355 | + |
331 | 356 | public static class CauseMatcher extends BaseMatcher<Throwable> { |
332 | 357 | private final Class<? extends Throwable> throwableType; |
333 | 358 | private boolean startsWith = false; |
|
0 commit comments