Repository: commons-lang
Updated Branches:
  refs/heads/master 4a26a86d0 -> e05b50e1d


LANG-1250: SerializationUtils::deserialize has unnecessary code and a comment 
for that (closes #174)

There is no real CCE possible, even the javadoc say so. Github's blame showed 
the code and javadoc is written by two indiviual person in two different years, 
so that may be the cause.


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/e4b7ee81
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/e4b7ee81
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/e4b7ee81

Branch: refs/heads/master
Commit: e4b7ee81c1773eeb0bb71ca53bf722f046c16a16
Parents: 4a26a86
Author: Glease <glease.w...@outlook.com>
Authored: Wed Jul 20 11:14:05 2016 +0800
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sat Aug 20 13:35:55 2016 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/commons/lang3/SerializationUtils.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/e4b7ee81/src/main/java/org/apache/commons/lang3/SerializationUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/SerializationUtils.java 
b/src/main/java/org/apache/commons/lang3/SerializationUtils.java
index 4ffc865..a5a7b49 100644
--- a/src/main/java/org/apache/commons/lang3/SerializationUtils.java
+++ b/src/main/java/org/apache/commons/lang3/SerializationUtils.java
@@ -219,12 +219,10 @@ public class SerializationUtils {
         try {
             // stream closed in the finally
             in = new ObjectInputStream(inputStream);
-            @SuppressWarnings("unchecked") // may fail with CCE if serialised 
form is incorrect
+            @SuppressWarnings("unchecked")
             final T obj = (T) in.readObject();
             return obj;
 
-        } catch (final ClassCastException ex) {
-            throw new SerializationException(ex);
         } catch (final ClassNotFoundException ex) {
             throw new SerializationException(ex);
         } catch (final IOException ex) {

Reply via email to