From 9216901d52c9c763bfb908013587dcf5e781f15b Mon Sep 17 00:00:00 2001 From: Holden Karau Date: Mon, 8 Aug 2016 15:54:03 -0700 Subject: [SPARK-16779][TRIVIAL] Avoid using postfix operators where they do not add much and remove whitelisting ## What changes were proposed in this pull request? Avoid using postfix operation for command execution in SQLQuerySuite where it wasn't whitelisted and audit existing whitelistings removing postfix operators from most places. Some notable places where postfix operation remains is in the XML parsing & time units (seconds, millis, etc.) where it arguably can improve readability. ## How was this patch tested? Existing tests. Author: Holden Karau Closes #14407 from holdenk/SPARK-16779. --- graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'graphx') diff --git a/graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala b/graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala index 0a1622bca0..2f5bd4ed4f 100644 --- a/graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala +++ b/graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala @@ -17,7 +17,6 @@ package org.apache.spark.graphx.lib -import scala.language.postfixOps import scala.reflect.ClassTag import org.apache.spark.graphx._ @@ -109,7 +108,7 @@ object PageRank extends Logging { require(resetProb >= 0 && resetProb <= 1, s"Random reset probability must belong" + s" to [0, 1], but got ${resetProb}") - val personalized = srcId isDefined + val personalized = srcId.isDefined val src: VertexId = srcId.getOrElse(-1L) // Initialize the PageRank graph with each edge attribute having -- cgit v1.2.3