ASF Bugzilla – Attachment 34324 Details for
Bug 60199
Improve error message if a session attribute could not load due to deserialization problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed a patch for 8.0.x
Bug_60199___Improve_error_message_if_a_session_attribute_could_not_load_due_to_deserializa.patch (text/plain), 2.11 KB, created by
igor.mukhin
on 2016-10-04 19:52:52 UTC
(
hide
)
Description:
Proposed a patch for 8.0.x
Filename:
MIME Type:
Creator:
igor.mukhin
Created:
2016-10-04 19:52:52 UTC
Size:
2.11 KB
patch
obsolete
>Index: java/org/apache/catalina/session/StandardSession.java >IDEA additional info: >Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP ><+>UTF-8 >=================================================================== >--- java/org/apache/catalina/session/StandardSession.java (revision 1763320) >+++ java/org/apache/catalina/session/StandardSession.java (revision ) >@@ -16,13 +16,13 @@ > */ > package org.apache.catalina.session; > >+ > import java.beans.PropertyChangeSupport; > import java.io.IOException; > import java.io.NotSerializableException; > import java.io.ObjectInputStream; > import java.io.ObjectOutputStream; > import java.io.Serializable; >-import java.io.WriteAbortedException; > import java.security.AccessController; > import java.security.Principal; > import java.security.PrivilegedAction; >@@ -38,7 +38,6 @@ > import java.util.concurrent.ConcurrentHashMap; > import java.util.concurrent.ConcurrentMap; > import java.util.concurrent.atomic.AtomicInteger; >- > import javax.servlet.ServletContext; > import javax.servlet.http.HttpSession; > import javax.servlet.http.HttpSessionActivationListener; >@@ -48,7 +47,6 @@ > import javax.servlet.http.HttpSessionEvent; > import javax.servlet.http.HttpSessionIdListener; > import javax.servlet.http.HttpSessionListener; >- > import org.apache.catalina.Context; > import org.apache.catalina.Globals; > import org.apache.catalina.Manager; >@@ -1622,12 +1620,9 @@ > final Object value; > try { > value = stream.readObject(); >- } catch (WriteAbortedException wae) { >- if (wae.getCause() instanceof NotSerializableException) { >- // Skip non serializable attributes >- continue; >- } >- throw wae; >+ } catch (Exception ex) { >+ throw new IOException(String.format( >+ "Can't deserialize the value of the attribute '%s'.", name), ex); > } > if (manager.getContext().getLogger().isDebugEnabled()) > manager.getContext().getLogger().debug(" loading attribute '" + name +
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 60199
: 34324