Skip to content

Conversation

@semoro
Copy link
Contributor

@semoro semoro commented Sep 10, 2016

https://youtrack.jetbrains.com/issue/KT-13750

Notes: Should it add @JvmStatic really even if field matches * static final long serialVersionUID or preform check for java.io.Serializable is implemented
Now it preforms check.
Also topic on discuss: @JvmStatic or @JvmField



private fun specialAnnotationPropertyCases(field: PsiField): Annotations {
val javaSerializableInterface = PsiType.getTypeByName("java.io.Serializable", project, GlobalSearchScope.allScope(project)).resolve()
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a minor issue, but the correct way is to use field.getResolveScope() instead of allScope here. Otherwise you may get incorrect results if the project uses multiple JDKs in different modules.

Copy link
Contributor

Choose a reason for hiding this comment

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

And also JavaPsiFacade.findClass() instead of PsiType.geTypeByName(). And CommonClassNames.JAVA_IO_SERIALIZABLE instead of a hard-coded constant.

@yole
Copy link
Contributor

yole commented Sep 12, 2016

Looks good except for some minor notes regarding correct API usage. Please fix, and I'll merge and backport to 1.0.5. Thanks!

@yole yole self-assigned this Sep 12, 2016
@yole yole merged commit 115d63a into JetBrains:master Sep 13, 2016
@yole
Copy link
Contributor

yole commented Sep 13, 2016

Thanks for your contribution!

yole pushed a commit that referenced this pull request Sep 13, 2016
(cherry picked from commit 115d63a)
dnpetrov pushed a commit that referenced this pull request Sep 22, 2016
koperagen added a commit that referenced this pull request Mar 10, 2025
[Compiler plugin] Support valueCounts
Moved from Kotlin/dataframe@ec60fd4
koperagen added a commit that referenced this pull request Mar 12, 2025
[Compiler plugin] Support valueCounts
Moved from Kotlin/dataframe@ec60fd4
oliviernotteghem pushed a commit to oliviernotteghem/kotlin that referenced this pull request Jun 16, 2025
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.

2 participants