comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeInfoService.java @ 3557:f1f798b5f14a

Made expensive XMLUtils.toString() debug output conditional. flys-artifacts/trunk@5153 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 29 Jul 2012 11:11:51 +0000
parents fb7975828ffa
children 5e7da178daa6
comparison
equal deleted inserted replaced
3556:afc7bfb4800b 3557:f1f798b5f14a
73 GlobalContext context, 73 GlobalContext context,
74 CallMeta callMeta 74 CallMeta callMeta
75 ) { 75 ) {
76 logger.debug("GaugeInfoService.process"); 76 logger.debug("GaugeInfoService.process");
77 77
78 // XXX REMOVE THIS 78 if (logger.isDebugEnabled()) {
79 logger.debug(XMLUtils.toString(data)); 79 logger.debug(XMLUtils.toString(data));
80 }
80 81
81 River river = getRiverFromRequest(data); 82 River river = getRiverFromRequest(data);
82 83
83 List<Filter> filters = getFilters(data); 84 List<Filter> filters = getFilters(data);
84 List<Gauge> allGauges = river.getGauges(); 85 List<Gauge> allGauges = river.getGauges();
86 87
87 for (Gauge g: allGauges) { 88 for (Gauge g: allGauges) {
88 for (Filter f: filters) { 89 for (Filter f: filters) {
89 if (f.apply(g)) { 90 if (f.apply(g)) {
90 filtered.add(g); 91 filtered.add(g);
92 break;
91 } 93 }
92 } 94 }
93 } 95 }
94 96
95 return buildInfoDocument(filtered); 97 return buildInfoDocument(filtered);

http://dive4elements.wald.intevation.org