question: private static Map < String , String > extractKeyValuePairs ( String props , ObjectName mbean ) { Map < String , String > map = new LinkedHashMap < String , String > ( ) ; int eq = props . indexOf ( "=" ) ; while ( eq != - 1 ) { String key = props . substring ( 0 , eq ) ; String value = mbean . getKeyProperty ( key ) ; map . put ( key , value ) ; props = props . substring ( key . length ( ) + 1 + value . length ( ) ) ; if ( props . startsWith ( "," ) ) { props = props . substring ( 1 ) ; } eq = props . indexOf ( "=" ) ; } return map ; }
target:  Parses the MBean ObjectName comma-separated properties string and puts the individual key/value pairs into the map. Key order in the properties string is preserved by the map.