private void incrementHeaderCounter ( ) { this . numberOfHeaders ++ ; this . headerAddCount ++ ; if ( this . limitNumHeaders < this . numberOfHeaders ) { String msg = "Too many headers in storage: " + this . numberOfHeaders ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , msg ) ; } throw new IllegalArgumentException ( msg ) ; } }
Increment the number of headers in storage counter by one . If this puts it over the limit for the message then an exception is thrown .