"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/client/utils/CloneUtils.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

CloneUtils.java  (httpcomponents-client-4.5.6-src):CloneUtils.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 62 skipping to change at line 62
throw new NoSuchMethodError(ex.getMessage()); throw new NoSuchMethodError(ex.getMessage());
} }
try { try {
@SuppressWarnings("unchecked") // OK because clone() preserves t he class @SuppressWarnings("unchecked") // OK because clone() preserves t he class
final T result = (T) m.invoke(obj, (Object []) null); final T result = (T) m.invoke(obj, (Object []) null);
return result; return result;
} catch (final InvocationTargetException ex) { } catch (final InvocationTargetException ex) {
final Throwable cause = ex.getCause(); final Throwable cause = ex.getCause();
if (cause instanceof CloneNotSupportedException) { if (cause instanceof CloneNotSupportedException) {
throw ((CloneNotSupportedException) cause); throw ((CloneNotSupportedException) cause);
} else {
throw new Error("Unexpected exception", cause);
} }
throw new Error("Unexpected exception", cause);
} catch (final IllegalAccessException ex) { } catch (final IllegalAccessException ex) {
throw new IllegalAccessError(ex.getMessage()); throw new IllegalAccessError(ex.getMessage());
} }
} else {
throw new CloneNotSupportedException();
} }
throw new CloneNotSupportedException();
} }
public static Object clone(final Object obj) throws CloneNotSupportedExcepti on { public static Object clone(final Object obj) throws CloneNotSupportedExcepti on {
return cloneObject(obj); return cloneObject(obj);
} }
/** /**
* This class should not be instantiated. * This class should not be instantiated.
*/ */
private CloneUtils() { private CloneUtils() {
 End of changes. 4 change blocks. 
4 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)