-
Notifications
You must be signed in to change notification settings - Fork 240
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
feat(amazonq): support Java 21 #5226
base: main
Are you sure you want to change the base?
Conversation
@@ -308,6 +309,8 @@ class CodeModernizerSession( | |||
} | |||
|
|||
private fun startJob(uploadId: String): StartTransformationResponse { | |||
notifyStickyInfo("sourceLanguage", sessionContext.sourceJavaVersion.name.toTransformationLanguage().toString()) | |||
notifyStickyInfo("targetLanguage", sessionContext.targetJavaVersion.name.toTransformationLanguage().toString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove
val sourceVersion = sourceJdk.toString() | ||
|
||
notifyStickyInfo("sourceJdk is", sourceJdk.toString()) | ||
notifyStickyInfo("targetVersion is", targetVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove
) | ||
|
||
notifyStickyInfo("customerSelection is", selection.toString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove
@@ -66,7 +66,8 @@ const val DOWNLOAD_PROXY_WILDCARD_ERROR: String = "Dangling meta character '*' n | |||
const val DOWNLOAD_SSL_HANDSHAKE_ERROR: String = "Unable to execute HTTP request: javax.net.ssl.SSLHandshakeException" | |||
const val INVALID_ARTIFACT_ERROR: String = "Invalid artifact" | |||
val patchDescriptions = mapOf( | |||
"Prepare minimal upgrade to Java 17" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks.", | |||
"Prepare minimal upgrade to Java 17" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 17.", | |||
"Prepare minimal upgrade to Java 21" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 21.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with VSCode, I haven't looked at the closures for java 21 (I can look), but assuming they make the same corresponding upgrades as the first patch for java 17
CodeTransformChatMessageContent( | ||
message = message("codemodernizer.chat.message.one_or_multiple_diffs"), | ||
message = message("codemodernizer.chat.message.one_or_multiple_diffs", version.substring(4)), // extract "17" / "21" from "JDK_17" / "JDK_21" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering why we can't just have strings for "17" and "21", is it just to make use of constants we already have and not unnecessarily introduce new ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the built-in JavaSdkVersion
class we use represents Java 17 as "JDK_17" and Java 21 as "JDK_21"
@@ -620,7 +620,8 @@ codemodernizer.chat.message.button.view_diff=View diff | |||
codemodernizer.chat.message.button.view_failure_build_log=View Failure Build Log | |||
codemodernizer.chat.message.button.view_summary=View summary | |||
codemodernizer.chat.message.changes_applied=I applied the changes to your project. | |||
codemodernizer.chat.message.choose_objective=I can help you with the following tasks:\n- Upgrade your Java 8 and Java 11 codebases to Java 17, or upgrade Java 17 code with up to date libraries and other dependencies.\n- Convert embedded SQL code for Oracle to PostgreSQL database migrations in AWS DMS.\n\nWhat would you like to do? You can enter "language upgrade" or "sql conversion". | |||
# TODO: make sure all Strings work for Java 21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking if there are still more strings to change for Java 21 like some of the error/warning messages
Types of changes
Description
Support transformations to Java 21.
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.