summaryrefslogtreecommitdiff
path: root/src/library/scala/util
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5778 from som-snytt/issue/10225som-snytt2017-03-231-331/+283
|\ | | | | SI-10225 Either docs compile
| * SI-10225 Either evinces good styleSom Snytt2017-03-211-58/+54
| | | | | | | | Per Seth.
| * SI-10225 Either docs compileSom Snytt2017-03-141-317/+273
| | | | | | | | | | | | | | | | But without tut support, who knows. Boy scout aligns stars and updates several examples that didn't infer types in a way that compiles.
* | Fix and improve Regex docSom Snytt2017-03-101-16/+30
|/ | | | | | As reported by @djvulee, there was an error in the example explaining the confusing behavior of `MatchIterator`. It's really confusing.
* SD-256 enable colored output by default on unixAntoine Gourlay2017-02-211-0/+6
| | | | | | | | | `scala.color` now has 3 states: `true`, `false` and `auto` (the default). `auto` allows colors if not on windows and if the shell is interactive (as in, both stdin and stdout are a tty). The autodetect works as expected when run via SBT too, and it can always be overriden on the CLI or via JAVA_OPTS.
* Merge pull request #5607 from adriaanm/rebase-5551Adriaan Moors2016-12-211-0/+3
|\ | | | | Override equals and hashCode for WrappedArray
| * Override equals and hashCode for WrappedArrayAlexey Romanov2016-12-211-0/+3
| |
* | Fix how "sbt" is writtenDale Wijnand2016-12-211-1/+1
|/ | | | | | | | "sbt" is not an acronym (it used to be, but it isn't any longer). It's a proper name, like "iPhone" or "eBay". So, just like you wouldn't write "Get Started With EBay" or "How To Reset Your IPhone", we don't write "Using the Sbt Build".
* Revert "SI-9750 isJavaAtLeast(Int)"Jason Zaugg2016-11-161-6/+0
| | | | | | This reverts commit 656162bb48fbbd703790a2c94d4563e40ddfdfc2. Adding new APIs is not possible until a major release.
* Typo and spelling correctionsJanek Bogucki2016-11-111-1/+1
|
* Merge pull request #5276 from som-snytt/issue/9750Seth Tisue2016-10-261-17/+49
|\ | | | | SI-9750 scala.util.Properties.isJavaAtLeast works with JDK9
| * SI-9750 Spec check major.minor.securitySom Snytt2016-07-211-21/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't assume spec is just major, but allow arbitrary version number for both spec value and user value to check. Only the first three dot-separated fields are considered, after skipping optional leading value "1" in legacy format. Minimal validity checks of user arg are applied. Leading three fields, if present, must be number values, but subsequent fields are ignored. Note that a version number is not a version string, which optionally includes pre and build info, `9-ea+109`.
| * SI-9750 isJavaAtLeast(Int)Som Snytt2016-07-151-0/+2
| | | | | | | | | | A good opportunity to simplify the API. Versions are strings, but a spec version is just a number.
| * SI-9750 Tweak tests for what is a numberSom Snytt2016-07-151-1/+1
| | | | | | | | | | | | | | Leaves the error string as is, but adds test to show how it looks. Java calls it a version number. `Not a version: 1.9`. Don't strip `1.` prefix recursively. (That was Snytt's fault.)
| * SI-9750 scala.util.Properties.isJavaAtLeast works with JDK9Pavel Petlinsky2016-07-131-11/+15
| | | | | | | | | | | | | | | | | | | | The utility method compares javaSpecVersion, which has the form "1.8" previously and "9" going forward. The method accepts "1.n" for n < 9. More correctly, the string argument should be a single number. Supports JEP-223.
* | assorted typo fixes, cleanup, updating of commentsSeth Tisue2016-10-241-19/+19
| | | | | | | | | | | | just in time for Halloween. "boostrap" is definitely the most adorable typo evah -- and one of the most common, too. but we don't want to scare anybody.
* | don't deprecate Either.left and Either.right yetSeth Tisue2016-09-281-15/+13
| | | | | | | | | | | | | | | | | | | | | | for two reasons: * to facilitate warning-free cross-compilation between Scala 2.11 and 2.12 * because it's not clear that .swap is a good replacement for .left Either.right seems almost certain to be deprecated in 2.13. Either.left's future is uncertain; see discussion (and links to additional discussions) at https://github.com/scala/scala/pull/5135
* | Including Lightbend in `-version` message.Adriaan Moors2016-09-271-1/+1
| | | | | | | | Also consistently use "LAMP/EPFL" and not "EPFL LAMP".
* | Merge pull request #5302 from soc/topic/deprecation-fixes-2.12Lukas Rytz2016-08-091-3/+0
|\ \ | | | | | | Reduce deprecations and warnings
| * | Reduce deprecations and warningsSimon Ochsenreither2016-08-021-3/+0
| | |
* | | Merge pull request #5286 from soc/topic/biased-either-fixupStefan Zeiger2016-08-031-24/+48
|\ \ \ | |/ / |/| | Improve Scaladoc for Either:
| * | Improve Scaladoc for Either:Simon Ochsenreither2016-07-151-24/+48
| | | | | | | | | | | | | | | - remove text on projections - add for comprehensions
* | | Merge pull request #5281 from dwijnand/either-valueLukas Rytz2016-07-221-2/+6
|\ \ \ | | | | | | | | Deprecate and rename Left#a/Right#b to Left#value/Right#value
| * | | Deprecate and rename Left#a/Right#b to Left#value/Right#valueDale Wijnand2016-07-141-2/+6
| |/ /
* | | Merge pull request #5261 from som-snytt/issue/9827Stefan Zeiger2016-07-191-50/+92
|\ \ \ | |/ / |/| | SI-9827 MatchIterator advances itself
| * | SI-9827 MatchIterator advances itselfSom Snytt2016-07-181-50/+92
| |/ | | | | | | | | | | | | | | | | | | To avoid caveats about calling `next` (or `hasNext`) before using `MatchData` methods on `MatchIterator`, just do it internally as necessary. Note `MatchIterator` behavior in the docs. Added tests showing what people cried about.
* | Merge pull request #5135 from soc/topic/biased-eitherStefan Zeiger2016-07-131-76/+236
|\ \ | |/ |/| Right-bias Either
| * [squash] Fix bounds in containsSimon Ochsenreither2016-07-071-1/+1
| |
| * Right-bias EitherSimon Ochsenreither2016-05-271-76/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add operations like map, flatMap which assume right-bias - Deprecate {Left,Right}Projection - Deprecate left and right in favor of swap - Add contains, toOption, toTry, toSeq and filterOrElse - toSeq returns collection.immutable.Seq instead of collection.Seq - Don't add get There are no incompatible changes. The only possibility of breakage that exists is when people have added extension methods named map, flatMap etc. to Either in the past doing something different than the methods added to Either now. One detail that moved the scales in favor of deprecating LeftProjection and RightProjection was the desire to have toSeq return scala.collection.immutable.Seq instead of scala.collection.Seq like LeftProjection and RightProjection do. Therefore keeping LeftProjection and RightProjection would introduce inconsistency. filter is called filterOrElse because filtering in a for-comprehension doesn't work if the method needs an explicit argument. contains was added as safer alternative to if (either.isRight && either.right.get == $something) ... While adding filter with an implicit zero value is possible, it's dangerous as it would require that developers add a "naked" implicit value of type A to their scope and it would close the door to a future in which the Scala standard library ships with Monoid and filter could exist with an implicit Monoid parameter.
* | Add since arg to deprecationWarning and use itSimon Ochsenreither2016-05-291-1/+1
| |
* | Lower-case spelling of @deprecated messagesSimon Ochsenreither2016-05-282-6/+6
|/
* SI-9666: Use inline group names in Regex (#4990)som-snytt2016-05-111-7/+22
| | | | | | | | | | | | | | | | | | | | | Delegate `Match group name` to the underlying `matcher`. If that fails, try explicit group names as a fall back. No attempt is made to correlate inline and explicit names. In the following case, either name is accepted: ``` new Regex("a(?<Bar>b*)c", "Bee") ``` But if names are reversed, the error is undetected: ``` new Regex("a(?<Bee>b*)(?<Bar>c)", "Bar", "Bee") ``` Throw IllegalArg on bad group name to be consistent with Java.
* Add examples to Exception object and group members (#5111)Janek Bogucki2016-05-021-25/+165
| | | | | | - Extend main comment with additional examples - Group methods from a user perspective - List exceptions special cased by shouldRethrow - Include overlooked withTry in opt, either notes.
* General cleanups and less warnings during a Scala buildsoc2016-04-042-3/+0
|
* Merge pull request #5068 from retronym/topic/jdk8ism2v2.12.0-M4Lukas Rytz2016-04-012-1/+3
|\ | | | | Accomodate and exploit new library, lang features JDK 8
| * Use System.lineSeparator, rather than sys.propsJason Zaugg2016-03-291-1/+1
| |
| * Note the availability of writableStackTrace in JDK 1.7+Jason Zaugg2016-03-291-0/+2
| |
* | Add initial unit test for Catch and augment documentationJanek Bogucki2016-03-311-7/+13
|/ | | | | | - Add unit test for andFinally - Reduce code duplication in andFinally - Extend documentation
* Merge pull request #4934 from Shadow53/2.12.xSeth Tisue2016-03-011-0/+2
|\ | | | | Added Properties.isLinux to compliment the isWin and isMac methods
| * Added Properties.isLinux to compliment the isWin and isMac methodsShadow532016-01-301-0/+2
| |
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2016-02-252-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20160225 Conflicts: scripts/jobs/integrate/bootstrap src/build/maven/scala-actors-pom.xml test/files/pos/t3420.flags Conflicts were trivial to resolve.
| * | fix smhasher urlxuwei-k2016-02-152-2/+2
| | | | | | | | | | | | | | | google code is dead http://google-opensource.blogspot.jp/2015/03/farewell-to-google-code.html
* | | Merge branch '2.11.x' into topic/merge-2.11.x-to-2.12.x-20160210Jason Zaugg2016-02-101-1/+1
|\| | | |/ |/| | | | | | | | | | | | | Conflicts: src/library/scala/collection/Iterator.scala | `-- trivial conflicts only. Parens were added to the next() calls in 2.12.x, while in the meantime `{Concat,Join}Iterator` were optimized in 2.11.x
| * bump copyright year to 2016Seth Tisue2016-02-031-1/+1
| |
* | Remove unused imports and other minor cleanupsSimon Ochsenreither2015-12-183-14/+11
| | | | | | | | | | | | | | | | | | | | - Language imports are preceding other imports - Deleted empty file: InlineErasure - Removed some unused private[parallel] methods in scala/collection/parallel/package.scala This removes hundreds of warnings when compiling with "-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
* | Clarify source of f functionCasey Leask2015-11-261-1/+1
| |
* | merge 2.11.x onto 2.12.x, Oct 16 2015Seth Tisue2015-10-161-6/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there were merge conflicts in the Eclipse config that I resolved with --ours. I invite @performantdata to submit a followup PR bringing the Eclipse stuff into a good state on 2.12.x. there was a test failure in test/junit/scala/collection/mutable/OpenHashMapTest.scala due to the 2.12 compiler emitting the field backing a private var differently (with an unmangled name). Lukas says the difference is expected, so I just updated the code in the test. there were no other merge conflicts. % git log --decorate --oneline -1 origin/2.11.x | cat ae5f0de (origin/HEAD, origin/2.11.x) Merge pull request #4791 from performantdata/issue/9508 % git log --decorate --oneline -1 origin/2.12.x | cat c99e53e (HEAD -> 2.12.x, origin/2.12.x) Merge pull request #4797 from lrytz/M3-versions % export MB=$(git merge-base 2.12.x origin/2.11.x) % echo $MB 42cafa21f3c4a08c6dd34608278f810b6ec2886f % git log --graph --oneline --decorate $MB...origin/2.11.x | cat * ae5f0de (origin/HEAD, origin/2.11.x) Merge pull request #4791 from performantdata/issue/9508 |\ | * 08dca37 (origin/pull/4791) SI-9508 fix classpaths in Eclipse configuration * | fe76232 Merge pull request #4798 from performantdata/issue/9513 |\ \ | * | 9c97a7f (origin/pull/4798) Suppress unneeded import. | * | 30d704d Document some OpenHashMap internal methods. | * | 1fb32fc SI-9513 decrement "deleted" count in OpenHashMap.put() when slot reused | |/ * | 14f875c Merge pull request #4788 from dk14/patch-1 |\ \ | * | 42acd55 (origin/pull/4788) explicitly specify insertion-order feature in docs | / * | 68ce049 Merge pull request #4771 from som-snytt/issue/9492-here |\ \ | * | f290962 (origin/pull/4771) SI-9492 Line trimming paste | * | bc3589d SI-9492 REPL paste here doc | / * | 9834fc8 Merge pull request #4610 from todesking/spec-implicits-remove-obsolete |\ \ | * | 46009b1 (origin/pull/4610) Add view/context-bound parameter ordering rule | * | 6eba305 Spec: Implicit parameters with context/view bound is allowed since 2.10 | / * | d792e35 Merge pull request #4789 from janekdb/2.11.x-param-names-predicates-operations |\ \ | |/ |/| | * b19a07e (origin/pull/4789) Rename forall, exists and find predicate and operator params. |/ * 648c7a1 Merge pull request #4790 from SethTisue/issue/9501 |\ | * 40d12f1 (origin/pull/4790) SI-9501 link README to Scala Hacker Guide * e0b5891 Merge pull request #4786 from performantdata/issue/9506 * 39acad8 (origin/pull/4786) SI-9506 suppress Scala IDE-generated files in the Eclipse project dirs * 74dc364 SI-9506 suppress Scala IDE-generated files in the Eclipse project dirs % git merge ae5f0de Auto-merging src/repl/scala/tools/nsc/interpreter/ILoop.scala Auto-merging src/library/scala/util/Either.scala Auto-merging src/library/scala/runtime/Tuple3Zipped.scala Auto-merging src/library/scala/runtime/Tuple2Zipped.scala Auto-merging src/library/scala/collection/parallel/ParIterableLike.scala Auto-merging src/library/scala/collection/immutable/ListMap.scala Auto-merging src/library/scala/collection/TraversableLike.scala Auto-merging src/eclipse/test-junit/.classpath CONFLICT (content): Merge conflict in src/eclipse/test-junit/.classpath Auto-merging src/eclipse/scaladoc/.classpath CONFLICT (content): Merge conflict in src/eclipse/scaladoc/.classpath Auto-merging src/eclipse/scala-compiler/.classpath Auto-merging src/eclipse/repl/.classpath CONFLICT (content): Merge conflict in src/eclipse/repl/.classpath Auto-merging src/eclipse/partest/.classpath CONFLICT (content): Merge conflict in src/eclipse/partest/.classpath Auto-merging src/eclipse/interactive/.classpath Auto-merging README.md Automatic merge failed; fix conflicts and then commit the result. % git checkout --ours src/eclipse/partest/.classpath % git checkout --ours src/eclipse/repl/.classpath % git checkout --ours src/eclipse/scaladoc/.classpath % git checkout --ours src/eclipse/test-junit/.classpath % git add -u % emacs test/junit/scala/collection/mutable/OpenHashMapTest.scala % git diff test/junit/scala/collection/mutable/OpenHashMapTest.scala | cat ... - val field = m.getClass.getDeclaredField("scala$collection$mutable$OpenHashMap$$deleted") + val field = m.getClass.getDeclaredField("deleted") ... % git add -u
| * Rename forall, exists and find predicate and operator params.Janek Bogucki2015-10-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge commit '03aaf05' into merge-2.11-to-2.12-sep-22Lukas Rytz2015-09-221-2/+2
|\|
| * bump copyright year in `scala -version`Seth Tisue2015-09-181-2/+2
| | | | | | | | | | | | | | a little piece of #4644 I missed. fixes this: % scala -version Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL