| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
google code is dead
http://google-opensource.blogspot.jp/2015/03/farewell-to-google-code.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sanity check:
scala> case class P2(i: Int, j: Int)
defined class P2
val p2 = P2(1, 3)
p2.productElement(0)
res0: Any = 1
p2.productElement(1)
res1: Any = 3
p2.productElement(2)
java.lang.IndexOutOfBoundsException: 2
at P2.productElement(<console>:10)
|
|\
| |
| | |
SI-9624 Improve documentation for TraversableOnce
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Move the doc comment for `hasDefiniteSize` up from TraversableLike
to GenTraversableOnce and improve it.
- Add a note to `GenTraversableOnce.isEmpty` that implementations must
not consume elements.
- Clarify alternatives to subclassing TraversableOnce.
|
|\ \
| | |
| | | |
SI-9623 Avoid unnecessary hasNext calls in JoinIterator & ConcatIterator
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These iterator implementations are used to concatenate two (JoinIterator)
or more (ConcatIterator) other iterators with `++`. They used to perform
many unnecessary calls to the child iterators’ `hasNext` methods.
This improved state machine-based implementation reduces that number to
the bare minimum, i.e. iterating over concatenated iterators with
`foreach` calls the children's `hasNext` methods a total of (number of
children) + (number of elements) times, the same as when iterating over
all children separately.
|
| |/
|/| |
|
|/
|
|
|
|
|
|
| |
Calling `wrap` or one of the higher-dimension Array factory methods on
the `Manifest` for `Unit` led to an exception because it tried to use
`void` as a primitive type. Unlike all other primitive Scala types,
`Unit` needs to be boxed. The basic `newArray` method was not affected
by this bug because it was already special-cased. The fix is to also
special-case `arrayClass`.
|
| |
|
|\
| |
| | |
Fix Scaladoc overloaded method link to Duration companion object
|
| |
| |
| |
| |
| |
| | |
The links were being skipped with a warning before this commit.
The key change was to remove the result type and add an asterisk.
|
|\ \
| | |
| | | |
SI-9605 Searching does not use binary search for Array
|
| |/
| |
| |
| | |
Binary search should be used for every `IndexedSeqLike` instance and not only for `IndexedSeq`. According the Scaladoc, it is `IndexedSeqLike` that guarantees "constant-time or near constant-time element access and length computation".
|
|/
|
|
|
| |
Docs for >> operation of integer types (from Byte to Long) had a wrong
direction saying that it is bit-shift left.
|
|\
| |
| | |
Document JavaConverters conversion from java.util.Properties to Map
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also
- Fix grammar on duplicated DecorateAsJava comment by copying over from
JavaConverters
- Remove author tags
|
|\ \
| | |
| | | |
add doc for log, sqrt
|
| | | |
|
| | |
| | |
| | |
| | | |
It's useful to know that log is the natural logarithm, not 10log or 2log or so.
Also did sqrt "while I was at it"
|
| |/
|/|
| |
| |
| |
| | |
Fixes the index/length comparison in `Vector#take` and `Vector#drop` so that they handle all possible integer values.
Given the collection's invariants `startIndex >= endIndex` and `0 >= startIndex, endIndex`, it is sufficient to change the arithmetic in the comparison as done in this commit to avoid overflows. As cases when `n <= 0` are handled beforehand, `endIndex - n` cannot overflow, contrary to `startIndex + n`. If without the danger of overflows the condition yields true, on the other hand, `startIndex + n` cannot overflow as it is smaller than `endIndex` (as the previous formulation of the condition shows).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix a batch of code inspection recommendations generated by IntelliJ 14.1.5.
Categories of fix,
Unnecessary public modifier in interface
Replace filter+size with count
Replace filter+nonEmpty with exists
Replace filter+headOption with find
Replace `if (x != null) Some(x) else None` with Option(x)
Replace getOrElse null with orNull
Drop redundant semicolons
Replace anon fun with PF
Replace anon fun with method
|
| |
| |
| |
| |
| |
| |
| |
| | |
The Performance section got sucked into a wormhole and popped up in the
example tag. The laws of physics differ in the attributes block resulting
in the loss of the line break between the Time and Space paragraphs.
Fixed by moving the section out of the example tag.
|
|\ \
| | |
| | | |
SI-9497 Fix SetLike#clear() default implementation
|
| | |
| | |
| | |
| | | |
When dealing with mutable collections, it is not safe to assume iterators will remain consistent when the collection is modified mid-traversal. The bug reported in SI-9497 is very similar to SI-7269, "ConcurrentModificationException when filtering converted Java HashMap". Then, only the `retain` method was fixed. This commit fixes `clear`, which had the same problem.
|
|\ \ \
| | | |
| | | | |
[SI-9503] Deprecate scala.collection.immutable.PagedSeq
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Remove some duplicate method documentation that is now inherited
- Whitespace edits
- Rewording of method docs
- Clearer usage examples
- tparam alignment for some usecase tags
- Prefer () to { } for do nothing bodies
|
|\ \ \
| |_|/
|/| | |
Conform foreach tparam to majority naming convention
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'U' is the common choice for the foreach function result tparam.
This command summarises the naming diversity before and after this change.
$ fgrep -r 'def foreach[' *|cut -f2 -d:|cut -f1 -d'('|tr -s ' '|sed 's/override //g'|sort|uniq -c|sort -nr
Before,
80 def foreach[U]
6 def foreach[C]
6 def foreach[B]
4 final def foreach[U]
3 def foreach[S]
2 inline final def foreach[U]
2 def foreach[A]
1 inline final def foreach[specialized
1 final def foreach[B]
1 * def foreach[U]
1 def foreach[Q]
1 def foreach[D]
1 def foreach[A,B,U]
After,
98 def foreach[U]
5 final def foreach[U]
2 inline final def foreach[U]
1 inline final def foreach[specialized
1 * def foreach[U]
1 def foreach[A,B,U]
(@ symbols removed.)
|
|\ \
| |/
|/| |
Remove two lingering `println`s in non-debug methods of the library.
|
| | |
|
|\ \
| | |
| | | |
SI-9513 decrement "deleted" count in OpenHashMap.put() when slot reused
|
| | | |
|
| |/ |
|
|\ \
| | |
| | | |
explicitly specify insertion-order feature in docs
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Align parameters names to use p for predicates and op for combining operations.
Based on #4760. Extended to include,
- Tuple2Zipped
- Tuple3Zipped
- Either
The original author was vsalvis.
|
|
|
|
|
| |
Previously _.result() was invoked in the "real" ExecutionContext, but this is an
unnecessary use of the context.
|
| |
|
|\
| |
| | |
SI-9388 Fix Range behavior around Int.MaxValue
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
terminalElement (the element _after_ the last one!) was used to terminate foreach loops and sums of non-standard instances of Numeric. Unfortunately, this could result in the end wrapping around and hitting the beginning again, making the first element bad.
This patch fixes the behavior by altering the loop to end after the last element is encountered. The particular flavor was chosen out of a few possibilities because it gave the best microbenchmarks on both large and small ranges.
Test written. While testing, a bug was also uncovered in NumericRange, and was also fixed. In brief, the logic around sum is rather complex since division is not unique when you have overflow. Floating point has its own complexities, too.
Also updated incorrect test t4658 that insisted on incorrect answers (?!) and added logic to make sure it at least stays self-consistent, and fixed the range.scala test which used the same wrong (overflow-prone) formula that the Range collection did.
|
|\ \
| | |
| | | |
Fix NPE in PagedSeq.slice at end of seq
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
See https://github.com/scala/scala-parser-combinators/issues/70
Basically the same thing as SI-6615, including the fact everything
works okay if the PagedSeq is printed before calling slice.
It might seem strange that this allows taking slices that start beyond
the end, but
- this was possible anyway if one forced the entire sequence, and
- it is reasonable to be able to take a slice at the very end (not
beyond it) and get an empty sequence, which is exactly what
StreamReader in scala-parser-combinators does and gets an NPE.
|
|/
|
|
|
|
|
| |
a little piece of #4644 I missed. fixes this:
% scala -version
Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL
|
|\
| |
| | |
Improve drifted URLs
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Any.scala: Link to the guide instead of the SIP.
- AnyVal.scala: Remove SIP link and align guide link to Any.scala.
- Commands.scala: Use a less out of date team link.
- Logic.scala: Link was broken. Substitute found.
- Process.scala: Links were 403 & 404. Fixed as this is a code sample.
- TypeMaps.scala: Move old EPFL Trac to JIRA.
- RedBlackTree.scala: Replaced broken link with substitutes based on site maintainer input [1].
[1] When asked where Data-Set-RBTree.html had gone Don@UNSW advised
"I think it's on the Haskell wiki now. It was Chris Okazaki's version".
The closest I could find to what this document probably was is this
paper by Hinze edited by Okasaki,
http://www.cs.ox.ac.uk/ralf.hinze/publications/WAAAPL99b.ps.gz
The paper cites the Okasaki document so I included a link to that as
well.
The Haskell Wiki does have a link to a RB document but that's broken
too,
https://wiki.haskell.org/Research_papers/Data_structures >
Constructing red-black trees
|
|\ \
| | |
| | | |
Update links to docs, codehaus and citeseer
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
docs.scala-lang.org
- Align some links to new layout for docs.scala-lang.org
- Include link to concrete parallel collection performance characteristics
codehaus
- Subsitute a link to a JIRA email for the 404 JRUBY-3576 JIRA link
in Codec.scala. jira.codehaus.org is not redirecting this.
citeseer
- Replace the citeseer link with a direct link to a PDF which is not
behind a login challenge.
|
|\ \ \
| | | |
| | | | |
Restore missing element type to List class documentation
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
See line 18,
git show cb1c0c src/library/scala/collection/immutable/List.scala|head -20|cat -n
This shows the type reference prior to removal.
|