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
// Fix the write() method: move "instanceof Object" check to the end
103
+
// Pattern: check for specific type first, then Object
104
+
val writeMethodPattern =Regex(
105
+
"""(// check if the actual instance is of the type `Object`\s+if \(value\.getActualInstance\(\) instanceof Object\) \{[^}]+\}\s+)(// check if the actual instance is of the type `(\w+)`\s+if \(value\.getActualInstance\(\) instanceof \3\) \{[^}]+\})""",
106
+
RegexOption.DOT_MATCHES_ALL
107
+
)
108
+
content = content.replace(writeMethodPattern) { match ->
109
+
// Swap: put specific type check before Object check
0 commit comments