Skip to content

feat(net): fix bug of method toString in BlockCapsule - #5594

Merged
halibobo1205 merged 1 commit into
tronprotocol:developfrom
317787106:hotfix/fix_blockcapsule
Dec 27, 2023
Merged

halibobo1205 merged 1 commit into
tronprotocol:developfrom
317787106:hotfix/fix_blockcapsule

Conversation

@317787106

Copy link
Copy Markdown
Collaborator

What does this PR do?

  • fix bug of method toString in BlockCapsule

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@317787106 317787106 linked an issue Nov 21, 2023 that may be closed by this pull request
@317787106 317787106 changed the title feat(net):fix bug of method toString in BlockCapsule feat(net): fix bug of method toString in BlockCapsule Nov 21, 2023
@Override
public String toString() {
toStringBuff.setLength(0);
StringBuilder toStringBuff = new StringBuilder();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not replace the origin field with StringBuffer?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lurais toStringBuff is only used in toString() method, using local variable makes code easier to understand.

@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.7.4 milestone Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants