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] throw DeploymentUnitProcessingException instead of NPE wh… #9860

Merged
merged 1 commit into from Mar 28, 2017
Merged
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,6 +35,7 @@
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 @@ -280,6 +281,9 @@ 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());
}
final Object mBeanInstance = ReflectionUtils.newInstance(constructor, params);

return mBeanInstance;
Expand Down