protected static void mergeStatusConfig ( ) { Map < String , Object > appStatusConfig = Config . getInstance ( ) . getJsonMapConfigNoCache ( STATUS_CONFIG_NAME [ 1 ] ) ; if ( appStatusConfig == null ) { return ; } Map < String , Object > statusConfig = Config . getInstance ( ) . getJsonMapConfig ( STATUS_CONFIG_NAME [ 0 ] ) ; // clone the default status config key set Set < String > duplicatedStatusSet = new HashSet <> ( statusConfig . keySet ( ) ) ; duplicatedStatusSet . retainAll ( appStatusConfig . keySet ( ) ) ; if ( ! duplicatedStatusSet . isEmpty ( ) ) { logger . error ( "The status code(s): " + duplicatedStatusSet . toString ( ) + " is already in use by light-4j and cannot be overwritten," + " please change to another status code in app-status.yml if necessary." ) ; throw new RuntimeException ( "The status code(s): " + duplicatedStatusSet . toString ( ) + " in status.yml and app-status.yml are duplicated." ) ; } statusConfig . putAll ( appStatusConfig ) ; }
method used to merge status . yml and app - status . yml