squid:S1488 - Local Variables should not be declared and then immediately returned or thrown
This commit is contained in:
parent
1a55f3a420
commit
4e40cc3888
@ -72,9 +72,7 @@ public class DbManager {
|
||||
return null;
|
||||
}
|
||||
Document doc = iterable.first();
|
||||
UserAccount userAccount =
|
||||
new UserAccount(userId, doc.getString("userName"), doc.getString("additionalInfo"));
|
||||
return userAccount;
|
||||
return new UserAccount(userId, doc.getString("userName"), doc.getString("additionalInfo"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +66,6 @@ public class Customer {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = getId();
|
||||
return result;
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
@ -204,8 +204,7 @@ public class LazyFluentIterable<TYPE> implements FluentIterable<TYPE> {
|
||||
*/
|
||||
@Override
|
||||
public List<TYPE> asList() {
|
||||
List<TYPE> copy = FluentIterable.copyToList(iterable);
|
||||
return copy;
|
||||
return FluentIterable.copyToList(iterable);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -118,8 +118,7 @@ public class SimpleApplication extends IsisWicketApplication {
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
WebRequest request = super.newWebRequest(servletRequest, filterPath);
|
||||
return request;
|
||||
return super.newWebRequest(servletRequest, filterPath);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -150,8 +149,7 @@ public class SimpleApplication extends IsisWicketApplication {
|
||||
List<String> readLines =
|
||||
Resources.readLines(Resources.getResource(contextClass, resourceName),
|
||||
Charset.defaultCharset());
|
||||
final String aboutText = Joiner.on("\n").join(readLines);
|
||||
return aboutText;
|
||||
return Joiner.on("\n").join(readLines);
|
||||
} catch (IOException e) {
|
||||
return "This is a simple app";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user