偶然看到某知名支付里面的源码,感觉写得非常的蛋疼,所以就贴出来,并且我想改进一下这个代码。
public boolean checkArgs() {
if (this.appId != null && this.appId.length() != 0) {
if (this.partnerId != null && this.partnerId.length() != 0) {
if (this.prepayId != null && this.prepayId.length() != 0) {
if (this.nonceStr != null && this.nonceStr.length() != 0) {
if (this.timeStamp != null && this.timeStamp.length() != 0) {
if (this.packageValue != null && this.packageValue.length() != 0) {
if