Repository: spark Updated Branches: refs/heads/branch-1.3 9387dc1c8 -> 3feb798cb
[SPARK-5618][Spark Core][Minor] Optimise utility code. Author: Makoto Fukuhara <fuku...@gmail.com> Closes #4396 from fukuo33/fix-unnecessary-regex and squashes the following commits: cd07fd6 [Makoto Fukuhara] fix unnecessary regex. (cherry picked from commit 4cdb26c174e479a144950d12e1ad180f361af1fd) Signed-off-by: Andrew Or <and...@databricks.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3feb798c Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3feb798c Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3feb798c Branch: refs/heads/branch-1.3 Commit: 3feb798cb6e0c400939e5cdfa8ba3c8842de1ae4 Parents: 9387dc1 Author: Makoto Fukuhara <fuku...@gmail.com> Authored: Fri Feb 6 11:11:38 2015 -0800 Committer: Andrew Or <and...@databricks.com> Committed: Fri Feb 6 11:12:39 2015 -0800 ---------------------------------------------------------------------- core/src/main/scala/org/apache/spark/util/Utils.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/3feb798c/core/src/main/scala/org/apache/spark/util/Utils.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala index 72d15e6..61d287c 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -1162,9 +1162,9 @@ private[spark] object Utils extends Logging { // finding the call site of a method. val SPARK_CORE_CLASS_REGEX = """^org\.apache\.spark(\.api\.java)?(\.util)?(\.rdd)?(\.broadcast)?\.[A-Z]""".r - val SCALA_CLASS_REGEX = """^scala""".r + val SCALA_CORE_CLASS_PREFIX = "scala" val isSparkCoreClass = SPARK_CORE_CLASS_REGEX.findFirstIn(className).isDefined - val isScalaClass = SCALA_CLASS_REGEX.findFirstIn(className).isDefined + val isScalaClass = className.startsWith(SCALA_CORE_CLASS_PREFIX) // If the class is a Spark internal class or a Scala class, then exclude. isSparkCoreClass || isScalaClass } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org