Source:
<code>protected String mapSortByPropertyName( QName featureType, String incomingPropertyName, List<MetacardMapper> metacardMapperList) { if (featureType == null || incomingPropertyName == null || metacardMapperList == null) { return null; } <START> metacardMapperList.forEach( m -> { LOGGER.debug( "Sorting: Mapper: featureType {}, mapped property for : {}", m.getFeatureType(), incomingPropertyName, m.getFeatureProperty(incomingPropertyName)); }); <END> LOGGER.debug( "Mapping sort proeprty: featureType {}, incomingPropertyName {}", featureType, incomingPropertyName); MetacardMapper metacardToFeaturePropertyMapper = lookupMetacardAttributeToFeaturePropertyMapper(featureType, metacardMapperList); String mappedPropertyName = null; if (metacardToFeaturePropertyMapper != null) { if (org.apache.commons.lang.StringUtils.equals(Result.TEMPORAL, incomingPropertyName) || org.apache.commons.lang.StringUtils.equals(Metacard.EFFECTIVE, incomingPropertyName)) { mappedPropertyName = org.apache.commons.lang.StringUtils.isNotBlank( metacardToFeaturePropertyMapper.getSortByTemporalFeatureProperty()) ? metacardToFeaturePropertyMapper.getSortByTemporalFeatureProperty() : null; } else if (org.apache.commons.lang.StringUtils.equals( Result.RELEVANCE, incomingPropertyName)) { mappedPropertyName = org.apache.commons.lang.StringUtils.isNotBlank( metacardToFeaturePropertyMapper.getSortByRelevanceFeatureProperty()) ? metacardToFeaturePropertyMapper.getSortByRelevanceFeatureProperty() : null; } else if (org.apache.commons.lang.StringUtils.equals( Result.DISTANCE, incomingPropertyName)) { mappedPropertyName = org.apache.commons.lang.StringUtils.isNotBlank( metacardToFeaturePropertyMapper.getSortByDistanceFeatureProperty()) ? metacardToFeaturePropertyMapper.getSortByDistanceFeatureProperty() : null; } else { mappedPropertyName = metacardToFeaturePropertyMapper.getFeatureProperty(incomingPropertyName); } } LOGGER.debug("mapped sort proeprty from to {}", incomingPropertyName, mappedPropertyName); return mappedPropertyName; }</code><technical_language>Suggestion: wrap lines in a LOGGER.isDebugEnabled check</technical_language>

Target:
protected String mapSortByPropertyName( QName featureType, String incomingPropertyName, List<MetacardMapper> metacardMapperList) { if (featureType == null || incomingPropertyName == null || metacardMapperList == null) { return null; } if (LOGGER.isDebugEnabled()) { metacardMapperList.forEach( m -> { LOGGER.debug( "Sorting: Mapper: featureType {}, mapped property for : {}", m.getFeatureType(), incomingPropertyName, m.getFeatureProperty(incomingPropertyName)); }); LOGGER.debug( "Mapping sort property: featureType {}, incomingPropertyName {}", featureType, incomingPropertyName); } MetacardMapper metacardToFeaturePropertyMapper = lookupMetacardAttributeToFeaturePropertyMapper(featureType, metacardMapperList); String mappedPropertyName = null; if (metacardToFeaturePropertyMapper != null) { if (StringUtils.equals(Result.TEMPORAL, incomingPropertyName) || StringUtils.equals(Metacard.EFFECTIVE, incomingPropertyName)) { mappedPropertyName = StringUtils.defaultIfBlank( metacardToFeaturePropertyMapper.getSortByTemporalFeatureProperty(), null); } else if (StringUtils.equals(Result.RELEVANCE, incomingPropertyName)) { mappedPropertyName = StringUtils.defaultIfBlank( metacardToFeaturePropertyMapper.getSortByRelevanceFeatureProperty(), null); } else if (org.apache.commons.lang.StringUtils.equals( Result.DISTANCE, incomingPropertyName)) { mappedPropertyName = StringUtils.defaultIfBlank( metacardToFeaturePropertyMapper.getSortByDistanceFeatureProperty(), null); } else { mappedPropertyName = metacardToFeaturePropertyMapper.getFeatureProperty(incomingPropertyName); } } LOGGER.debug("mapped sort property from to {}", incomingPropertyName, mappedPropertyName); return mappedPropertyName; }