Buggy code:
@ Transactional ( readOnly = true ) public class TradeLicenseService extends AbstractLicenseService < TradeLicense > { @ Autowired private TradeLicenseSmsAndEmailService tradeLicenseSmsAndEmailService ; @ Autowired private TradeLicenseUpdateIndexService updateIndexService ; @ Autowired private ReportService reportService ; @ Autowired private LicenseUtils licenseUtils ; public TradeLicenseService ( final PersistenceService < TradeLicense , Long > licensePersitenceService ) { } @ Override protected NatureOfBusiness getNatureOfBusiness ( ) { } @ Override protected Module getModuleName ( ) { } @ Override public License additionalOperations ( final TradeLicense license , final Set < EgDemandReasonMaster > egDemandReasonMasters , final Installment installment ) { } @ Override protected void sendEmailAndSMS ( final TradeLicense license , final String currentAction ) { } @ Transactional public void updateTradeLicense ( final TradeLicense license , final WorkflowBean workflowBean ) { <START_BUG> if ( ( ( null != license ) && ( null != ( license . getState ( ) ) ) ) && ( license . getState ( ) . getValue ( ) . contains ( WF_STATE_SANITORY_INSPECTOR_APPROVAL_PENDING ) ) ) { <END_BUG> updateDemandForChangeTradeArea ( license ) ; } licensePersitenceService ( ) . persist ( license ) ; tradeLicenseSmsAndEmailService . sendSmsAndEmail ( license , workflowBean . getWorkFlowAction ( ) ) ; updateIndexService . updateTradeLicenseIndexes ( license ) ; } @ Transactional public void updateStatusInWorkFlowProgress ( TradeLicense license , final String workFlowAction ) { } public ReportRequest prepareReportInputData ( final License license ) { } public ReportOutput prepareReportInputDataForDig ( final License license , final String districtName , final String cityMunicipalityName ) { } private Map < String , Object > getReportParamsForCertificate ( final License license , final String districtName , final String cityMunicipalityName ) { } @ Transactional public void transferLicense ( final TradeLicense tl , final LicenseTransfer licenseTransfer ) { } @ Transactional public void initiateWorkFlowForTransfer ( final TradeLicense license , final WorkflowBean workflowBean ) { } @ Transactional public void processWorkFlowForTransfer ( final TradeLicense license , final WorkflowBean workflowBean ) { } @ Override protected Assignment getWorkflowInitiator ( final TradeLicense license ) { } @ Override protected LicenseAppType getLicenseApplicationTypeForRenew ( ) { } @ Override protected LicenseAppType getLicenseApplicationType ( ) { } @ Transactional public void revokeSuspendedLicense ( final TradeLicense license , final LicenseUtils licenseUtils , final LicenseStatusValues licenseStatusValues ) { } public List getHotelCategoriesForTrade ( ) { } public List < TradeLicense > getTradeLicenseForGivenParam ( final String paramValue , final String paramType ) { } public List < TradeLicense > searchTradeLicense ( final String applicationNumber , final String licenseNumber , final String oldLicenseNumber , final Long categoryId , final Long subCategoryId , final String tradeTitle , final String tradeOwnerName , final String propertyAssessmentNo , final String mobileNo ) { } public TradeLicenseSmsAndEmailService getTradeLicenseSmsAndEmailService ( ) { } public void setTradeLicenseSmsAndEmailService ( final TradeLicenseSmsAndEmailService tradeLicenseSmsAndEmailService ) { } public TradeLicenseUpdateIndexService getUpdateIndexService ( ) { } public void setUpdateIndexService ( final TradeLicenseUpdateIndexService updateIndexService ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( null != license ) && ( null != ( license . getState ( ) ) ) ) && ( license . getState ( ) . getValue ( ) . contains ( WF_STATE_INSPECTION_APPROVED_STR ) ) ) {