jSparrow v3.5.0/v2.2.0

新しいMap::getOrDefaultルールを追加、MapインターフェイスのJava 8拡張機能を使用してコードの判読性を向上
5月 17, 2019
新バージョン

機能

  • New Rule - Replace Map::get with Map::getOrDefault
    • Automatically replaces invocations of Map::get with the alternative Map::getOrDefault , thus eliminating the succeeding null checks.
    • Makes the code more readable, by using Java 8 extensions of Map interface.

Java 8 introduced Map::getOrDefault which offers the possibility to return a default value if the map does not contain a mapping for the given key. This rule replaces the invocations of Map::get followed by a null-check with Map::getOrDefault.

jSparrow - Replace Map::get by Map::getOrDefault

jSparrow(英語版)

Javaソースコードの自動リファクタリングツール。

ご質問がありますか?

今すぐ jSparrow ライセンススペシャリストとライブ チャット