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

CATROID-1057 REFACTOR Look/PhysicsLook #4576

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

wolpra98
Copy link

@wolpra98 wolpra98 commented Jun 6, 2022

Extracted PhysicsObjectStateHandler from PhysicsLook.
Reduce Code Duplication and Magic Number Usage, and general
Code Cleanup in PhysicsLook

This pull request extracts PhysicsObjectStateHandler from PhysicsLook, reduces Code Duplication and Magic Number usage in PhysicsLook.
https://jira.catrob.at/browse/CATROID-1057

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the catroid-stage or catroid-ide Slack channel and ask for a code reviewer

Extracted PhysicsObjectStateHandler from PhysicsLook.
Reduce Code Duplication and Magic Number Usage, and general
Code Cleanup in PhysicsLook
@moemgva2910 moemgva2910 self-assigned this Jun 14, 2022
@moemgva2910
Copy link
Contributor

Everything looks good!

There is only one Nullpointer Exception happening in All / 1 / Instrumented Unit Tests / org.catrobat.catroid.test.physics.look.PhysicsLookPositionAndAngleTest.testCloneValues (See Jenkins report) that is NOT RELATED to the implementation of this PR:

In PhysicsLookPositionAndAngleTest.testClonesValues, the Nullpointer Exception happens because the mocked PhysicsObject used in the test doesn't handle currently a call to its body field, which is null. I have attached below an image that shows where the null object reference happens. This could maybe be fixed in a separate ticket.

Screenshot 2022-06-14 at 12 55 19

@ratschillerp ratschillerp merged commit 120c7f1 into Catrobat:develop Sep 26, 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.

5 participants