You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/workspace/WorkspaceServiceHandler.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ class WorkspaceServiceHandler(
104
104
.mapNotNull { event ->
105
105
val file = event.file.takeIf { shouldHandleFile(it) } ?:return@mapNotNull null
106
106
val oldName = event.oldValue as?String?:return@mapNotNull null
107
-
val newName =event.newValue as?String?:return@mapNotNull null
107
+
if (event.newValue !isString)return@mapNotNull null
108
108
109
109
// Construct old and new URIs
110
110
val parentPath = file.parent?.toNioPath() ?:return@mapNotNull null
Copy file name to clipboardExpand all lines: plugins/amazonq/shared/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonq/lsp/workspace/WorkspaceServiceHandlerTest.kt
-5Lines changed: 0 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -282,7 +282,6 @@ class WorkspaceServiceHandlerTest {
282
282
oldName = oldName,
283
283
newName = newName,
284
284
isDirectory =false,
285
-
extension ="java"
286
285
)
287
286
288
287
// Act
@@ -304,7 +303,6 @@ class WorkspaceServiceHandlerTest {
304
303
oldName ="oldFile.txt",
305
304
newName ="newFile.txt",
306
305
isDirectory =false,
307
-
extension ="txt"
308
306
)
309
307
310
308
// Act
@@ -341,12 +339,10 @@ class WorkspaceServiceHandlerTest {
341
339
val event1 = createMockPropertyChangeEvent(
342
340
oldName ="old1.java",
343
341
newName ="new1.java",
344
-
extension ="java"
345
342
)
346
343
val event2 = createMockPropertyChangeEvent(
347
344
oldName ="old2.py",
348
345
newName ="new2.py",
349
-
extension ="py"
350
346
)
351
347
352
348
// Act
@@ -537,7 +533,6 @@ class WorkspaceServiceHandlerTest {
0 commit comments