@Test public void testInit() { initUi(); assertThat(UI.getCurrent().getContent(), is(linkkiUi.getApplicationLayout())); }
@Override protected void init(VaadinRequest request) { requireNonNull(applicationConfig, "configure must be called before executing any initialization to set an ApplicationConfig"); ApplicationLayout applicationLayout = applicationConfig.createApplicationLayout(); setContent(applicationLayout); configureNavigator(applicationLayout); configureErrorHandler(); VaadinSession vaadinSession = VaadinSession.getCurrent(); if (vaadinSession != null) { vaadinSession.setAttribute(LinkkiConverterRegistry.class, applicationConfig.getConverterRegistry()); vaadinSession.setErrorHandler(getErrorHandler()); } Page.getCurrent().setTitle(getPageTitle()); }
LinkkiUi extends UI { @Override protected void init(VaadinRequest request) { requireNonNull(applicationConfig, "configure must be called before executing any initialization to set an ApplicationConfig"); ApplicationLayout applicationLayout = applicationConfig.createApplicationLayout(); setContent(applicationLayout); configureNavigator(applicationLayout); configureErrorHandler(); VaadinSession vaadinSession = VaadinSession.getCurrent(); if (vaadinSession != null) { vaadinSession.setAttribute(LinkkiConverterRegistry.class, applicationConfig.getConverterRegistry()); vaadinSession.setErrorHandler(getErrorHandler()); } Page.getCurrent().setTitle(getPageTitle()); } }
LinkkiUi extends UI { @Override protected void init(VaadinRequest request) { requireNonNull(applicationConfig, "configure must be called before executing any initialization to set an ApplicationConfig"); ApplicationLayout applicationLayout = applicationConfig.createApplicationLayout(); setContent(applicationLayout); configureNavigator(applicationLayout); configureErrorHandler(); VaadinSession vaadinSession = VaadinSession.getCurrent(); if (vaadinSession != null) { vaadinSession.setAttribute(LinkkiConverterRegistry.class, applicationConfig.getConverterRegistry()); vaadinSession.setErrorHandler(getErrorHandler()); } Page.getCurrent().setTitle(getPageTitle()); } @SuppressFBWarnings(value = "NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "applicationConfig/Layout will be non-null once configure was called") protected  LinkkiUi(); @SuppressFBWarnings(value = "NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "applicationConfig/Layout will be non-null once configure was called")  LinkkiUi(ApplicationConfig applicationConfig); }
LinkkiUi extends UI { @Override protected void init(VaadinRequest request) { requireNonNull(applicationConfig, "configure must be called before executing any initialization to set an ApplicationConfig"); ApplicationLayout applicationLayout = applicationConfig.createApplicationLayout(); setContent(applicationLayout); configureNavigator(applicationLayout); configureErrorHandler(); VaadinSession vaadinSession = VaadinSession.getCurrent(); if (vaadinSession != null) { vaadinSession.setAttribute(LinkkiConverterRegistry.class, applicationConfig.getConverterRegistry()); vaadinSession.setErrorHandler(getErrorHandler()); } Page.getCurrent().setTitle(getPageTitle()); } @SuppressFBWarnings(value = "NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "applicationConfig/Layout will be non-null once configure was called") protected  LinkkiUi(); @SuppressFBWarnings(value = "NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "applicationConfig/Layout will be non-null once configure was called")  LinkkiUi(ApplicationConfig applicationConfig); ApplicationConfig getApplicationConfig(); ApplicationLayout getApplicationLayout(); @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification = "when called from the constructor before configure") @Override void setContent(@CheckForNull Component content); static LinkkiUi getCurrent(); static ApplicationConfig getCurrentApplicationConfig(); @Deprecated static ApplicationNavigator getCurrentApplicationNavigator(); static Navigator getCurrentNavigator(); static ApplicationLayout getCurrentApplicationLayout(); }
LinkkiUi extends UI { @Override protected void init(VaadinRequest request) { requireNonNull(applicationConfig, "configure must be called before executing any initialization to set an ApplicationConfig"); ApplicationLayout applicationLayout = applicationConfig.createApplicationLayout(); setContent(applicationLayout); configureNavigator(applicationLayout); configureErrorHandler(); VaadinSession vaadinSession = VaadinSession.getCurrent(); if (vaadinSession != null) { vaadinSession.setAttribute(LinkkiConverterRegistry.class, applicationConfig.getConverterRegistry()); vaadinSession.setErrorHandler(getErrorHandler()); } Page.getCurrent().setTitle(getPageTitle()); } @SuppressFBWarnings(value = "NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "applicationConfig/Layout will be non-null once configure was called") protected  LinkkiUi(); @SuppressFBWarnings(value = "NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "applicationConfig/Layout will be non-null once configure was called")  LinkkiUi(ApplicationConfig applicationConfig); ApplicationConfig getApplicationConfig(); ApplicationLayout getApplicationLayout(); @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification = "when called from the constructor before configure") @Override void setContent(@CheckForNull Component content); static LinkkiUi getCurrent(); static ApplicationConfig getCurrentApplicationConfig(); @Deprecated static ApplicationNavigator getCurrentApplicationNavigator(); static Navigator getCurrentNavigator(); static ApplicationLayout getCurrentApplicationLayout();  }