以前我是用一个flag来标识是否跳出,现看到有下列的用法
out:for(SearchCompanySearchResultsType result : results){
IdentityInfoType[] reusultInfoTypes = result.getCompanyIdentity();
for(IdentityInfoType reusultInfoType : reusultInfoTypes){
if(tenantOwner.equals(reusultInfoType.getIdentityOwnerValue())){
hasMatchedTenantOwnerInWS = true;
log.info("Find matched TenantOwner in Web Service ... ");
break out;
}
}
}