Skip to content

Commit

Permalink
WELD-1553: Check for possible deserialization failure in Serializable…
Browse files Browse the repository at this point in the history
…ClientProxy and provide debug info
  • Loading branch information
Matej Briskar authored and jharting committed Dec 2, 2013
1 parent 16c58a0 commit 0f8b3d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -57,7 +57,7 @@ public SerializableClientProxy(final BeanIdentifier beanId, final String context
Object readResolve() throws ObjectStreamException {
Bean<?> bean = Container.instance(contextId).services().get(ContextualStore.class).<Bean<Object>, Object>getContextual(beanId);
if (bean == null) {
throw BeanLogger.LOG.proxyDeserializationFailure();
throw BeanLogger.LOG.proxyDeserializationFailure(beanId);
}
return Container.instance(contextId).deploymentManager().getClientProxyProvider().getClientProxy(bean);
}
Expand Down
4 changes: 2 additions & 2 deletions impl/src/main/java/org/jboss/weld/logging/BeanLogger.java
Expand Up @@ -435,8 +435,8 @@ public interface BeanLogger extends WeldLogger {
@Message(id = 99, value = "Cannot load class {0} during deserialization of proxy", format = Format.MESSAGE_FORMAT)
WeldException cannotLoadClass(Object param1, @Cause Throwable cause);

@Message(id = 1500, value = "Failed to deserialize proxy object")
WeldException proxyDeserializationFailure();
@Message(id = 1500, value = "Failed to deserialize proxy object with beanId {0}", format = Format.MESSAGE_FORMAT)
WeldException proxyDeserializationFailure(Object param1);

@Message(id = 1501, value = "Method call requires a BeanInstance which has not been set for this proxy {0}", format = Format.MESSAGE_FORMAT)
WeldException beanInstanceNotSetOnProxy(Object param1);
Expand Down

0 comments on commit 0f8b3d1

Please sign in to comment.