This commit is contained in:
Stephane Nicoll 2018-08-06 14:44:44 +02:00
parent e4e8311a1a
commit 14a9ec8711
1 changed files with 5 additions and 5 deletions

View File

@ -72,14 +72,14 @@ class DefaultEndpointObjectNameFactory implements EndpointObjectNameFactory {
throws MalformedObjectNameException {
StringBuilder builder = new StringBuilder(this.properties.getDomain());
builder.append(":type=Endpoint");
builder.append(",name=" + StringUtils.capitalize(endpoint.getId()));
builder.append(",name=").append(StringUtils.capitalize(endpoint.getId()));
String baseName = builder.toString();
if (this.mBeanServer != null && hasMBean(baseName)) {
builder.append(",context=" + this.contextId);
builder.append(",context=").append(this.contextId);
}
if (this.uniqueNames) {
String identity = ObjectUtils.getIdentityHexString(endpoint);
builder.append(",identity=" + identity);
builder.append(",identity=").append(identity);
}
builder.append(getStaticNames());
return ObjectNameManager.getInstance(builder.toString());
@ -95,8 +95,8 @@ class DefaultEndpointObjectNameFactory implements EndpointObjectNameFactory {
return "";
}
StringBuilder builder = new StringBuilder();
this.properties.getStaticNames()
.forEach((name, value) -> builder.append("," + name + "=" + value));
this.properties.getStaticNames().forEach((name, value) -> builder.append(",")
.append(name).append("=").append(value));
return builder.toString();
}