- companyName might be set, let's make sure it is not empty
- basicData can be final here
Signed-off-by: Roland Häder <roland@mxchange.org>
} else if (this.getCompanyShortName().isEmpty()) {
// Is null
throw new IllegalArgumentException("this.companyShortName is empty"); //NOI18N
+ } else if ((this.getCompanyName() != null) && (this.getCompanyName().isEmpty())) {
+ // Is null
+ throw new IllegalArgumentException("this.companyName is set empty"); //NOI18N
}
// Prepare entity
- BasicData basicData = new BusinessBasicData(this.getCompanyShortName());
+ final BasicData basicData = new BusinessBasicData(this.getCompanyShortName());
// Set all opther remaining data
basicData.setCompanyComments(this.getCompanyComments());