=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java 2015-09-24 21:35:11 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java 2015-09-24 21:48:20 +0000 @@ -66,7 +66,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; -import com.google.common.base.CharMatcher; import com.google.common.collect.ImmutableMap; /** @@ -476,7 +475,7 @@ return null; } - expression = CharMatcher.BREAKING_WHITESPACE.removeFrom( expression ); + expression = TextUtils.removeNewlines( expression ); expression = getSubstitutedVariablesForAnalyticsSql( expression ); === modified file 'dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/TextUtils.java' --- dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/TextUtils.java 2015-09-03 03:11:47 +0000 +++ dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/TextUtils.java 2015-09-24 21:48:20 +0000 @@ -249,6 +249,17 @@ } /** + * Removes line breaks form the given string. + * + * @param string the string. + * @return the chopped string. + */ + public static String removeNewlines( String string ) + { + return string.replaceAll( "\r", EMPTY ).replaceAll( "\n", EMPTY ); + } + + /** * Trims the given string from the end. * * @param value the value to trim.