Skip to content

Refactor SewUpAction and its tests to Kotlin (CATROID-1586)#5211

Open
harshsomankar123-tech wants to merge 2 commits into
Catrobat:developfrom
harshsomankar123-tech:CATROID-1586-refactor-sewupaction-tests
Open

Refactor SewUpAction and its tests to Kotlin (CATROID-1586)#5211
harshsomankar123-tech wants to merge 2 commits into
Catrobat:developfrom
harshsomankar123-tech:CATROID-1586-refactor-sewupaction-tests

Conversation

@harshsomankar123-tech
Copy link
Copy Markdown
Member

@harshsomankar123-tech harshsomankar123-tech commented May 12, 2026

Description

This PR refactors the SewUpAction class and its corresponding instrumentation tests from Java to Kotlin.

Reference: CATROID-1586 (https://catrobat.atlassian.net/browse/CATROID-1586)

Key Changes

  • SewUpAction.kt:
    • Converted from SewUpAction.java.
    • Implemented Kotlin null-safety features, replacing potential NPEs with safe calls (?.) and explicit RuntimeException throws for critical null states.
    • Used idiomatic Kotlin features like lateinit, apply, and companion object.
    • Updated copyright year to 2026.
  • SewUpActionTest.kt:
    • Renamed from SewUpTest.java as per Jira instructions.
    • Converted to Kotlin with full null-safety support (removed !! operators and handled nullability correctly).
    • Standardized test setup using lateinit var.
    • Updated copyright year to 2026.

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

@sonarqubecloud
Copy link
Copy Markdown

@harshsomankar123-tech harshsomankar123-tech marked this pull request as ready for review May 12, 2026 13:31
@harshsomankar123-tech
Copy link
Copy Markdown
Member Author

@dorianpercic @reichli PTAL
Thanks!

@harshsomankar123-tech harshsomankar123-tech added the Active Member Tickets that are assigned to members that are still currently active label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Active Member Tickets that are assigned to members that are still currently active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants