# @FUNCTION: java-pkg_clean
# @DESCRIPTION:
-# java package cleaner function, will remove all *.class and *.jar files
-# removing any bundled dependencies
+# Java package cleaner function. This will remove all *.class and *.jar
+# files, removing any bundled dependencies.
java-pkg_clean() {
- [[ -n "${JAVA_PKG_NO_CLEAN}" ]] &&
+ if [[ -z "${JAVA_PKG_NO_CLEAN}" ]]; then
find "${@}" '(' -name '*.class' -o -name '*.jar' ')' -type f -delete -print || die
+ fi
}