Skip to content

Commit

Permalink
[WFCORE-5288] Rename badly named constant
Browse files Browse the repository at this point in the history
  • Loading branch information
kabir committed Feb 23, 2021
1 parent a29f916 commit 0ec9f91
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions jmx/src/main/java/org/jboss/as/jmx/JMXExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ private void parseSensitivity(ModelNode add, XMLExtendedStreamReader reader) thr
final String attribute = reader.getAttributeLocalName(i);
switch (attribute) {
case CommonAttributes.NON_CORE_MBEANS:
JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.parseAndSetParameter(value, add, reader);
JMXSubsystemRootResource.NON_CORE_MBEAN_SENSITIVITY.parseAndSetParameter(value, add, reader);
break;
default:
throw ParseUtils.unexpectedAttribute(reader, i);
Expand Down Expand Up @@ -565,9 +565,9 @@ public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingCon

writer.writeEndElement();
}
if (node.hasDefined(JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.getName())) {
if (node.hasDefined(JMXSubsystemRootResource.NON_CORE_MBEAN_SENSITIVITY.getName())) {
writer.writeStartElement(CommonAttributes.SENSITIVITY);
JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.marshallAsAttribute(node, writer);
JMXSubsystemRootResource.NON_CORE_MBEAN_SENSITIVITY.marshallAsAttribute(node, writer);
writer.writeEndElement();
}
writer.writeEndElement();
Expand Down
4 changes: 2 additions & 2 deletions jmx/src/main/java/org/jboss/as/jmx/JMXSubsystemAdd.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class JMXSubsystemAdd extends AbstractAddStepHandler {
private final RuntimeHostControllerInfoAccessor hostInfoAccessor;

JMXSubsystemAdd(ManagedAuditLogger auditLoggerInfo, JmxAuthorizer authorizer, Supplier<SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostInfoAccessor) {
super(JMXSubsystemRootResource.JMX_CAPABILITY, JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY);
super(JMXSubsystemRootResource.JMX_CAPABILITY, JMXSubsystemRootResource.NON_CORE_MBEAN_SENSITIVITY);
this.auditLoggerInfo = auditLoggerInfo;
this.authorizer = authorizer;
this.securityIdentitySupplier = securityIdentitySupplier;
Expand All @@ -73,7 +73,7 @@ static void launchServices(OperationContext context, ModelNode model, ManagedAud
if (model.hasDefined(CommonAttributes.PROPER_PROPERTY_FORMAT)) {
legacyWithProperPropertyFormat = ExposeModelResourceExpression.DOMAIN_NAME.resolveModelAttribute(context, model).asBoolean();
}
boolean coreMBeanSensitivity = JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.resolveModelAttribute(context, model).asBoolean();
boolean coreMBeanSensitivity = JMXSubsystemRootResource.NON_CORE_MBEAN_SENSITIVITY.resolveModelAttribute(context, model).asBoolean();
final boolean isMasterHc;
if (context.getProcessType().isHostController()) {
isMasterHc = hostInfoAccessor.getHostControllerInfo(context).isMasterHc();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class JMXSubsystemRootResource extends SimpleResourceDefinition {
.setDeprecated(ModelVersion.create(7,0,0))
.build();

public static final SimpleAttributeDefinition CORE_MBEAN_SENSITIVITY = new SimpleAttributeDefinitionBuilder(CommonAttributes.NON_CORE_MBEAN_SENSITIVITY, ModelType.BOOLEAN, true)
public static final SimpleAttributeDefinition NON_CORE_MBEAN_SENSITIVITY = new SimpleAttributeDefinitionBuilder(CommonAttributes.NON_CORE_MBEAN_SENSITIVITY, ModelType.BOOLEAN, true)
.setAllowExpression(true)
.addAccessConstraint(SensitiveTargetAccessConstraintDefinition.ACCESS_CONTROL)
.setXmlName(CommonAttributes.NON_CORE_MBEANS)
Expand Down Expand Up @@ -109,7 +109,7 @@ public void registerOperations(ManagementResourceRegistration resourceRegistrati
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
resourceRegistration.registerReadWriteAttribute(SHOW_MODEL_ALIAS, ShowModelAliasReadHandler.INSTANCE, ShowModelAliasWriteHandler.INSTANCE);
resourceRegistration.registerReadWriteAttribute(CORE_MBEAN_SENSITIVITY, null, CoreMBeansSensitivityWriteHandler.INSTANCE);
resourceRegistration.registerReadWriteAttribute(NON_CORE_MBEAN_SENSITIVITY, null, CoreMBeansSensitivityWriteHandler.INSTANCE);
}

@Override
Expand Down Expand Up @@ -162,7 +162,7 @@ private static class CoreMBeansSensitivityWriteHandler extends AbstractWriteAttr
static final CoreMBeansSensitivityWriteHandler INSTANCE = new CoreMBeansSensitivityWriteHandler();

private CoreMBeansSensitivityWriteHandler() {
super(CORE_MBEAN_SENSITIVITY);
super(NON_CORE_MBEAN_SENSITIVITY);

}
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private void checkMBeanAccess(final StandardRole standardRole, final boolean sen
if (sensitiveMBeans) {
ModelNode sensitiveMBeansOp = Util.getWriteAttributeOperation(
PathAddress.pathAddress(ModelDescriptionConstants.SUBSYSTEM, JMXExtension.SUBSYSTEM_NAME),
JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.getName(),
JMXSubsystemRootResource.NON_CORE_MBEAN_SENSITIVITY.getName(),
new ModelNode(sensitiveMBeans));
executeForResult(sensitiveMBeansOp);
}
Expand Down

0 comments on commit 0ec9f91

Please sign in to comment.