question: private static long limitDuration ( long leaseDuration , long limit ) { if ( leaseDuration == Lease . ANY || leaseDuration > limit ) leaseDuration = limit ; else if ( leaseDuration < 0 ) throw new IllegalArgumentException ( "negative lease duration" ) ; return leaseDuration ; }
target:  Limit leaseDuration by limit, and check for negative value.