Skip to content

Minor Simplifications #9

@simlu

Description

@simlu

Block b = freeBlock;
if (b != null)
freeBlock = null;
else
b = new Block();
block = b;

How about

        block = freeBlock == null ? new Block() : freeBlock;
        freeBlock = null;

Shorter and more understandable.

Also the first throw exception is unnecessary.

Created a PR here: #10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions