question: private boolean validateOldProduct ( MProduct product ) { if ( ! product . isBOM ( ) ) return true ; if ( m_products . contains ( product ) ) { log . warning ( m_product . getName ( ) + " recursively includes " + product . getName ( ) ) ; return false ; } m_products . add ( product ) ; log . fine ( product . getName ( ) ) ; MProductBOM [ ] productsBOMs = MProductBOM . getBOMLines ( product ) ; for ( int i = 0 ; i < productsBOMs . length ; i ++ ) { MProductBOM productsBOM = productsBOMs [ i ] ; MProduct pp = new MProduct ( getCtx ( ) , productsBOM . getM_ProductBOM_ID ( ) , get_TrxName ( ) ) ; if ( ! pp . isBOM ( ) ) log . finer ( pp . getName ( ) ) ; else if ( ! validateOldProduct ( pp ) ) return false ; } return true ; }
target:  Validate Old BOM Product structure