Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.metrics. (OFBIZ-9936) Thanks Dennis Balkir for reporting and providing the patch. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818536 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -83,7 +83,7 @@ public final class MetricsFactory {
|
||||
* <td>The metric threshold. The meaning of the threshold is determined by client code.</td>
|
||||
* <td>Defaults to "0.0".</td></tr>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* @param element The element whose attributes will be used to create the <code>Metrics</code> instance
|
||||
* @return A <code>Metrics</code> instance based on <code>element</code> attributes
|
||||
* @throws IllegalArgumentException if <code>element</code> is null or if the name attribute is empty
|
||||
@@ -95,7 +95,7 @@ public final class MetricsFactory {
|
||||
Assert.notEmpty("name attribute", name);
|
||||
Metrics result = METRICS_CACHE.get(name);
|
||||
if (result == null) {
|
||||
int estimationSize = UtilProperties.getPropertyAsInteger("serverstats", "metrics.estimation.size", 100);
|
||||
int estimationSize = UtilProperties.getPropertyAsInteger("serverstats", "metrics.estimation.size", 100);
|
||||
String attributeValue = element.getAttribute("estimation-size");
|
||||
if (!attributeValue.isEmpty()) {
|
||||
estimationSize = Integer.parseInt(attributeValue);
|
||||
|
||||
Reference in New Issue
Block a user