private void processModifyResponses ( String errorMessage , List < TablePopulationRequirements > responseList ) { assert ( errorMessage != null ) ; // if no requirements, then it's just not possible if ( responseList == null ) { m_supported = false ; m_errors . append ( errorMessage + "\n" ) ; return ; } // otherwise, it's possible if a specific table is empty // collect the error message(s) and decide if it can be done inside @UAC for ( TablePopulationRequirements response : responseList ) { String objectName = response . getObjectName ( ) ; String nonEmptyErrorMessage = response . getErrorMessage ( ) ; assert ( nonEmptyErrorMessage != null ) ; TablePopulationRequirements popreq = m_tablesThatMustBeEmpty . get ( objectName ) ; if ( popreq == null ) { popreq = response ; m_tablesThatMustBeEmpty . put ( objectName , popreq ) ; } else { String newErrorMessage = popreq . getErrorMessage ( ) + "\n " + response . getErrorMessage ( ) ; popreq . setErrorMessage ( newErrorMessage ) ; } } }
After we decide we can t modify add or delete something on a full table we do a check to see if we can do that on an empty table . The original error and any response from the empty table check is processed here . This code is basically in this method so it s not repeated 3 times for modify add and delete . See where it s called for context . If the responseList equals null it is not possible to modify otherwise we do the check described above for every element in the responseList if there is no element in the responseList it means no tables must be empty which is totally fine .