Skip to content

Conversation

@belalj73
Copy link
Contributor

@belalj73 belalj73 commented Aug 4, 2025

No description provided.

.sorted(Comparator
.comparing((ImportDeclaration i) -> ! AstraUtils.getPackageName(i.getName().toString()).startsWith(JAVA))
.thenComparing(i -> ! AstraUtils.getPackageName(i.getName().toString()).startsWith(JAVAX))
.thenComparing(i -> ! AstraUtils.getPackageName(i.getName().toString()).startsWith(JAKARTA))
Copy link
Member

Choose a reason for hiding this comment

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

Looks good - but could we add a test for this?

public class TestImportsRefactor extends AbstractRefactorTest {

Copy link
Contributor Author

@belalj73 belalj73 Aug 4, 2025

Choose a reason for hiding this comment

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

We don't have a dependency which provides any of the javax or jakarta classes, so I can either add additional test dependencies, or create a package structure in the test code using this naming convention. Any preference?

Copy link
Member

Choose a reason for hiding this comment

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

Test scoped dependencies would be fine 👍

Copy link
Contributor

@harrisric harrisric Aug 4, 2025

Choose a reason for hiding this comment

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

@belalj73 items like javax.annotation.processing.Processor and javax.crypto.Cipher are part of the jdk and so don't need any dependencies (and won't be changing to jakarta).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion @harrisric. I have updated the PR accordingly.

@RadikalJin RadikalJin merged commit a071bc9 into alfasoftware:main Aug 5, 2025
1 check 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.

3 participants