Skip to content

Commit

Permalink
[MINOR] Remove redundant return
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Remove redundant return in scala code.

### Why are the changes needed?
Syntactic simplification.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

Closes apache#37148 from panbingkun/remove_redundance_return.

Authored-by: panbingkun <pbk1982@gmail.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
  • Loading branch information
panbingkun authored and HyukjinKwon committed Jul 11, 2022
1 parent a1cc5d6 commit 49143ac
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ private[spark] class DechunkedInputStream(wrapped: InputStream) extends InputStr
}
}
assert(destSpace == 0 || remainingInChunk == -1)
return destPos - off
destPos - off
}

override def close(): Unit = wrapped.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private[spark] object SerializationDebugger extends Logging {
}
i += 1
}
return List.empty
List.empty
}

/**
Expand All @@ -145,7 +145,7 @@ private[spark] object SerializationDebugger extends Logging {
}
i += 1
}
return List.empty
List.empty
}

private def visitSerializable(o: Object, stack: List[String]): List[String] = {
Expand Down Expand Up @@ -212,7 +212,7 @@ private[spark] object SerializationDebugger extends Logging {
}
i += 1
}
return List.empty
List.empty
}

/**
Expand Down Expand Up @@ -249,7 +249,7 @@ private[spark] object SerializationDebugger extends Logging {
} else {
visited ++= innerObjectsCatcher.outputArray
}
return List.empty
List.empty
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ private[spark] class SortShuffleWriter[K, V, C](
}
stopping = true
if (success) {
return Option(mapStatus)
Option(mapStatus)
} else {
return None
None
}
} finally {
// Clean up our sorter, which may have its own intermediate files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,7 @@ private[spark] class BlockManager(
}

logDebug(s"block $blockId replicated to ${peersReplicatedTo.mkString(", ")}")
return true
true
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ private[storage] class BlockManagerDecommissioner(
s"process: ${blocksFailedReplication.mkString(",")}")
return true
}
return false
false
}

private def migrateBlock(blockToReplicate: ReplicateBlock): Boolean = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ object SizeEstimator extends Logging {
val guess = Runtime.getRuntime.maxMemory < (32L*1024*1024*1024)
val guessInWords = if (guess) "yes" else "not"
logWarning("Failed to check whether UseCompressedOops is set; assuming " + guessInWords)
return guess
guess
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class ExecutorClassLoader(
ClassWriter.COMPUTE_FRAMES + ClassWriter.COMPUTE_MAXS)
val cleaner = new ConstructorCleaner(name, cw)
cr.accept(cleaner, 0)
return cw.toByteArray
cw.toByteArray
} else {
// Pass the class through unmodified
val bos = new ByteArrayOutputStream
Expand All @@ -227,7 +227,7 @@ class ExecutorClassLoader(
done = true
}
}
return bos.toByteArray
bos.toByteArray
}
}

Expand Down Expand Up @@ -257,9 +257,9 @@ extends ClassVisitor(ASM9, cv) {
mv.visitInsn(RETURN)
mv.visitMaxs(-1, -1) // stack size and local vars will be auto-computed
mv.visitEnd()
return null
null
} else {
return mv
mv
}
}
}
Expand Down

0 comments on commit 49143ac

Please sign in to comment.