Skip to content

Commit b384480

Browse files
authored
Remove references to java.util.Date (#3029)
1 parent d51651f commit b384480

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

_overviews/core/implicit-classes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Implicit classes have the following restrictions:
7777
**2. They may only take one non-implicit argument in their constructor.**
7878

7979

80-
implicit class RichDate(date: java.util.Date) // OK!
80+
implicit class RichDate(date: java.time.LocalDate) // OK!
8181
implicit class Indexer[T](collection: Seq[T], index: Int) // BAD!
8282
implicit class Indexer[T](collection: Seq[T])(implicit index: Index) // OK!
8383

_style/scaladoc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ sure to indicate the actual method names:
208208
* @return a new Person instance with the age determined by the
209209
* birthdate and current date.
210210
*/
211-
def apply(name: String, birthDate: java.util.Date) = {}
211+
def apply(name: String, birthDate: java.time.LocalDate) = {}
212212
}
213213

214214
If your object holds implicit conversions, provide an example in the

_zh-cn/overviews/core/implicit-classes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Scala 2.10引入了一种叫做隐式类的新特性。隐式类指的是用impl
6161

6262
2. 构造函数只能携带一个非隐式参数。
6363
````
64-
implicit class RichDate(date: java.util.Date) // 正确!
64+
implicit class RichDate(date: java.time.LocalDate) // 正确!
6565
implicit class Indexer[T](collecton: Seq[T], index: Int) // 错误!
6666
implicit class Indexer[T](collecton: Seq[T])(implicit index: Index) // 正确!
6767
````

0 commit comments

Comments
 (0)