Permalink
Browse files

More explicit empty paren lists in method calls.

  • Loading branch information...
1 parent 6e450ed commit 41703dfef181caa7877aec77e90249264fd37e02 @retronym retronym committed Feb 24, 2013
Showing with 552 additions and 550 deletions.
  1. +1 −1 src/compiler/scala/tools/nsc/backend/opt/InlineExceptionHandlers.scala
  2. +1 −1 src/compiler/scala/tools/nsc/backend/opt/Inliners.scala
  3. +1 −1 src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
  4. +5 −5 src/library/scala/Array.scala
  5. +2 −2 src/library/scala/Enumeration.scala
  6. +1 −1 src/library/scala/beans/ScalaBeanInfo.scala
  7. +1 −1 src/library/scala/collection/BitSetLike.scala
  8. +2 −2 src/library/scala/collection/DefaultMap.scala
  9. +2 −2 src/library/scala/collection/IndexedSeqLike.scala
  10. +5 −5 src/library/scala/collection/IndexedSeqOptimized.scala
  11. +24 −24 src/library/scala/collection/IterableLike.scala
  12. +9 −9 src/library/scala/collection/Iterator.scala
  13. +2 −2 src/library/scala/collection/LinearSeqLike.scala
  14. +6 −6 src/library/scala/collection/LinearSeqOptimized.scala
  15. +2 −2 src/library/scala/collection/MapLike.scala
  16. +1 −1 src/library/scala/collection/Parallelizable.scala
  17. +19 −19 src/library/scala/collection/SeqLike.scala
  18. +4 −4 src/library/scala/collection/SetLike.scala
  19. +2 −2 src/library/scala/collection/SortedMap.scala
  20. +3 −3 src/library/scala/collection/TraversableOnce.scala
  21. +1 −1 src/library/scala/collection/concurrent/TrieMap.scala
  22. +4 −4 src/library/scala/collection/convert/Wrappers.scala
  23. +1 −1 src/library/scala/collection/generic/GenMapFactory.scala
  24. +5 −5 src/library/scala/collection/generic/GenTraversableFactory.scala
  25. +2 −2 src/library/scala/collection/generic/GenericClassTagCompanion.scala
  26. +2 −2 src/library/scala/collection/generic/GenericCompanion.scala
  27. +2 −2 src/library/scala/collection/generic/GenericOrderedCompanion.scala
  28. +5 −5 src/library/scala/collection/generic/GenericTraversableTemplate.scala
  29. +1 −1 src/library/scala/collection/generic/Signalling.scala
  30. +5 −5 src/library/scala/collection/generic/Sorted.scala
  31. +1 −1 src/library/scala/collection/generic/SortedMapFactory.scala
  32. +1 −1 src/library/scala/collection/generic/SortedSetFactory.scala
  33. +1 −1 src/library/scala/collection/immutable/BitSet.scala
  34. +2 −2 src/library/scala/collection/immutable/DefaultMap.scala
  35. +2 −2 src/library/scala/collection/immutable/ListSet.scala
  36. +1 −1 src/library/scala/collection/immutable/MapLike.scala
  37. +2 −2 src/library/scala/collection/immutable/PagedSeq.scala
  38. +1 −1 src/library/scala/collection/immutable/RedBlackTree.scala
  39. +2 −2 src/library/scala/collection/immutable/SortedMap.scala
  40. +1 −1 src/library/scala/collection/immutable/Stream.scala
  41. +2 −2 src/library/scala/collection/immutable/StringLike.scala
  42. +1 −1 src/library/scala/collection/immutable/TreeMap.scala
  43. +1 −1 src/library/scala/collection/immutable/TreeSet.scala
  44. +2 −2 src/library/scala/collection/immutable/TrieIterator.scala
  45. +11 −11 src/library/scala/collection/immutable/Vector.scala
  46. +2 −2 src/library/scala/collection/mutable/AVLTree.scala
  47. +2 −2 src/library/scala/collection/mutable/ArrayOps.scala
  48. +1 −1 src/library/scala/collection/mutable/ArraySeq.scala
  49. +2 −2 src/library/scala/collection/mutable/ArrayStack.scala
  50. +2 −2 src/library/scala/collection/mutable/BufferLike.scala
  51. +1 −1 src/library/scala/collection/mutable/BufferProxy.scala
  52. +1 −1 src/library/scala/collection/mutable/Builder.scala
  53. +1 −1 src/library/scala/collection/mutable/DoubleLinkedList.scala
  54. +2 −2 src/library/scala/collection/mutable/FlatHashTable.scala
  55. +4 −4 src/library/scala/collection/mutable/HashMap.scala
  56. +2 −2 src/library/scala/collection/mutable/HashSet.scala
  57. +1 −1 src/library/scala/collection/mutable/HashTable.scala
  58. +3 −3 src/library/scala/collection/mutable/History.scala
  59. +3 −3 src/library/scala/collection/mutable/LinkedHashMap.scala
  60. +1 −1 src/library/scala/collection/mutable/LinkedHashSet.scala
  61. +1 −1 src/library/scala/collection/mutable/LinkedListLike.scala
  62. +1 −1 src/library/scala/collection/mutable/MutableList.scala
  63. +1 −1 src/library/scala/collection/mutable/ObservableBuffer.scala
  64. +1 −1 src/library/scala/collection/mutable/ObservableMap.scala
  65. +1 −1 src/library/scala/collection/mutable/ObservableSet.scala
  66. +1 −1 src/library/scala/collection/mutable/OpenHashMap.scala
  67. +2 −2 src/library/scala/collection/mutable/PriorityQueue.scala
  68. +2 −2 src/library/scala/collection/mutable/PriorityQueueProxy.scala
  69. +1 −1 src/library/scala/collection/mutable/Publisher.scala
  70. +1 −1 src/library/scala/collection/mutable/Queue.scala
  71. +2 −2 src/library/scala/collection/mutable/QueueProxy.scala
  72. +2 −2 src/library/scala/collection/mutable/RevertibleHistory.scala
  73. +1 −1 src/library/scala/collection/mutable/SetLike.scala
  74. +2 −2 src/library/scala/collection/mutable/StackProxy.scala
  75. +1 −1 src/library/scala/collection/mutable/SynchronizedBuffer.scala
  76. +2 −2 src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala
  77. +2 −2 src/library/scala/collection/mutable/SynchronizedQueue.scala
  78. +1 −1 src/library/scala/collection/mutable/SynchronizedSet.scala
  79. +2 −2 src/library/scala/collection/mutable/SynchronizedStack.scala
  80. +2 −2 src/library/scala/collection/mutable/UnrolledBuffer.scala
  81. +1 −1 src/library/scala/collection/parallel/Combiner.scala
  82. +14 −14 src/library/scala/collection/parallel/ParIterableLike.scala
  83. +1 −1 src/library/scala/collection/parallel/ParIterableViewLike.scala
  84. +2 −2 src/library/scala/collection/parallel/ParMapLike.scala
  85. +4 −4 src/library/scala/collection/parallel/ParSeqLike.scala
  86. +1 −1 src/library/scala/collection/parallel/ParSeqViewLike.scala
  87. +42 −42 src/library/scala/collection/parallel/RemainsIterator.scala
  88. +1 −1 src/library/scala/collection/parallel/Splitter.scala
  89. +8 −8 src/library/scala/collection/parallel/Tasks.scala
  90. +1 −1 src/library/scala/collection/parallel/immutable/ParHashMap.scala
  91. +1 −1 src/library/scala/collection/parallel/immutable/ParHashSet.scala
  92. +1 −1 src/library/scala/collection/parallel/immutable/ParRange.scala
  93. +3 −3 src/library/scala/collection/parallel/mutable/ParArray.scala
  94. +1 −1 src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala
  95. +1 −1 src/library/scala/collection/parallel/mutable/UnrolledParArrayCombiner.scala
  96. +3 −3 src/library/scala/concurrent/Future.scala
  97. +2 −2 src/library/scala/concurrent/duration/Duration.scala
  98. +3 −3 src/library/scala/concurrent/impl/Promise.scala
  99. +1 −1 src/library/scala/io/BufferedSource.scala
  100. +6 −6 src/library/scala/io/Source.scala
  101. +1 −1 src/library/scala/math/BigDecimal.scala
  102. +1 −1 src/library/scala/math/BigInt.scala
  103. +2 −2 src/library/scala/math/Ordering.scala
  104. +7 −7 src/library/scala/math/ScalaNumericConversions.scala
  105. +2 −2 src/library/scala/runtime/ScalaNumberProxy.scala
  106. +13 −13 src/library/scala/runtime/Tuple2Zipped.scala
  107. +13 −13 src/library/scala/runtime/Tuple3Zipped.scala
  108. +1 −1 src/library/scala/sys/process/BasicIO.scala
  109. +5 −5 src/library/scala/sys/process/ProcessImpl.scala
  110. +1 −1 src/library/scala/util/Random.scala
  111. +3 −3 src/library/scala/util/matching/Regex.scala
  112. +1 −1 src/library/scala/xml/PrettyPrinter.scala
  113. +8 −8 src/library/scala/xml/Utility.scala
  114. +20 −20 src/library/scala/xml/dtd/ContentModelParser.scala
  115. +1 −1 src/library/scala/xml/dtd/DocType.scala
  116. +14 −14 src/library/scala/xml/dtd/Scanner.scala
  117. +1 −1 src/library/scala/xml/dtd/impl/SubsetConstruction.scala
  118. +1 −1 src/library/scala/xml/factory/XMLLoader.scala
  119. +5 −5 src/library/scala/xml/parsing/FactoryAdapter.scala
  120. +92 −92 src/library/scala/xml/parsing/MarkupParser.scala
  121. +15 −15 src/library/scala/xml/parsing/MarkupParserCommon.scala
  122. +1 −1 src/library/scala/xml/parsing/XhtmlParser.scala
  123. +5 −5 src/library/scala/xml/persistent/CachedFileStorage.scala
  124. +3 −3 src/library/scala/xml/pull/XMLEventReader.scala
  125. +6 −6 src/reflect/scala/reflect/internal/Printers.scala
  126. +4 −4 src/reflect/scala/reflect/internal/TreeInfo.scala
  127. +1 −1 src/reflect/scala/reflect/internal/Types.scala
  128. +1 −1 src/reflect/scala/reflect/internal/util/Collections.scala
  129. +1 −1 src/reflect/scala/reflect/io/PlainFile.scala
  130. +4 −2 src/reflect/scala/reflect/io/Streamable.scala
  131. +3 −3 src/reflect/scala/reflect/io/VirtualDirectory.scala
  132. +3 −3 src/reflect/scala/reflect/io/VirtualFile.scala
  133. +7 −7 src/reflect/scala/reflect/io/ZipArchive.scala
