A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/310 below:

[java] UnnecessaryLocalBeforeReturn enhancement is overly restrictive -- method order matters · Issue #310 · pmd/pmd · GitHub

Rule Set:
UnnecessaryLocalBeforeReturn

Description:
The enhancement in #240 was ill-advised. The change in behavior should have been formulated as a new rule or an option on the existing rule, not added to an existing rule in a "bug-fix" release.

There are many cases where order does matter even for variables that are declared and then only referenced a single time.

Code Sample demonstrating the issue:

int i = compute(); // might throw
markComputationDone();
return i;
Mutable m = ...;
int i = compute(m);
sideEffect(m);
return i;

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4