Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFLY-8458] Use SarLogger. #9864

Merged
merged 1 commit into from Mar 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -35,7 +35,6 @@
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;

import org.jboss.as.ee.logging.EeLogger;
import org.jboss.as.server.deployment.Attachments;
import org.jboss.as.server.deployment.DeploymentPhaseContext;
import org.jboss.as.server.deployment.DeploymentUnit;
Expand Down Expand Up @@ -282,7 +281,7 @@ private static Object newInstance(final JBossServiceConfig serviceConfig, final
}
final Constructor<?> constructor = mBeanClassHierarchy.get(0).getConstructor(types);
if(constructor == null){
throw EeLogger.ROOT_LOGGER.defaultConstructorNotFound(mBeanClassHierarchy.get(0).getIndexedClass());
throw SarLogger.ROOT_LOGGER.defaultConstructorNotFound(mBeanClassHierarchy.get(0).getIndexedClass());
}
final Object mBeanInstance = ReflectionUtils.newInstance(constructor, params);

Expand Down
11 changes: 11 additions & 0 deletions sar/src/main/java/org/jboss/as/service/logging/SarLogger.java
Expand Up @@ -194,4 +194,15 @@ public interface SarLogger extends BasicLogger {
*/
@Message(id = 13, value = "Malformed dependency name %s")
DeploymentUnitProcessingException malformedDependencyName(@Cause Throwable cause, String dependencyName);

/**
* Creates an exception indicating the default constructor for the class, represented by the {@code clazz} parameter, could
* not be found.
*
* @param clazz the class.
*
* @return a {@link DeploymentUnitProcessingException} for the error.
*/
@Message(id = 14, value = "Could not find default constructor for %s")
DeploymentUnitProcessingException defaultConstructorNotFound(Class<?> clazz);
}