mockito の説明、意味不明なところがある
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- java
- Domain
- documentation, testing
Research direction
Start by locating the quoted Mockito explanation in the handbook, then inspect the linked DefaultAnswer and SmartNulls implementation references. Clarify the distinction between empty standard collections and ReturnsSmartNulls; the work is done when the passage is understandable and consistent with the referenced behavior.
Written by the indexing model from the issue text.
Description
[3:09 PM] dayflower:
| JDK で提供されているコンテナ型の場合には空のコンテナ型が返りますのでいいのですが
[3:09 PM] dayflower: いまいちここがよくわからなかった
[3:13 PM] Tokuhiro Matsuno: それは
[3:13 PM] Tokuhiro Matsuno: 意味不明ですね
[3:14 PM] Tokuhiro Matsuno: Java が提供している標準のコンテナ(List, Set など)の場合には空の値が返ります
[3:14 PM] Tokuhiro Matsuno: empty の list など
[3:14 PM] dayflower: あー
[3:14 PM] dayflower: そこは検知しようがないですか?
[3:14 PM] dayflower: stub し忘れの
[3:15 PM] Tokuhiro Matsuno: いや、それをやるのが
[3:15 PM] dayflower: ReturnsSmartNulls っすか?
[3:15 PM] Tokuhiro Matsuno: https://github.com/mockito/mockito/blob/master/src/main/java/org/mockito/configuration/DefaultMockit...
[3:15 PM] Tokuhiro Matsuno: デフォルトの
[3:15 PM] Tokuhiro Matsuno: はい
[3:15 PM] dayflower: なんか空Listが帰ってきた気がするな
[3:15 PM] Tokuhiro Matsuno: なので、 getDefaultAnswer 書き換えれば挙動変わるはず
[3:16 PM] Tokuhiro Matsuno: https://github.com/mockito/mockito/blob/master/src/main/java/org/mockito/internal/stubbing/defaultan...
[3:16 PM] Tokuhiro Matsuno: このへんが実装
[3:17 PM] dayflower: こっちが smartnulls か https://github.com/mockito/mockito/blob/master/src/main/java/org/mockito/internal/stubbing/defaultan...
[3:18 PM] Tokuhiro Matsuno: んむ
- Dominant language
- Java
- Stars
- 146
- Forks
- 9
- Avg merge
- 2m
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tokuhirom/java-handbook
-
Dependency Dashboard Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
tokuhirom/java-handbook#212 ·
-
画像アップロードスレ Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
tokuhirom/java-handbook#33 ·
-
boot2 Open
Difficulty 3/5 1-2 days Newbie friendliness 20/100
tokuhirom/java-handbook#32 ·
-
OutputCapture Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
tokuhirom/java-handbook#31 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
tokuhirom/java-handbook#29 ·
All issues in tokuhirom/java-handbook
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
objectionary/hone-maven-plugin#1061 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-modulith#1895 ·