Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 manuális kód átvizsgálás statikus analízis #8

Merged
merged 16 commits into from
May 17, 2024

Conversation

SzAdamHun
Copy link
Contributor

Implemented needed changes to solve problems found by using static analysis (SonarLint, ErrorLens).

@SzAdamHun SzAdamHun linked an issue May 17, 2024 that may be closed by this pull request
@SzAdamHun SzAdamHun requested a review from kalocsaadi May 17, 2024 21:07
Copy link
Contributor

@kalocsaadi kalocsaadi left a comment

Choose a reason for hiding this comment

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

Changes make sense, tests ran successfully, PR approved.

@@ -73,77 +74,68 @@ public boolean SetPump(int newIn, int newOut)
}

//Ezt a függvényt hívja meg egy passzív elem a pumpalehelyezés elvégzéséhez
public boolean Insert(Passive oldPassive)
{
public boolean Insert(Passive oldPassive) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea to split it up, easier to read.

Copy link
Contributor

Choose a reason for hiding this comment

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

Main was a god class, separating the rendering process was necessary.

@@ -3,6 +3,7 @@
public class Pipe extends Passive implements Notifiable{
private boolean hasPlayer = false;
private PipeState state = PipeState.NORMAL;
private Random random = new Random();
Copy link
Contributor

Choose a reason for hiding this comment

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

Singular initialization is efficient.

@kalocsaadi kalocsaadi merged commit a50c150 into main May 17, 2024
2 checks passed
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.

Manuális kód átvizsgálás, statikus analízis
3 participants