| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
a few missing deprecations in proxy collections.
|
| |
| |
| |
| |
| |
| | |
SeqProxy was properly deprecated, so were the CollProxyLike classes, and
the ones in collection.immutable, but these four somehow survived
the Big Proxy Deprecation (tm).
|
|\ \
| |/
|/| |
SI-6476 Improve error on escapement
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Behavior of escape processing under string interpolation can
be confusing. This commit improves the exception message so
you know at least what sort of escapes are handled.
This came up on SO in the form `s"\d".r`, where it may not
be obvious what is throwing and how to work around it.
```
scala> s"\d".r
scala.StringContext$InvalidEscapeException: invalid escape '\d' not one of [\b, \t, \n, \f, \r, \\, \", \'] at index 0 in "\d". Use \\ for literal \.
scala> s"a\"
scala.StringContext$InvalidEscapeException: invalid escape at terminal index 1 in "a\". Use \\ for literal \.
```
Referencing SI-6476 because that has become the magnet ticket
for "escape processing under string interpolation, huh?"
This doesn't address `$"` and doesn't handle the more interesting
parse error `s"a\"b"`.
|
| |
| |
| | |
As pointed out by @som-snytt, \u0023 is #, not \u0025.
|
| |
| |
| | |
Since StringContext.raw doesn't escape its input, it does not call `treatEscapes` and cannot throw the InvalidEscapeException.
|
|/
|
|
|
|
| |
Missed the case of comparing a non-empty range to an empty one. Fixed by checking nonEmpty/isEmpty on other collection.
Added a test to verify the behavior.
|
|
|
|
|
|
|
| |
- link to Java API docs for ForkJoinPool-based default implementation
- add example for creating an execution context from a `java.util.concurrent.ExecutorService`
- add tags for parameters and return values
- expand doc comment for `prepare`
|
|\
| |
| | |
SI-8677 Duration: Zero - Inf should be MinusInf
|
| |
| |
| |
| |
| | |
Fixes #8677. Add basic tests.
This is a backport from 2.12.x of dead39dc5f21c6eac41788e93426c50ddd398c24.
|
|\ \
| | |
| | | |
SI-8335 List.++ avoidably burns memory
|
| | |
| | |
| | |
| | | |
Changed to check the identity of the CanBuildFrom instead of the identity of the generated builder to shortcut building. Should reduce memory churn on ++ a little.
|
|\ \ \
| |_|/
|/| | |
SI-8638 Empty UnrolledBuffer hangs on prepend.
|
| |/
| |
| |
| |
| |
| | |
Tracked down bug to incorrect recursion in insertAll. Fixed by adding a missing case (which incidentally will provide better performance when adding to the end of a block).
No specific tests, as this is caught by quasi-complete collections tests.
|
|\ \
| | |
| | | |
SI-5200 Incorrect advice for implementing mutable.Set in scaladoc
|
| |/
| |
| |
| | |
Fixed advice; it was already there in mutable.SetLike but a case sensitivity error kept it from appearing.
|
|\ \
| | |
| | | |
SI-7115 JMapWrapper.get can incorrectly return Some(null)
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This isn't incorrect. Trying to use a single-threaded interface in a concurrent context is supposed to break in various unpleasant ways.
Documentation has been added to encourage one to avoid wrapping a concurrent map in the generic wrapper (which assumes a single thread), and pointing out that synchronized maps do not maintain synchronization for non-atomic operations (including get).
More docs.
|
|\ \
| | |
| | | |
SI-7577 Incorrect documentation: current default isn't Vector
|
| | |
| | |
| | |
| | | |
Fixed documentation to specify List in four cases where it was wrong or missing.
|
| |/
|/|
| |
| |
| |
| |
| | |
mkString is overriden in BufferedSource for performance, but the
implementation always used the wrong reader. This seems to be a typo
(`allReader` is declared 5 lines earlier but never used, `charReader`
is used in its place).
|
|\ \
| | |
| | | |
SI-7562 Regex.findAllIn does not report all matches
|
| |/
| |
| |
| | |
Changed findAllIn docs to clarify that it finds non-overlapping matches.
|
|\ \
| |/
|/| |
SI-7372 fix wrong insertion point for binary & linear search.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The public facing binarySearch method used an inclusive 'from'
parameter, while the internal @tailrec one used an *exclusive*
'from' parameter. No wonder there was an off-by-one error somewhere.
This makes both methods use the same exclusive 'from' parameter.
|
| |
| |
| |
| |
| | |
It should return the position the value would have if it was a part of
the sequence. Somehow even the test was wrong.
|
|\ \
| | |
| | | |
SI-6967 Fix ClassTag unapply for primitives
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit fixes the behavior of ClassTag's Any-accepting unapply
overload. Previously, ClassTag had overloads of unapply that accepted
all of the Java primitive aliases (language-supported magic classes
extending AnyVal), as well as an implementation that accepted an Any.
All of the AnyVal-accepting (more specific) versions of the methods
worked correctly. However, the Any-accepting version incorrectly handled
these types. For example, ClassTag.Int.unapply(3) would return Some(3)
(through the Int-accepting overload), while ClassTag.Int.unapply(3: Any)
would return None (through the Any-accepting overload). This commit
unifies these behaviors, making ClassTag.Int.unapply(3: Any) return
Some(3). It accomplishes this by adding a pattern match on the type of
that method's argument, which will delegate to one of the
more-specifically-typed overloads if possible. It also improves the
formatting of the code a bit.
One thing to note (though I doubt anyone will ever do this based on this
message) is that the AnyVal-subtype-accepting overloads should be
removed in Scala 2.12, as they are unneeded. I placed a note to this
effect into the code.
|
|\ \ \
| | | |
| | | | |
SI-6409 Stream flatMap leaks memory if mapper returns many empties
|
| |/ /
| | |
| | |
| | | |
Added Scaladoc explaining that this is necessary behavior, but closed ticket as wontfix.
|
|\ \ \
| | | |
| | | | |
SI-8503 -version is info setting
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
And the Scala runner exits with 0 for info settings.
Producing the version string is consolidated.
The compiler driver uses the default settings hook to
short-circuit on -version. That's to avoid creating
the compiler; really it should check shouldStopWithInfo
first, as the runner does.
|
|\ \ \ \
| | | | |
| | | | | |
Add documentation to parts of scala.concurrent.
|
| | |_|/
| |/| | |
|
|\ \ \ \
| |/ / /
|/| | | |
SI-8553 WrappedArray throws exception on lastIndexWhere when index out of range
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adds a check in `IndexedSeqOptimized#lastIndexWhere(A => Boolean, Int)`
to begin searching in the end of the collection if `end` is greater than
the collection's length.
Discussed in
https://groups.google.com/d/topic/scala-internals/-MacXivbY0Q/discussion.
|
|\ \ \ \
| | | | |
| | | | | |
SI-8475 GroupedIterator is also lazy when padded
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is the related case which dnlgtm in the previous fix.
The old code seems to be tilting for laziness, but we have
to fill the buffer with the current group anyway, so there
is no reason to be coy about calling ArrayBuffer.length.
|
|\ \ \ \
| |_|_|/
|/| | | |
Deprecate AVLTree and concurrent.Lock in 2.11.2
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
SI-8346 Rebuild invariant sets in #toSet, avoiding CCE
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
SI-3953 caused several types of sets' operations to trivially throw
`ClassCastException` after using inherited covariant #toSet method, by
doing an unchecked cast that is only safe for intrinsically covariant
set data structures like `HashSet`, but totally unsafe for others like
`TreeSet` or `Enumeration.ValueSet`.
This change moves the cast to the leaves of the class hierarchy where
that is safe, and incidentally undeprecates overriding Set#toSet.
|
|\ \ \
| |/ /
|/| | |
SI-8475 Fix off by one in GroupedIterator when Streaming
|
| | |
| | |
| | |
| | | |
This also affected sliding and grouped since they defer to GroupedIterator
|
|\ \ \
| | | |
| | | | |
SI-8587 Explicitly document forall/exists for empty collections
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
This behaviour isn't always intuitive for newcomers.
Also changes inadvertant doc comment to an impl. comment.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
This mild refactor eliminates the lazy val StringBuilder
and arguably makes the code easier to read.
There is a small unit test but no benchmark to prove
anything useful about performance. The ticket notes
contention due to lazy implementation.
|
|\ \
| | |
| | | |
SI-8504 fix NPE in the Java wrapper for a Scala Map.
|
| |/
| |
| |
| | |
MapWrapper blindly calls .hashCode on keys that can very well be null.
|
|\ \
| | |
| | | |
SI-8550 fix scaladoc for the default s.c.LinearSeq.
|