Skip to content

build: Remove usages of deprecated API in DatabaseAuthProvider #5945

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

samgst-amazon
Copy link
Contributor

@samgst-amazon samgst-amazon commented Aug 1, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

from #5774 :
DataGrip team is making changes in DatabaseAuthProvider API, so we'd like to cleaning up usages of deprecated API in third-party plugins. This PR makes sure that DatabaseAuthProvider implementations in AWS Toolkit are up-to-date

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@samgst-amazon samgst-amazon requested a review from a team as a code owner August 1, 2025 21:27
Copy link

github-actions bot commented Aug 1, 2025

Qodana Community for JVM

9 new problems were found

Inspection name Severity Problems
Usage of API marked for removal 🔴 Failure 9

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

import software.aws.toolkits.resources.message
import javax.swing.JPanel

abstract class AwsAuthWidget(private val userFieldEnabled: Boolean = true) : DatabaseCredentialsAuthProviderUi.UserWidget() {

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal

override fun createPanel(): JPanel {
val panel = JPanel(GridLayoutManager(rowCount, columnCount))
addUserField(panel, 0)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
addUserField(panel, 0)

// Disable the user field if we treat it as immutable
myUserField.isEnabled = userFieldEnabled

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
super.reset(point, resetCredentials)
reset(point.dataSource, resetCredentials)
override fun reset(config: DatabaseConnectionPoint, resetCredentials: Boolean) {
super.reset(config, resetCredentials)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
override fun onChanged(r: Runnable) {
// Tries to set username so if we don't have one, don't set
if (userFieldEnabled) {
super.onChanged(r)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
override fun onChanged(r: Runnable) {
// Tries to set username so if we don't have one, don't set
if (userFieldEnabled) {
super.onChanged(r)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
region?.let {
regionSelector.selectedRegion = it
}
super.updateFromUrl(holder)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
region?.let {
regionSelector.selectedRegion = it
}
super.updateFromUrl(holder)

Check failure

Code scanning / QDJVMC

Usage of API marked for removal Error

'com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget' is deprecated and marked for removal
@samgst-amazon
Copy link
Contributor Author

/retryBuilds

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