Skip to content

Commit

Permalink
WELD-1871 Revised BeanLogger.decoratedNoargsConstructorIsPrivate()
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouba authored and jharting committed Jul 22, 2015
1 parent b4ae870 commit 268dc83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.jboss.weld.logging.BeanLogger;
import org.jboss.weld.manager.BeanManagerImpl;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.reflection.Formats;

/**
* @author Pete Muir
Expand Down Expand Up @@ -145,7 +146,7 @@ protected void checkNoArgsConstructor(EnhancedAnnotatedType<T> type) {
if (constructor == null) {
throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
} else if (constructor.isPrivate()) {
throw BeanLogger.LOG.decoratedNoargsConstructorIsPrivate(this);
throw BeanLogger.LOG.decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
}
}

Expand Down
4 changes: 2 additions & 2 deletions impl/src/main/java/org/jboss/weld/logging/BeanLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ public interface BeanLogger extends WeldLogger {
@Message(id = 1534, value = "Bean class which has decorators must have a public constructor without parameters: {0}", format = Format.MESSAGE_FORMAT)
DeploymentException decoratedHasNoNoargsConstructor(Object param1);

@Message(id = 1535, value = "Constructor without parameters cannot be private in bean class which has decorators: {0}", format = Format.MESSAGE_FORMAT)
DeploymentException decoratedNoargsConstructorIsPrivate(Object param1);
@Message(id = 1535, value = "Constructor without parameters cannot be private in bean class which has decorators: {0}\n\tat {1}\n StackTrace:", format = Format.MESSAGE_FORMAT)
DeploymentException decoratedNoargsConstructorIsPrivate(Object param1, Object stackElement);

/**
* ID of this message was originally 0 but in jboss-logging zero is a special value meaning no ID
Expand Down

0 comments on commit 268dc83

Please sign in to comment.