Skip to content

Commit

Permalink
config items
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Apr 12, 2024
1 parent 9fde4f8 commit 6e6032d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -966,12 +966,13 @@ public IStruct getConfig() {
* @return
*/
public Object getConfigItem( Key... itemKey ) {
IStruct config = getConfig();
Object config = getConfig();
Object lastResult = null;

for ( Key key : itemKey ) {
if ( config.containsKey( key ) ) {
lastResult = config.get( key );
if ( config instanceof IStruct castedConfig && castedConfig.containsKey( key ) ) {
lastResult = castedConfig.get( key );
config = lastResult;
} else {
break;
}
Expand Down

0 comments on commit 6e6032d

Please sign in to comment.