Github user vrozov commented on a diff in the pull request:
https://github.com/apache/incubator-apex-core/pull/171#discussion_r45072891
--- Diff:
common/src/main/java/com/datatorrent/common/util/SerializableObject.java ---
@@ -58,37 +59,23 @@ public Object readResolve() throws ObjectStreamException
Constructor<? extends SerializableObject> constructor =
this.getClass().getConstructor(this.getClass());
try {
constructor.setAccessible(true);
- }
- catch (SecurityException ex) {
+ } catch (SecurityException ex) {
logger.warn("Accessing copy constructor {} failed.", constructor,
ex);
}
try {
return constructor.newInstance(this);
- }
- catch (InstantiationException ex) {
- throw new RuntimeException("Instantiation using copy constructor
failed!", ex);
- }
- catch (IllegalAccessException ex) {
- throw new RuntimeException("Instantiation using copy constructor
failed!", ex);
- }
- catch (IllegalArgumentException ex) {
- throw new RuntimeException("Instantiation using copy constructor
failed!", ex);
- }
- catch (InvocationTargetException ex) {
+ } catch (InstantiationException | IllegalAccessException |
IllegalArgumentException |
+ InvocationTargetException ex) {
throw new RuntimeException("Instantiation using copy constructor
failed!", ex);
}
- }
- catch (NoSuchMethodException snme) {
- logger.debug("No copy constructor detected for class {}, trying
default constructor.", this.getClass().getSimpleName());
+ } catch (NoSuchMethodException snme) {
+ logger.debug("No copy constructor detected for class {}, trying
default constructor.", this.getClass()
+ .getSimpleName());
--- End diff --
Can it be wrapped on space and not on dot?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---