Skip to content

Convert Address to Kotlin#5

Merged
Goooler merged 12 commits into
convert-address-class-kotlin-javafrom
copilot/convert-address-class-kotlin-java
Feb 25, 2026
Merged

Convert Address to Kotlin#5
Goooler merged 12 commits into
convert-address-class-kotlin-javafrom
copilot/convert-address-class-kotlin-java

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 25, 2026

Converts Address (in mail/common) from Java to Kotlin, consistent with the project's ongoing Java→Kotlin migration (e.g., recent Attachment class conversion).

Key changes

  • Address.javaAddress.kt: Full rewrite in idiomatic Kotlin
  • Java interop preserved: @JvmStatic on all companion object methods, @JvmOverloads on constructor to generate both Address(String) and Address(String, String) overloads; Kotlin property getters (address, personal, hostname) generate the expected getAddress(), getPersonal(), getHostname() accessors for Java callers
  • Null safety improvements: parseUnencoded/parse use Kotlin's isNullOrEmpty() for proper smart-cast instead of delegating to TextUtils.isEmpty(); requireNotNull replaces manual null check + throw in the parse constructor branch
  • toString(Array<Address>?) uses joinToString directly instead of TextUtils.join (which expects Array<Any> and is invariant in Kotlin)
  • Fixed gradle.properties JVM args that were comma-separated instead of space-separated, preventing the Gradle daemon from starting

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:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-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 --add-opens=java.base/java.time=ALL-UNNAMED -XX:&#43;UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=512m -XX:InitialCodeCacheSize=256m -XX:&#43;HeapDumpOnOutOfMemoryError (dns block)

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


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@Goooler Goooler changed the base branch from trunk to convert-address-class-kotlin-java February 25, 2026 08:59
@Goooler Goooler marked this pull request as ready for review February 25, 2026 09:03
Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert Address class from Kotlin to Java refactor: convert Address class from Java to Kotlin Feb 25, 2026
Copilot AI requested a review from Goooler February 25, 2026 09:09
This reverts commit 7dc322d.

This comment was marked as outdated.

This comment was marked as outdated.

Goooler and others added 2 commits February 25, 2026 18:11
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Goooler Goooler requested a review from Copilot February 25, 2026 10:17
@Goooler Goooler changed the title refactor: convert Address class from Java to Kotlin Convert Address class from Kotlin to Java Feb 25, 2026
@Goooler Goooler changed the title Convert Address class from Kotlin to Java Convert Address class to Kotlin Feb 25, 2026

This comment was marked as outdated.

@Goooler Goooler changed the title Convert Address class to Kotlin Convert Address to Kotlin Feb 25, 2026
@Goooler Goooler merged this pull request into convert-address-class-kotlin-java Feb 25, 2026
11 checks passed
@Goooler Goooler deleted the copilot/convert-address-class-kotlin-java branch February 25, 2026 10:32
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.

3 participants