private static Context getCurrentContext(Config config) {
        String contextName = config.getCurrentContext();
        if (contextName != null) {
            List<NamedContext> contexts = config.getContexts();
            if (contexts != null) {
                for (NamedContext context : contexts) {
                    if (Objects.equals(contextName, context.getName())) {
                        return context.getContext();
                    }
                }
            }
        }
        return null;
    }
private static Context getCurrentContext(Config config) {
        String contextName = config.getCurrentContext();
        if (contextName != null) {
            List<NamedContext> contexts = config.getContexts();
            if (contexts != null) {
                for (NamedContext context : contexts) {
                    if (Objects.equals(contextName, context.getName())) {
                        return context.getContext();
                    }
                }
            }
        }
        return null;
    }
private static Context getCurrentContext ( Config config ) { String contextName = config . getCurrentContext ( ) ; if ( contextName != null ) { List < NamedContext > contexts = config . getContexts ( ) ; if ( contexts != null ) { for ( NamedContext context : contexts ) { if ( Objects . equals ( contextName , context . getName ( ) ) ) { return context . getContext ( ) ; } } } } return null ; }
Returns the current context in the given config
Returns the current context in the given config