From 1bcef5083f93e9aedafad3c591c06583daa33d63 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 26 May 2024 00:30:35 -0700 Subject: [PATCH 1/2] Made config constructor private --- .../kotlin/net/thauvin/erik/isgd/Config.kt | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/src/main/kotlin/net/thauvin/erik/isgd/Config.kt b/src/main/kotlin/net/thauvin/erik/isgd/Config.kt index 67587fc..fbf5209 100644 --- a/src/main/kotlin/net/thauvin/erik/isgd/Config.kt +++ b/src/main/kotlin/net/thauvin/erik/isgd/Config.kt @@ -34,22 +34,13 @@ package net.thauvin.erik.isgd /** * Provides a builder to create/lookup an is.gd shortlink. */ -class Config( - var url: String = "", - var shorturl: String = "", - var callback: String = "", - var logstats: Boolean = false, - var format: Format = Format.SIMPLE, - var isVgd: Boolean = false -) { - constructor(builder: Builder) : this() { - url = builder.url - shorturl = builder.shorturl - callback = builder.callback - logstats = builder.logstats - format = builder.format - isVgd = builder.isVgd - } +class Config private constructor(builder: Builder) { + val url: String = builder.url + val shorturl: String = builder.shorturl + val callback: String = builder.callback + val logstats: Boolean = builder.logstats + val format: Format = builder.format + val isVgd: Boolean = builder.isVgd /** * Configures the parameters to create/lookup an is.gd shortlink. @@ -73,7 +64,7 @@ class Config( /** * You can specify the shorturl parameter if you'd like to pick a shortened URL instead of * having is.gd randomly generate one. These must be between 5 and 30 characters long and can only contain - * alphanumeric characters and underscores. Shortened URLs are case sensitive. Bear in mind that a desired + * alphanumeric characters and underscores. Shortened URLs are case-sensitive. Bear in mind that a desired * short URL might already be taken (this is very often the case with common words) so if you're using this * option be prepared to respond to an error and get an alternative choice from your app's user. */ From 6c031aedc5d3413d6b6b30f1d4bbe54e7fb7f08e Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 27 May 2024 18:03:58 -0700 Subject: [PATCH 2/2] Bumped Kotlin extension to version 0.9.8 --- examples/bld/lib/bld/bld-wrapper.properties | 2 +- lib/bld/bld-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bld/lib/bld/bld-wrapper.properties b/examples/bld/lib/bld/bld-wrapper.properties index 1243fad..8499fac 100644 --- a/examples/bld/lib/bld/bld-wrapper.properties +++ b/examples/bld/lib/bld/bld-wrapper.properties @@ -1,7 +1,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5 -bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.7 +bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.8 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.downloadLocation= bld.sourceDirectories= diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 3bec20e..2472505 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -1,7 +1,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5 -bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.7 +bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.8 bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.4 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.downloadLocation=