Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

Kotlin 2.3.0 introduced stricter type inference that detects unnecessary null-safety operators and redundant type casts. The build fails with -Werror enabled due to 7 new warnings across the codebase.

Changes

  • Removed unnecessary safe calls: StrongRef?.uriStrongRef.uri where type is non-null
  • Removed redundant null checks: Eliminated if (response.id != null) guards where Kotlin now proves non-nullability
  • Removed redundant Elvis operators: it ?: emptyList()it where left operand is non-nullable
  • Removed unnecessary casts: parseHtml(content) as ElementparseHtml(content) where return type is already Element

Files Modified

  • data/database/cache/mapper/Bluesky.kt
  • data/datasource/misskey/MisskeyDataSource.kt (2 locations)
  • data/datasource/misskey/SearchUserPagingSource.kt
  • data/datasource/misskey/TrendHashtagPagingSource.kt
  • ui/model/mapper/Mastodon.kt
  • ui/model/mapper/Misskey.kt

All changes preserve existing behavior while satisfying the improved type system in Kotlin 2.3.0.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • central.sonatype.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx8g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp (dns block)
  • jitpack.io
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx8g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update kotlin from 2.2.21 to 2.3.0 Fix Kotlin 2.3.0 compiler warnings while maintaining -Werror Jan 12, 2026
Copilot AI requested a review from Tlaster January 12, 2026 05:29
@Tlaster Tlaster marked this pull request as ready for review January 12, 2026 05:30
@Tlaster Tlaster merged commit 3d276d7 into dependabot/gradle/kotlin-2.3.0 Jan 12, 2026
1 check passed
@Tlaster Tlaster deleted the copilot/sub-pr-1644 branch January 12, 2026 05:31
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