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

IDEA-348914 JBSlidingPanel: unused variable and raw use of parametrized class #2707

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vaivanov95
Copy link

(IDEA-348914) Refactor JBSlidingPanel and Convert JBPanel & JBComponent to Kotlin for Enhanced Type Safety and Generics

  1. In JBSlidingPanel, unused variable mySelectedIndex removed (it was initialized and conditionally updated by never read.)
  2. Add method removed since it only updated unused variable
  3. In JBSlidingPanel, JBPanel class is properly parametrized, no more warnings
  4. JBPanel and JBComponent converted to Kotlin. Thanks to Kotlin's recursive generics support, the need for raw use of parametrized type JBPanel eliminated.
  5. Change 4 permitted eliminate constructions like JBPanel<JBPanel<*>?>() in many instances across the project
  6. In AbstractDroppableStripe, getPreferredSize is refactored to comply with JPanel interface that does not permit null value (actually it's already accessed in many places in the project without considering potential null value which permits to infer non-null contract; due to conversion to Kotlin it's strictly verified)

Vitalii Ivanov and others added 3 commits March 12, 2024 08:36
…nt to Kotlin for Enhanced Type Safety and Generics

1. In JBSlidingPanel, unused variable `mySelectedIndex` removed (it was initialized and conditionally updated by never read.)
2. Add method removed since it only updated unused variable
3. In JBSlidingPanel, JBPanel class is properly parametrized, no more warnings
4. JBPanel and JBComponent converted to Kotlin. Thanks to Kotlin's recursive generics support, the need for raw use of parametrized type JBPanel eliminated.
5. Change 4 permitted eliminate constructions like `JBPanel<JBPanel<*>?>()` in many instances across the project
6. In AbstractDroppableStripe, getPreferredSize is refactored to comply with JPanel interface that does not permit null value (actually it's already accessed in many places in the project without considering potential null value which permits to infer non-null contract; due to conversion to Kotlin it's strictly verified)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant