Skip to content

unnecessary, emberracing blocks in the generated code at equals(), hashCode(), toString(), appendFeilds() generated by SimpleEqualsPlugin, SimpleHashCodePlugin etc. #102

@cstenkes

Description

@cstenkes

For example:

public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
                {
                    String theClientId;
                    theClientId = this.getClientId();
                    strategy.appendField(locator, this, "clientId", buffer, theClientId, (this.clientId!= null));
                }
                {
                    String theItemNo;
                    theItemNo = this.getItemNo();
                    strategy.appendField(locator, this, "itemNo", buffer, theItemNo, (this.itemNo!= null));
                }

This should be looked like:

public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {             
                    String theClientId = this.getClientId();
                    strategy.appendField(locator, this, "clientId", buffer, theClientId, (this.clientId!= null));                
                    String theItemNo = this.getItemNo();
                    strategy.appendField(locator, this, "itemNo", buffer, theItemNo, (this.itemNo!= null));

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions