[
https://issues.jboss.org/browse/WFLY-1735?page=com.atlassian.jira.plugin....
]
Cheng Fang commented on WFLY-1735:
----------------------------------
Also FindBugs finds the following redundant null check (if ifBlock is null, an exception
would've already been thrown):
{code}
public boolean isAvailable(CommandContext ctx) {
try {
final IfElseBlock ifBlock = IfElseBlock.get(ctx);
return ifBlock != null;
} catch (CommandLineException e) {
return false;
}
}
{code}
cli EndIfHandler class exception created but not thrown
-------------------------------------------------------
Key: WFLY-1735
URL:
https://issues.jboss.org/browse/WFLY-1735
Project: WildFly
Issue Type: Bug
Components: CLI
Affects Versions: 8.0.0.Beta1
Reporter: Cheng Fang
Assignee: Alexey Loubyansky
cli EndIfHandler class creates an CommandLineException without throwing it:
{code}
try {
final ModelNode response = client.execute(ifRequest);
if(!Util.isSuccess(response)) {
new CommandLineException("if request failed: " +
Util.getFailureDescription(response));
}
} catch (IOException e) {
throw new CommandLineException("if request failed", e);
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira