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

Merge code "Stałe i annotacje" #2

Merged
merged 3 commits into from
May 19, 2024
Merged

Merge code "Stałe i annotacje" #2

merged 3 commits into from
May 19, 2024

Conversation

KacperJarosik
Copy link
Collaborator

Task:
• Sklonuj repozytorium do którego zostałeś dodany i utwórz nowy branch
poleceniem (polecenie git checkout -b constants)
6. Przejrzyj kod w poszukiwaniu literałów (napisy, liczby), które można by zastąpić
deklaracjami stałych (np. w klasie DefaultCountingOutRhymer liczby -1 i 12).
Wygeneruj odpowiednie stałe używając opcji Refactor → Extract Constant.
7. Ustaw modyfikator final przy niemutowalnych (nie zmieniających wartości)
atrybutach klas.
8. Użyj annotacji @OverRide przy metodach tam gdzie jest to możliwe.
• Prześlij zmiany do zdalnego repozytorium (właściciela) – polecenie git push
origin constants.
• Przejdź na główną stronę repozytorium i wybierz opcję New pull request.
• Jako base repository wybierz repozytorium właściciela i branch master, a jako
head repository wybierz branch na którym pracowałeś, po czym kliknij Create
pull request.
• Przejdź do strony z nowo utworzonym pull requestem i z kliknij zębatkę przy
liście Reviewers, wybierz właściciela repozytorium jako recenzenta kodu
(reviewer).
• Na tej samej stronie powiąż pull request z Issue (opcja Development panelu
bocznego po prawej stronie).

@KacperJarosik KacperJarosik requested a review from Timek12 May 6, 2024 09:33
@KacperJarosik KacperJarosik linked an issue May 6, 2024 that may be closed by this pull request
Copy link
Owner

@Timek12 Timek12 left a comment

Choose a reason for hiding this comment

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

  • Constants should be named uppercase
  • Add final keyword to variables where possible

Add final keyword to variables
@KacperJarosik
Copy link
Collaborator Author

there is a new version of the code

Copy link
Owner

@Timek12 Timek12 left a comment

Choose a reason for hiding this comment

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

OK, but add final keyword to ret variable in FifoRhymer.java and IntLinkedList.java

@KacperJarosik
Copy link
Collaborator Author

done

Copy link
Owner

@Timek12 Timek12 left a comment

Choose a reason for hiding this comment

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

Great

@Timek12 Timek12 merged commit 4f4ac17 into master May 19, 2024
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.

Stałe i annotacje
2 participants