try {
View view = viewClass.newInstance();
return view;
- } catch (InstantiationException e) {
- // TODO error handling
- throw new RuntimeException(e);
- } catch (IllegalAccessException e) {
+ } catch (InstantiationException | IllegalAccessException e) {
// TODO error handling
throw new RuntimeException(e);
}
+ // TODO error handling
+
}
return null;
}
VaadinSession vaadinSession = (VaadinSession) ois.readObject();
getService().storeSession(vaadinSession,
new WrappedHttpSession(session));
- } catch (IOException e) {
- getLogger().log(Level.WARNING,
- "Could not de-serialize ApplicationContext for "
- + session.getId()
- + " A new one will be created. ",
- e);
- } catch (ClassNotFoundException e) {
+ } catch (IOException | ClassNotFoundException e) {
getLogger().log(Level.WARNING,
"Could not de-serialize ApplicationContext for "
+ session.getId()
} catch (ClassCastException e) {
throw new ServiceException("UIProvider class " + uiProviderProperty
+ " does not extend UIProvider", e);
- } catch (InstantiationException e) {
- throw new ServiceException(
- "Could not instantiate UIProvider " + uiProviderProperty,
- e);
- } catch (IllegalAccessException e) {
+ } catch (InstantiationException | IllegalAccessException e) {
throw new ServiceException(
"Could not instantiate UIProvider " + uiProviderProperty,
e);
try {
type = (getState(false).getClass()
.getDeclaredField(diffStateKey).getGenericType());
- } catch (NoSuchFieldException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
+ } catch (NoSuchFieldException | SecurityException e) {
e.printStackTrace();
}
EncodeResult encodeResult = JsonCodec.encode(
if (value == null) {
unboundFields.add(f.getName());
}
- } catch (IllegalArgumentException e) {
- throw new FieldBindingException("Could not get field value", e);
- } catch (IllegalAccessException e) {
+ } catch (IllegalArgumentException | IllegalAccessException e) {
throw new FieldBindingException("Could not get field value", e);
}
}
field.set(bindTarget, instance);
}
return true;
- } catch (IllegalAccessException e) {
- throw new FieldBindingException(
- "Field binding failed for " + identifier, e);
- } catch (IllegalArgumentException e) {
+ } catch (IllegalAccessException | IllegalArgumentException e) {
throw new FieldBindingException(
"Field binding failed for " + identifier, e);
}