Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Fix LinkageError while attempting to do Amazon Q inline suggestions in certain environments"
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ enum class ChangeType(val sectionTitle: String) {

class Serializer : StdSerializer<ChangeType>(ChangeType::class.java) {
override fun serialize(value: ChangeType, gen: JsonGenerator?, provider: SerializerProvider?) {
gen?.writeString(value.name.toLowerCase())
gen?.writeString(value.name.lowercase())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ open class NewChange : ChangeLogTask() {
)
}

private fun newFile(changeType: ChangeType) = nextReleaseDirectory.file("${changeType.name.toLowerCase()}-${UUID.randomUUID()}.json").get().asFile.apply {
private fun newFile(changeType: ChangeType) = nextReleaseDirectory.file("${changeType.name.lowercase()}-${UUID.randomUUID()}.json").get().asFile.apply {
parentFile?.mkdirs()
createNewFile()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ configurations {

// Exclude dependencies that ship with iDE
exclude(group = "org.slf4j")
// we want kotlinx-coroutines-debug and kotlinx-coroutines-test
exclude(group = "org.jetbrains.kotlinx", "kotlinx-coroutines-core-jvm")
exclude(group = "org.jetbrains.kotlinx", "kotlinx-coroutines-core")
if (!name.startsWith("kotlinCompiler") && !name.startsWith("generateModels")) {
// we want kotlinx-coroutines-debug and kotlinx-coroutines-test
exclude(group = "org.jetbrains.kotlinx", "kotlinx-coroutines-core-jvm")
exclude(group = "org.jetbrains.kotlinx", "kotlinx-coroutines-core")
}

resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlinx" && requested.name.startsWith("kotlinx-coroutines")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ configurations {

// Make sure we exclude stuff we either A) ships with IDE, B) we don't use to cut down on size
runtimeClasspath {
exclude(group = "org.slf4j")
exclude(group = "com.google.code.gson")
Copy link
Contributor

Choose a reason for hiding this comment

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

This package is included only in certain environments right but we exclude it in all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it does not hurt

exclude(group = "org.slf4j", module = "slf4j-jdk14")
exclude(group = "org.jetbrains.kotlin")
exclude(group = "org.jetbrains.kotlinx")
}
Expand Down
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ junit4 = "4.13.2"
junit5 = "5.11.0"
# https://plugins.jetbrains.com/docs/intellij/kotlin.html#adding-kotlin-support
# https://kotlinlang.org/docs/releases.html#release-details
kotlin = "2.0.0"
kotlin = "2.1.20"
# set in <root>/settings.gradle.kts
kotlinCoroutines = "1.8.0"
lsp4j = "0.24.0"
mockito = "5.12.0"
mockitoKotlin = "5.4.0"
mockk = "1.13.17"
Expand Down Expand Up @@ -105,6 +106,7 @@ kotlin-coroutinesTest = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-tes
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlin-stdLibJdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
lsp4j = { module = "org.eclipse.lsp4j:org.eclipse.lsp4j", version.ref = "lsp4j" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" }
mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin" }
Expand Down
1 change: 1 addition & 0 deletions plugins/amazonq/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
implementation(project(":plugin-amazonq:codewhisperer"))
implementation(project(":plugin-amazonq:mynah-ui"))
implementation(project(":plugin-amazonq:shared"))
implementation(libs.lsp4j)

testImplementation(project(":plugin-core"))
}
Expand Down
1 change: 1 addition & 0 deletions plugins/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
implementation(project(":plugin-core:resources"))
implementation(project(":plugin-core:sdk-codegen"))
implementation(project(":plugin-core:webview"))
implementation(libs.slf4j.api)
}

tasks.check {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fun formatText(project: Project, language: Language, content: String): String {
* Designed to convert underscore separated words (e.g. UPDATE_COMPLETE) into title cased human readable text
* (e.g. Update Complete)
*/
fun String.toHumanReadable() = StringUtil.toTitleCase(toLowerCase().replace('_', ' '))
fun String.toHumanReadable() = StringUtil.toTitleCase(lowercase().replace('_', ' '))

fun generateUnifiedPatch(patch: String, filePath: String): TextFilePatch {
val unifiedPatch = "--- $filePath\n+++ $filePath\n$patch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class PathMapper(private val mappings: List<PathMapping>) {

fun normalizeLocal(localPath: String): String {
val updatedPath = if (SystemInfo.isWindows) {
localPath.toLowerCase()
localPath.lowercase()
} else {
localPath
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface CloudFormationTemplate {
}

private fun isYaml(templateFile: VirtualFile): Boolean = templateFile.fileType == YAMLFileType.YML ||
templateFile.extension?.toLowerCase() in YAML_EXTENSIONS
templateFile.extension?.lowercase() in YAML_EXTENSIONS

private val YAML_EXTENSIONS = setOf("yaml", "yml")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ class DynamicResourceStateChangedNotificationHandler(private val project: Projec
message(
"dynamic_resources.operation_status_notification_title",
state.resourceIdentifier ?: state.resourceType,
state.operation.name.toLowerCase()
state.operation.name.lowercase()
),
message(
"dynamic_resources.operation_status_success",
state.resourceIdentifier ?: state.resourceType,
state.operation.name.toLowerCase()
state.operation.name.lowercase()
),
project
)
Expand All @@ -48,7 +48,7 @@ class DynamicResourceStateChangedNotificationHandler(private val project: Projec
message(
"dynamic_resources.operation_status_failed_no_message",
state.resourceIdentifier ?: state.resourceType,
state.operation.name.toLowerCase()
state.operation.name.lowercase()
)
)
} else {
Expand All @@ -57,7 +57,7 @@ class DynamicResourceStateChangedNotificationHandler(private val project: Projec
message(
"dynamic_resources.operation_status_failed",
state.resourceIdentifier ?: state.resourceType,
state.operation.name.toLowerCase(),
state.operation.name.lowercase(),
state.message
)
)
Expand All @@ -79,7 +79,7 @@ class DynamicResourceStateChangedNotificationHandler(private val project: Projec
message(
"dynamic_resources.operation_status_notification_title",
state.resourceIdentifier ?: state.resourceType,
state.operation.name.toLowerCase()
state.operation.name.lowercase()
),
errorMessage,
project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ internal class DynamicResourceUpdateManager(private val project: Project) {
message(
"dynamic_resources.operation_status_notification_title",
dynamicResourceIdentifier.resourceIdentifier,
message("general.delete").toLowerCase()
message("general.delete").lowercase()
),
project
)
Expand Down Expand Up @@ -80,7 +80,7 @@ internal class DynamicResourceUpdateManager(private val project: Project) {
message(
"dynamic_resources.operation_status_notification_title",
dynamicResourceIdentifier.resourceIdentifier,
message("dynamic_resources.editor.submitResourceUpdateRequest_text").toLowerCase()
message("dynamic_resources.editor.submitResourceUpdateRequest_text").lowercase()
),
project
)
Expand Down Expand Up @@ -152,7 +152,7 @@ internal class DynamicResourceUpdateManager(private val project: Project) {
message(
"dynamic_resources.operation_status_notification_title",
mutation.resourceIdentifier ?: mutation.resourceType,
mutation.operation.name.toLowerCase()
mutation.operation.name.lowercase()
),
project
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SchemaCodeGenUtils {
if (builder.isNotEmpty()) {
builder.append(IdentifierFormatter.PACKAGE_SEPARATOR)
}
builder.append(IdentifierFormatter.toValidIdentifier(segment.toLowerCase()))
builder.append(IdentifierFormatter.toValidIdentifier(segment.lowercase()))
return this
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
TreeSpeedSearch.installOn(
tree,
false,
Function<TreePath, String> { obj ->
Function<TreePath, String?> { obj ->

Check notice on line 163 in plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/s3/editor/S3TreeTable.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unnecessary type argument

Remove explicit type arguments

Check notice

Code scanning / QDJVMC

Unnecessary type argument Note

Remove explicit type arguments
val node = obj.lastPathComponent as DefaultMutableTreeNode
val userObject = node.userObject as? S3TreeNode ?: return@Function null
return@Function if (userObject !is S3TreeContinuationNode<*>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class ResourceSelector<T> private constructor(
setEditable(false)

if (sortOnLoad) {
model.replaceAll(value.sortedBy { it.toString().toLowerCase() })
model.replaceAll(value.sortedBy { it.toString().lowercase() })
} else {
model.replaceAll(value.toList())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ data class Workspace(
// TODO: probably need to model the @sha:[...] case better
val (productCode, buildNumber) = ide.runtime().substringAfter("$JB_ECR_DOMAIN/").split(':', limit = 2)

productCode.substringBefore("@sha").toUpperCase() to buildNumber
productCode.substringBefore("@sha").uppercase() to buildNumber
}

val platformProduct = build?.let { IntelliJPlatformProduct.fromProductCode(it.first) }
Expand Down
2 changes: 1 addition & 1 deletion plugins/toolkit/jetbrains-rider/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ tasks.withType<DetektCreateBaselineTask>().configureEach {
}

configurations.all {
if (name.contains("detekt")) {
if (name.contains("detekt") || name.contains("kotlinCompiler")) {
return@all
}

Expand Down
Loading