"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "moskito-core/src/main/java/net/anotheria/moskito/core/config/dashboards/DashboardConfig.java" between
moskito-moskito-2.9.3.tar.gz and moskito-moskito-2.10.0.tar.gz

About: MoSKito (Monitoring System Kit) is a framework for java application monitoring. Sources.

DashboardConfig.java  (moskito-moskito-2.9.3):DashboardConfig.java  (moskito-moskito-2.10.0)
skipping to change at line 156 skipping to change at line 156
public ChartPattern[] getChartPatterns() { public ChartPattern[] getChartPatterns() {
return chartPatterns; return chartPatterns;
} }
public void setChartPatterns(ChartPattern[] chartPatterns) { public void setChartPatterns(ChartPattern[] chartPatterns) {
this.chartPatterns = chartPatterns; this.chartPatterns = chartPatterns;
if (chartPatterns != null && chartPatterns.length > 0) { if (chartPatterns != null && chartPatterns.length > 0) {
for (ChartPattern chartPattern : chartPatterns) { for (ChartPattern chartPattern : chartPatterns) {
List<Pattern> patterns = new LinkedList<>(); List<Pattern> somePatterns = new LinkedList<>();
for (String accumulatorPattern : chartPattern.get AccumulatorPatterns()) { for (String accumulatorPattern : chartPattern.get AccumulatorPatterns()) {
try { try {
patterns.add(Pattern.compile(accu mulatorPattern)); somePatterns.add(Pattern.compile( accumulatorPattern));
} catch (PatternSyntaxException e) { } catch (PatternSyntaxException e) {
log.warn("Couldn't compile patter n: \"" + accumulatorPattern + "\"", e); log.warn("Couldn't compile patter n: \"" + accumulatorPattern + "\"", e);
} }
} }
chartPattern.setPatterns(patterns.toArray(new Pat tern[patterns.size()])); chartPattern.setPatterns(somePatterns.toArray(new Pattern[somePatterns.size()]));
} }
} }
} }
public String[] getGauges() { public String[] getGauges() {
return gauges; return gauges;
} }
public void setGauges(String[] gauges) { public void setGauges(String[] gauges) {
this.gauges = gauges; this.gauges = gauges;
skipping to change at line 193 skipping to change at line 193
} }
public String[] getProducerNamePatterns() { public String[] getProducerNamePatterns() {
return producerNamePatterns; return producerNamePatterns;
} }
public void setProducerNamePatterns(String[] producerNamePatterns) { public void setProducerNamePatterns(String[] producerNamePatterns) {
this.producerNamePatterns = producerNamePatterns; this.producerNamePatterns = producerNamePatterns;
if (producerNamePatterns != null && producerNamePatterns.length > 0) { if (producerNamePatterns != null && producerNamePatterns.length > 0) {
List<Pattern> patterns = new LinkedList<>(); List<Pattern> somePatterns = new LinkedList<>();
for (String producerNamePattern : getProducerNamePatterns ()) { for (String producerNamePattern : getProducerNamePatterns ()) {
try { try {
patterns.add(Pattern.compile(producerName Pattern)); somePatterns.add(Pattern.compile(producer NamePattern));
} catch (PatternSyntaxException e) { } catch (PatternSyntaxException e) {
log.warn("Couldn't compile pattern: \"" + producerNamePattern + "\"", e); log.warn("Couldn't compile pattern: \"" + producerNamePattern + "\"", e);
} }
} }
setPatterns(patterns.toArray(new Pattern[patterns.size()] )); setPatterns(somePatterns.toArray(new Pattern[somePatterns .size()]));
} }
} }
public Pattern[] getPatterns() { public Pattern[] getPatterns() {
return patterns; return patterns;
} }
public void setPatterns(Pattern[] patterns) { public void setPatterns(Pattern[] patterns) {
this.patterns = patterns; this.patterns = patterns;
} }
skipping to change at line 240 skipping to change at line 240
if (cc.getCaption()!=null && cc.getCaption().equals(chart Name)) if (cc.getCaption()!=null && cc.getCaption().equals(chart Name))
return true; return true;
} }
return false; return false;
} }
public boolean containsThreshold(String thresholdName) { public boolean containsThreshold(String thresholdName) {
return listContainsElement(thresholds, thresholdName); return listContainsElement(thresholds, thresholdName);
} }
private boolean listContainsElement(String[] list, String name) { private boolean listContainsElement(String[] list, String aName) {
if (list==null || list.length==0) if (list==null || list.length==0)
return false; return false;
for (String e : list){ for (String e : list){
if (e.equals(name)) if (e.equals(aName))
return true; return true;
} }
return false; return false;
} }
} }
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)