Merge pull request #23 from zednis/patch-1
simplified getConfigFromSession logic with ternary operator
This commit is contained in:
commit
b70cb2fb49
1 changed files with 1 additions and 8 deletions
|
@ -705,14 +705,7 @@ public class EditConfigurationVTwo {
|
|||
|
||||
public static EditConfigurationVTwo getConfigFromSession(HttpSession sess, String editKey){
|
||||
Map<String,EditConfigurationVTwo> configs = (Map<String,EditConfigurationVTwo>)sess.getAttribute("EditConfigurations");
|
||||
if( configs == null )
|
||||
return null;
|
||||
|
||||
EditConfigurationVTwo config = configs.get( editKey );
|
||||
if( config == null )
|
||||
return null;
|
||||
else
|
||||
return config;
|
||||
return (configs != null) ? configs.get( editKey ) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue