[jboss-jira] [JBoss JIRA] (WFCORE-4162) Incorrect OperationContext.getCapabilityServiceName javadoc
Brian Stansberry (Jira)
issues at jboss.org
Fri Oct 12 13:07:00 EDT 2018
Brian Stansberry created WFCORE-4162:
----------------------------------------
Summary: Incorrect OperationContext.getCapabilityServiceName javadoc
Key: WFCORE-4162
URL: https://issues.jboss.org/browse/WFCORE-4162
Project: WildFly Core
Issue Type: Bug
Components: Management
Reporter: Brian Stansberry
Assignee: Jeff Mesnil
The OperationContext.getCapabilityServiceName javadoc is incorrect with respect to the handling of the 'serviceType' param. I believe at this point it can be null, and IAE will not be thrown if it is.
Passing the serviceType basically turns on optional validation that the capability actually exposes a matching type. Passing null means don't bother checking, which is valid and probably preferable.
Perhaps an overloaded variant of this that takes no serviceType would be useful. Here's the kind of heavy boilerplate the current API encourages:
.addDependency(context.getCapabilityServiceName("org.wildfly.transactions.transaction-manager", TransactionManager.class), TransactionManager.class, fileTimerPersistence.getTransactionManager())
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list