diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-08-05 10:58:25 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-08-05 11:04:04 -0700 |
commit | ecf9128d8bf7a965492f0b714876650bba66b040 (patch) | |
tree | 406db7c5db708d03891b463613e3ecd8f210ce19 /src/library/scala | |
parent | b8744bafd7a9b3836932cd8348cc6d7cc83cec17 (diff) | |
parent | 928e6892d4fc10a953e0121fbefcae54bff1ab0c (diff) | |
download | scala-ecf9128d8bf7a965492f0b714876650bba66b040.tar.gz scala-ecf9128d8bf7a965492f0b714876650bba66b040.tar.bz2 scala-ecf9128d8bf7a965492f0b714876650bba66b040.zip |
Merge branch '2.11.x' into 2.12.x
Transcript:
```
➜ scala git:(2.12.x) export MB=$(git merge-base 2.12.x 2.11.x)
➜ scala git:(2.12.x) echo $MB
0e9525aa618a2eca143a1c7379ff1e6efd23b86e
➜ scala git:(2.12.x) g log --oneline --graph $MB...2.11.x
```
Read this upside down :-). The last merge comes first,
with merge commands interspersed in the git log.
```
➜ scala git:(2.12.x) g merge 2.11.x
Auto-merging versions.properties
Auto-merging src/reflect/scala/reflect/internal/pickling/UnPickler.scala
Auto-merging src/reflect/scala/reflect/internal/Types.scala
Auto-merging src/reflect/scala/reflect/internal/TreeGen.scala
Auto-merging src/library/scala/collection/immutable/Stream.scala
Auto-merging src/library/scala/collection/convert/Wrappers.scala
Auto-merging build.xml
CONFLICT (content): Merge conflict in build.xml
Auto-merging README.md
Automatic merge failed; fix conflicts and then commit the result.
```
```
* 928e6892d4 (scala/2.11.x, 2.11.x) Merge pull request #4682 from adriaanm/jline-quick.bin
|\
| * b763dbf368 (adriaanm/jline-quick.bin, jline-quick.bin) Include jline on quick.bin tool path
* | ccded7d179 Merge pull request #4680 from janekdb/2.11.x-option
|\ \
| |/
|/|
| * 58ae3e51f7 Delegate null test to Option
|/
* a745f06e35 Merge pull request #4670 from retronym/ticket/9422
|\
| * ec95e534a2 SI-9422 Fix incorrect constant propagation
* 65fa73dff3 Merge pull request #4669 from janekdb/2.11.x-scaladoc-reflect
|\
| * e206a1837d ScalaDoc fixes for reflect
* | 8e7e3b4a5f Merge pull request #4667 from janekdb/2.11.x-scaladoc-library-library-aux
|\ \
| |/
|/|
| * 69c2c106fe ScalaDoc fixes for library and library-aux
* | 7de4cbc5e5 Merge pull request #4665 from lrytz/asm-504-3
|\ \
| * | cdc55c29d0 Upgrade scala-asm to 5.0.4-scala-3
|/ /
* | d8da39a197 Merge pull request #4661 from retronym/ticket/9365
|\ \
| * | 0c99742c51 SI-9365 Don't null out dependencies of transient lazy vals
| /
* | 2279d3f3d9 Merge pull request #4662 from janekdb/2.11.x-redundant-val-modifier
|\ \
| * | 173a6fad95 Remove redundant 'val' from case class params.
* | | e0d21432d6 Merge pull request #4664 from SethTisue/remove-dead-link-in-readme
|\ \ \
| |_|/
|/| |
| * | 600fc4e6e1 fix readme for death of typesafe.artifactoryonline.com
| |/
* | 7492bda816 Merge pull request #4636 from SethTisue/contributor-stuff-from-github-wiki
|\ \
| |/
|/|
| * ed5098dbc4 merge two reviewers lists in readme
| * e136e4ad47 tighten up CONTRIBUTING.md a little
| * f9ca6863d4 readme/contributor's guide tweaks
| * 80e98b03a1 tiny readme fix
| * 197845620c merge in text from pull request policy from old wiki
| * e93ca409ae drop in pull request policy from old wiki
| * 951939d1b3 contributor guide: add a morsel salvaged from GitHub wiki
* f682441f6f Merge pull request #4653 from lrytz/t9403
|\
| * 2678d349b2 SI-9403 fix ICodeReader for negative BIPUSH / SIPUSH values
```
```
➜ scala git:(2.12.x) g merge -s ours f2d7838d90
Merge made by the 'ours' strategy.
```
```
* f2d7838d90 Merge pull request #4657 from lrytz/backports
|\
| * 241bb9ac19 Rename the ENUM / DEFAULTMETHOD flags to include JAVA_
| * 7a7f9927c3 SI-9393 fix modifiers of ClassBTypes for Java annotations
| * 8946d60bd2 [backport] Fix bytecode stability when running the closure optimizer
| * 3b6b2bfe9f [backport] SI-9392 Clarify the workaround comment and introduce a devWarning
| * 091c1e6ed8 [backport] SI-9392 Avoid crash in GenBCode for incoherent trees
| * 6177cb4481 [backport] SI-9393 Temporarily disable two assertions in GenBCode
| * a1d471f7ba [backport] Refactor the ClosureOptimizer, run ProdCons only once per method
| * f5e72765f2 [backport] SI-9387 Fix VerifyError introduced by indylambda
| * 41b99e2531 [backport] Integrate the LMFInvokeDynamic extractor into LambdaMetaFactoryCall
| * fc1cda2118 [backport] Small refactoring to the closure optimizer
| * 8f272c0ad2 [backport] Accessibility checks for methods with an InvokeDynamic instruction
| * 1c1d8259b5 [backport] Fix bytecode stability
| * ef9d845676 [backport] Support methodHandle / invokeDynamic constant pool entries in scalap
| * 60747c7555 [backport] Skip mirror class when invoking deserializeLambda
| * 404e86239e [backport] Prevent infinite recursion in ProdConsAnalyzer
| * 1b0703e74d [backport] SI-9376 don't crash when inlining a closure body that throws.
| * e511375a90 [backport] Fix superclass for Java interface symbols created in JavaMirrors
| * 1b57723169 [backport] `deserializeLambda` should not use encoded class name
| * 8bafa8ed88 [backport] Java parser: default methods in interfaces are not `DEFERRED`
| * 44e2761a9b [backport] SI-6613 fixed in GenBCode
```
```
➜ scala git:(2.12.x) g merge 4c6dcfe934
Auto-merging src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala
Auto-merging doc/License.rtf
Auto-merging doc/LICENSE.md
Auto-merging build.xml
Auto-merging build.sbt
Merge made by the 'recursive' strategy.
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
build.sbt | 2 +-
build.xml | 2 +-
doc/LICENSE.md | 4 ++--
doc/License.rtf | 4 ++--
src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala | 2 +-
src/scalap/decoder.properties | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
```
```
* | 4c6dcfe934 Merge pull request #4656 from lrytz/filtersOpenJDK
|\ \
| |/
|/|
| * 0b35bc29aa Ignore OpenJDK warnings in partest filters
* 6eb0812050 Merge pull request #4644 from SethTisue/copyright-2015
* e0aac7c9ef bump copyright year to 2015
```
Diffstat (limited to 'src/library/scala')
-rw-r--r-- | src/library/scala/StringContext.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/GenSeqLike.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/convert/Wrappers.scala | 41 | ||||
-rw-r--r-- | src/library/scala/collection/immutable/Stream.scala | 2 | ||||
-rw-r--r-- | src/library/scala/compat/Platform.scala | 2 | ||||
-rw-r--r-- | src/library/scala/math/BigDecimal.scala | 2 | ||||
-rw-r--r-- | src/library/scala/ref/WeakReference.scala | 5 | ||||
-rw-r--r-- | src/library/scala/reflect/Manifest.scala | 4 |
8 files changed, 16 insertions, 44 deletions
diff --git a/src/library/scala/StringContext.scala b/src/library/scala/StringContext.scala index e60fa2f290..69533c12da 100644 --- a/src/library/scala/StringContext.scala +++ b/src/library/scala/StringContext.scala @@ -173,7 +173,7 @@ object StringContext { /** An exception that is thrown if a string contains a backslash (`\`) character * that does not start a valid escape sequence. * @param str The offending string - * @param idx The index of the offending backslash character in `str`. + * @param index The index of the offending backslash character in `str`. */ class InvalidEscapeException(str: String, @deprecatedName('idx) val index: Int) extends IllegalArgumentException( s"""invalid escape ${ diff --git a/src/library/scala/collection/GenSeqLike.scala b/src/library/scala/collection/GenSeqLike.scala index f786293822..be1da1660a 100644 --- a/src/library/scala/collection/GenSeqLike.scala +++ b/src/library/scala/collection/GenSeqLike.scala @@ -274,7 +274,7 @@ trait GenSeqLike[+A, +Repr] extends Any with GenIterableLike[A, Repr] with Equal * @tparam B the element type of the returned $coll. * @tparam That $thatinfo * @param bf $bfinfo - * @return a new $coll` which is a copy of this $coll with the element at position `index` replaced by `elem`. + * @return a new $coll which is a copy of this $coll with the element at position `index` replaced by `elem`. * @throws IndexOutOfBoundsException if `index` does not satisfy `0 <= index < length`. * * @usecase def updated(index: Int, elem: A): $Coll[A] diff --git a/src/library/scala/collection/convert/Wrappers.scala b/src/library/scala/collection/convert/Wrappers.scala index c2da66a9bf..3edc5ba1b4 100644 --- a/src/library/scala/collection/convert/Wrappers.scala +++ b/src/library/scala/collection/convert/Wrappers.scala @@ -266,17 +266,11 @@ private[collection] trait Wrappers { def +=(kv: (A, B)): this.type = { underlying.put(kv._1, kv._2); this } def -=(key: A): this.type = { underlying remove key; this } - override def put(k: A, v: B): Option[B] = { - val r = underlying.put(k, v) - if (r != null) Some(r) else None - } + override def put(k: A, v: B): Option[B] = Option(underlying.put(k, v)) override def update(k: A, v: B) { underlying.put(k, v) } - override def remove(k: A): Option[B] = { - val r = underlying remove k - if (r != null) Some(r) else None - } + override def remove(k: A): Option[B] = Option(underlying remove k) def iterator: Iterator[(A, B)] = new AbstractIterator[(A, B)] { val ui = underlying.entrySet.iterator @@ -327,25 +321,15 @@ private[collection] trait Wrappers { * are not guaranteed to be atomic. */ case class JConcurrentMapWrapper[A, B](underlying: juc.ConcurrentMap[A, B]) extends mutable.AbstractMap[A, B] with JMapWrapperLike[A, B, JConcurrentMapWrapper[A, B]] with concurrent.Map[A, B] { - override def get(k: A) = { - val v = underlying get k - if (v != null) Some(v) - else None - } + override def get(k: A) = Option(underlying get k) override def empty = new JConcurrentMapWrapper(new juc.ConcurrentHashMap[A, B]) - def putIfAbsent(k: A, v: B): Option[B] = { - val r = underlying.putIfAbsent(k, v) - if (r != null) Some(r) else None - } + def putIfAbsent(k: A, v: B): Option[B] = Option(underlying.putIfAbsent(k, v)) def remove(k: A, v: B): Boolean = underlying.remove(k, v) - def replace(k: A, v: B): Option[B] = { - val prev = underlying.replace(k, v) - if (prev != null) Some(prev) else None - } + def replace(k: A, v: B): Option[B] = Option(underlying.replace(k, v)) def replace(k: A, oldvalue: B, newvalue: B): Boolean = underlying.replace(k, oldvalue, newvalue) @@ -381,25 +365,16 @@ private[collection] trait Wrappers { case class JDictionaryWrapper[A, B](underlying: ju.Dictionary[A, B]) extends mutable.AbstractMap[A, B] with mutable.Map[A, B] { override def size: Int = underlying.size - def get(k: A) = { - val v = underlying get k - if (v != null) Some(v) else None - } + def get(k: A) = Option(underlying get k) def +=(kv: (A, B)): this.type = { underlying.put(kv._1, kv._2); this } def -=(key: A): this.type = { underlying remove key; this } - override def put(k: A, v: B): Option[B] = { - val r = underlying.put(k, v) - if (r != null) Some(r) else None - } + override def put(k: A, v: B): Option[B] = Option(underlying.put(k, v)) override def update(k: A, v: B) { underlying.put(k, v) } - override def remove(k: A): Option[B] = { - val r = underlying remove k - if (r != null) Some(r) else None - } + override def remove(k: A): Option[B] = Option(underlying remove k) def iterator = enumerationAsScalaIterator(underlying.keys) map (k => (k, underlying get k)) diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index 1d0d40a1d8..5989517532 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -1129,7 +1129,7 @@ object Stream extends SeqFactory[Stream] { def #:::(prefix: Stream[A]): Stream[A] = prefix append tl } - /** A wrapper method that adds `#::` for cons and `#::: for concat as operations + /** A wrapper method that adds `#::` for cons and `#:::` for concat as operations * to streams. */ implicit def consWrapper[A](stream: => Stream[A]): ConsWrapper[A] = diff --git a/src/library/scala/compat/Platform.scala b/src/library/scala/compat/Platform.scala index 4c82d6e15b..42dfcbfdde 100644 --- a/src/library/scala/compat/Platform.scala +++ b/src/library/scala/compat/Platform.scala @@ -41,7 +41,7 @@ object Platform { * @throws java.lang.ArrayStoreException If either `src` or `dest` are not of type * [java.lang.Array]; or if the element type of `src` is not * compatible with that of `dest`. - * @throws java.lang.IndexOutOfBoundsException If either srcPos` or `destPos` are + * @throws java.lang.IndexOutOfBoundsException If either `srcPos` or `destPos` are * outside of the bounds of their respective arrays; or if `length` * is negative; or if there are less than `length` elements available * after `srcPos` or `destPos` in `src` and `dest` respectively. diff --git a/src/library/scala/math/BigDecimal.scala b/src/library/scala/math/BigDecimal.scala index 6bb35606a6..bb337e7a1d 100644 --- a/src/library/scala/math/BigDecimal.scala +++ b/src/library/scala/math/BigDecimal.scala @@ -124,7 +124,7 @@ object BigDecimal { */ def exact(s: String): BigDecimal = exact(new BigDec(s)) - /** Constructs a 'BigDecimal` that exactly represents the number + /** Constructs a `BigDecimal` that exactly represents the number * specified in base 10 in a character array. */ def exact(cs: Array[Char]): BigDecimal = exact(new BigDec(cs)) diff --git a/src/library/scala/ref/WeakReference.scala b/src/library/scala/ref/WeakReference.scala index 6ee40aed5c..9dcc0bbe5f 100644 --- a/src/library/scala/ref/WeakReference.scala +++ b/src/library/scala/ref/WeakReference.scala @@ -28,10 +28,7 @@ object WeakReference { def apply[T <: AnyRef](value: T) = new WeakReference(value) /** Optionally returns the referenced value, or `None` if that value no longer exists */ - def unapply[T <: AnyRef](wr: WeakReference[T]): Option[T] = { - val x = wr.underlying.get - if (x != null) Some(x) else None - } + def unapply[T <: AnyRef](wr: WeakReference[T]): Option[T] = Option(wr.underlying.get) } /** diff --git a/src/library/scala/reflect/Manifest.scala b/src/library/scala/reflect/Manifest.scala index 2f7643bccf..4ff49c44d0 100644 --- a/src/library/scala/reflect/Manifest.scala +++ b/src/library/scala/reflect/Manifest.scala @@ -248,7 +248,7 @@ object ManifestFactory { def arrayType[T](arg: Manifest[_]): Manifest[Array[T]] = arg.asInstanceOf[Manifest[T]].arrayManifest - /** Manifest for the abstract type `prefix # name'. `upperBound` is not + /** Manifest for the abstract type `prefix # name`. `upperBound` is not * strictly necessary as it could be obtained by reflection. It was * added so that erasure can be calculated without reflection. */ def abstractType[T](prefix: Manifest[_], name: String, upperBound: Predef.Class[_], args: Manifest[_]*): Manifest[T] = @@ -269,7 +269,7 @@ object ManifestFactory { (if (upperBound eq Nothing) "" else " <: "+upperBound) } - /** Manifest for the intersection type `parents_0 with ... with parents_n'. */ + /** Manifest for the intersection type `parents_0 with ... with parents_n`. */ def intersectionType[T](parents: Manifest[_]*): Manifest[T] = new Manifest[T] { def runtimeClass = parents.head.runtimeClass |