@ SuppressWarnings ( "SynchronizationOnLocalVariableOrMethodParameter" ) private List < Long > getOrCreateBucketsValues ( final Stopwatch stopwatch ) { synchronized ( stopwatch ) { List < Long > values = getBucketsValues ( stopwatch ) ; if ( values == null ) { values = new ArrayList <> ( ( int ) warmupCounter ) ; stopwatch . setAttribute ( ATTR_NAME_BUCKETS_VALUES , values ) ; } return values ; } }
Get the bucket values attribute or create it if it does not exist .