@@ -262,7 +262,7 @@ abstract class InlineExceptionHandlers extends SubComponent {
if (analyzedMethod eq NoIMethod) {
analyzedMethod = bblock.method
tfa.init(bblock.method)
- tfa.run
+ tfa.run()
log(" performed tfa on method: " + bblock.method)
for (block <- bblock.method.blocks.sortBy(_.label))
@@ -232,7 +232,7 @@ abstract class Inliners extends SubComponent {
val hasRETURN = containsRETURN(incm.code.blocksList) || (incm.exh exists { eh => containsRETURN(eh.blocks) })
var a: analysis.MethodTFA = null
- if(hasRETURN) { a = new analysis.MethodTFA(incm); a.run }
+ if(hasRETURN) { a = new analysis.MethodTFA(incm); a.run() }
if(forceable) { recentTFAs.put(incm.symbol, (hasRETURN, a)) }
@@ -764,7 +764,7 @@ abstract class ICodeReader extends ClassfileParser {
// method.dump
tfa.init(method)
- tfa.run
+ tfa.run()
for (bb <- linearizer.linearize(method)) {
var info = tfa.in(bb)
for (i <- bb.toList) {
@@ -242,7 +242,7 @@ object Array extends FallbackArrayBuilding {
val b = newBuilder[T]
b.sizeHint(xss.map(_.size).sum)
for (xs <- xss) b ++= xs
- b.result
+ b.result()
}
/** Returns an array that contains the results of some element computation a number
@@ -267,7 +267,7 @@ object Array extends FallbackArrayBuilding {
b += elem
i += 1
}
- b.result
+ b.result()
}
/** Returns a two-dimensional array that contains the results of some element
@@ -331,7 +331,7 @@ object Array extends FallbackArrayBuilding {
b += f(i)
i += 1
}
- b.result
+ b.result()
}
/** Returns a two-dimensional array containing values of a given function
@@ -406,7 +406,7 @@ object Array extends FallbackArrayBuilding {
b += i
i += step
}
- b.result
+ b.result()
}
/** Returns an array containing repeated applications of a function to a start value.
@@ -431,7 +431,7 @@ object Array extends FallbackArrayBuilding {
b += acc
}
}
- b.result
+ b.result()
}
/** Called in a pattern match like `{ case Array(x,y,z) => println('3 elements')}`.
@@ -95,7 +95,7 @@ abstract class Enumeration (initial: Int) extends Serializable {
protected var nextName: Iterator[String] = _
private def nextNameOrNull =
- if (nextName != null && nextName.hasNext) nextName.next else null
+ if (nextName != null && nextName.hasNext) nextName.next() else null
/** The highest integer amongst those used to identify values in this
* enumeration. */
@@ -277,7 +277,7 @@ abstract class Enumeration (initial: Int) extends Serializable {
def newBuilder: mutable.Builder[Value, ValueSet] = new mutable.Builder[Value, ValueSet] {
private[this] val b = new mutable.BitSet
def += (x: Value) = { b += (x.id - bottomId); this }
- def clear() = b.clear
+ def clear() = b.clear()
def result() = new ValueSet(b.toImmutable)
}
/** The implicit builder for value sets */
@@ -27,7 +27,7 @@ abstract class ScalaBeanInfo(clazz: java.lang.Class[_],
for (m <- clazz.getMethods if methods.exists(_ == m.getName))
yield new MethodDescriptor(m)
- init
+ init()
override def getPropertyDescriptors() = pd
override def getMethodDescriptors() = md
@@ -109,7 +109,7 @@ trait BitSetLike[+This <: BitSetLike[This] with SortedSet[Int]] extends SortedSe
}
def next(): Int =
if (hasNext) { val r = current; current += 1; r }
- else Iterator.empty.next
+ else Iterator.empty.next()
}
override def foreach[B](f: Int => B) {
@@ -30,14 +30,14 @@ trait DefaultMap[A, +B] extends Map[A, B] { self =>
val b = Map.newBuilder[A, B1]
b ++= this
b += ((kv._1, kv._2))
- b.result
+ b.result()
}
/** A default implementation which creates a new immutable map.
*/
override def - (key: A): Map[A, B] = {
val b = newBuilder
b ++= this filter (key != _._1)
- b.result
+ b.result()
}
}
@@ -59,7 +59,7 @@ trait IndexedSeqLike[+A, +Repr] extends Any with SeqLike[A, Repr] {
def next(): A = {
if (index >= end)
- Iterator.empty.next
+ Iterator.empty.next()
val x = self(index)
index += 1
@@ -68,7 +68,7 @@ trait IndexedSeqLike[+A, +Repr] extends Any with SeqLike[A, Repr] {
def head = {
if (index >= end)
- Iterator.empty.next
+ Iterator.empty.next()
self(index)
}
@@ -88,7 +88,7 @@ trait IndexedSeqOptimized[+A, +Repr] extends Any with IndexedSeqLike[A, Repr] {
b += ((this(i), that(i).asInstanceOf[B]))
i += 1
}
- b.result
+ b.result()
case _ =>
super.zip[A1, B, That](that)(bf)
}
@@ -103,7 +103,7 @@ trait IndexedSeqOptimized[+A, +Repr] extends Any with IndexedSeqLike[A, Repr] {
b += ((this(i), i))
i += 1
}
- b.result
+ b.result()
}
override /*IterableLike*/
@@ -119,7 +119,7 @@ trait IndexedSeqOptimized[+A, +Repr] extends Any with IndexedSeqLike[A, Repr] {
b += self(i)
i += 1
}
- b.result
+ b.result()
}
override /*IterableLike*/
@@ -220,7 +220,7 @@ trait IndexedSeqOptimized[+A, +Repr] extends Any with IndexedSeqLike[A, Repr] {
i -= 1
b += this(i)
}
- b.result
+ b.result()
}
override /*SeqLike*/
@@ -231,7 +231,7 @@ trait IndexedSeqOptimized[+A, +Repr] extends Any with IndexedSeqLike[A, Repr] {
if (0 < i) {
i -= 1
self(i)
- } else Iterator.empty.next
+ } else Iterator.empty.next()
}
override /*SeqLike*/
@@ -88,13 +88,13 @@ self =>
override /*TraversableLike*/ def toIterator: Iterator[A] =
iterator
override /*TraversableLike*/ def head: A =
- iterator.next
+ iterator.next()
override /*TraversableLike*/ def slice(from: Int, until: Int): Repr = {
val lo = math.max(from, 0)
val elems = until - lo
val b = newBuilder
- if (elems <= 0) b.result
+ if (elems <= 0) b.result()
else {
b.sizeHintBounded(elems, this)
var i = 0
@@ -103,14 +103,14 @@ self =>
b += it.next
i += 1
}
- b.result
+ b.result()
}
}
override /*TraversableLike*/ def take(n: Int): Repr = {
val b = newBuilder
- if (n <= 0) b.result
+ if (n <= 0) b.result()
else {
b.sizeHintBounded(n, this)
var i = 0
@@ -119,7 +119,7 @@ self =>
b += it.next
i += 1
}
- b.result
+ b.result()
}
}
@@ -130,21 +130,21 @@ self =>
var i = 0
val it = iterator
while (i < n && it.hasNext) {
- it.next
+ it.next()
i += 1
}
- (b ++= it).result
+ (b ++= it).result()
}
override /*TraversableLike*/ def takeWhile(p: A => Boolean): Repr = {
val b = newBuilder
val it = iterator
while (it.hasNext) {
- val x = it.next
- if (!p(x)) return b.result
+ val x = it.next()
+ if (!p(x)) return b.result()
b += x
}
- b.result
+ b.result()
}
/** Partitions elements in fixed size ${coll}s.
@@ -158,7 +158,7 @@ self =>
for (xs <- iterator grouped size) yield {
val b = newBuilder
b ++= xs
- b.result
+ b.result()
}
/** Groups elements in fixed size blocks by passing a "sliding window"
@@ -187,7 +187,7 @@ self =>
for (xs <- iterator.sliding(size, step)) yield {
val b = newBuilder
b ++= xs
- b.result
+ b.result()
}
/** Selects last ''n'' elements.
@@ -203,11 +203,11 @@ self =>
val lead = this.iterator drop n
var go = false
for (x <- this.seq) {
- if (lead.hasNext) lead.next
+ if (lead.hasNext) lead.next()
else go = true
if (go) b += x
}
- b.result
+ b.result()
}
/** Selects all elements except last ''n'' ones.
@@ -224,17 +224,17 @@ self =>
val it = iterator
while (lead.hasNext) {
b += it.next
- lead.next
+ lead.next()
}
- b.result
+ b.result()
}
override /*TraversableLike*/ def copyToArray[B >: A](xs: Array[B], start: Int, len: Int) {
var i = start
val end = (start + len) min xs.length
val it = iterator
while (i < end && it.hasNext) {
- xs(i) = it.next
+ xs(i) = it.next()
i += 1
}
}
@@ -244,21 +244,21 @@ self =>
val these = this.iterator
val those = that.iterator
while (these.hasNext && those.hasNext)
- b += ((these.next, those.next))
- b.result
+ b += ((these.next(), those.next()))
+ b.result()
}
def zipAll[B, A1 >: A, That](that: GenIterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Repr, (A1, B), That]): That = {
val b = bf(repr)
val these = this.iterator
val those = that.iterator
while (these.hasNext && those.hasNext)
- b += ((these.next, those.next))
+ b += ((these.next(), those.next()))
while (these.hasNext)
- b += ((these.next, thatElem))
+ b += ((these.next(), thatElem))
while (those.hasNext)
- b += ((thisElem, those.next))
- b.result
+ b += ((thisElem, those.next()))
+ b.result()
}
def zipWithIndex[A1 >: A, That](implicit bf: CanBuildFrom[Repr, (A1, Int), That]): That = {
@@ -268,7 +268,7 @@ self =>
b += ((x, i))
i +=1
}
- b.result
+ b.result()
}
def sameElements[B >: A](that: GenIterable[B]): Boolean = {
Oops, something went wrong.

0 comments on commit 41703df

Please sign in to comment.