From adf12ce9abef8d1acc74834cb282d6c7329dc64a Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 25 Aug 2021 09:04:47 -0700 Subject: [PATCH] Dependencies updates. Kotlin 1.5.30. --- .idea/runConfigurations.xml | 10 + build.gradle.kts | 28 +- .../-akismet-comment/-akismet-comment.html | 4 +- .../-companion/-a-d-m-i-n_-r-o-l-e.html | 11 + .../-t-y-p-e_-b-l-o-g_-p-o-s-t.html | 11 + .../-companion/-t-y-p-e_-c-o-m-m-e-n-t.html | 11 + .../-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html | 11 + .../-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html | 11 + .../-companion/-t-y-p-e_-m-e-s-s-a-g-e.html | 11 + .../-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html | 11 + .../-companion/-t-y-p-e_-r-e-p-l-y.html | 11 + .../-companion/-t-y-p-e_-s-i-g-n-u-p.html | 11 + .../-t-y-p-e_-t-r-a-c-k-b-a-c-k.html | 11 + .../-companion/-t-y-p-e_-t-w-e-e-t.html | 11 + .../-akismet-comment/-companion/index.html | 13 +- .../-akismet-comment/author-email.html | 11 + .../-akismet-comment/author-url.html | 11 + .../-akismet-comment/author.html | 11 + .../-akismet-comment/blog-charset.html | 11 + .../-akismet-comment/blog-lang.html | 11 + .../-akismet-comment/content.html | 11 + .../-akismet-comment/date-gmt.html | 11 + .../-akismet-comment/equals.html | 11 + .../-akismet-comment/hash-code.html | 11 + .../-akismet-comment/index.html | 17 +- .../-akismet-comment/is-test.html | 11 + .../-akismet-comment/permalink.html | 11 + .../-akismet-comment/post-modified-gmt.html | 11 + .../-akismet-comment/recheck-reason.html | 11 + .../-akismet-comment/referrer.html | 11 + .../-akismet-comment/server-env.html | 11 + .../-akismet-comment/to-json.html | 11 + .../-akismet-comment/to-string.html | 11 + .../-akismet-comment/type.html | 11 + .../-akismet-comment/user-agent.html | 11 + .../-akismet-comment/user-ip.html | 11 + .../-akismet-comment/user-role.html | 11 + .../-akismet/-akismet.html | 4 +- .../-akismet/-companion/date-to-gmt.html | 4 +- .../-akismet/-companion/index.html | 19 +- .../-akismet/-companion/json-comment.html | 13 +- .../-akismet/app-user-agent.html | 11 + .../-akismet/blog.html | 11 + .../-akismet/check-comment.html | 11 + .../-akismet/debug-help.html | 11 + .../-akismet/error-message.html | 11 + .../-akismet/execute-method.html | 13 +- .../-akismet/http-status-code.html | 11 + .../-akismet/index.html | 25 +- .../-akismet/is-discard.html | 13 +- .../-akismet/is-verified-key.html | 13 +- .../-akismet/logger.html | 11 + .../-akismet/pro-tip.html | 11 + .../-akismet/reset.html | 13 +- .../-akismet/response.html | 11 + .../-akismet/submit-ham.html | 11 + .../-akismet/submit-spam.html | 11 + .../-akismet/verify-key.html | 11 + examples/build.gradle.kts | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- examples/gradlew | 269 +++++++++++------- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 269 +++++++++++------- pom.xml | 18 +- .../thauvin/erik/akismet/AkismetComment.kt | 2 +- 65 files changed, 979 insertions(+), 264 deletions(-) create mode 100644 .idea/runConfigurations.xml diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index fce86c8..1edb64c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { id("com.github.ben-manes.versions") version "0.39.0" - id("io.gitlab.arturbosch.detekt") version "1.18.0-RC2" + id("io.gitlab.arturbosch.detekt") version "1.18.0" id("jacoco") id("java") id("maven-publish") @@ -13,9 +13,9 @@ plugins { id("org.jetbrains.dokka") version "1.5.0" id("org.sonarqube") version "3.3" id("signing") - kotlin("jvm") version "1.5.21" - kotlin("kapt") version "1.5.21" - kotlin("plugin.serialization") version "1.5.21" + kotlin("jvm") version "1.5.30" + kotlin("kapt") version "1.5.30" + kotlin("plugin.serialization") version "1.5.30" } group = "net.thauvin.erik" @@ -52,7 +52,7 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2") - testImplementation("org.mockito:mockito-core:3.11.2") + testImplementation("org.mockito:mockito-core:3.12.3") testImplementation("org.testng:testng:7.4.0") } @@ -67,6 +67,24 @@ detekt { baseline = project.rootDir.resolve("config/detekt/baseline.xml") } +kotlin { + // Add kapt.use.worker.api=false to gradle.properties (JDK 16+) + // See: https://youtrack.jetbrains.com/issue/KT-45545 + kotlinDaemonJvmArgs = listOf( + "-Dfile.encoding=UTF-8", + "--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED" + ) +} + java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html index aee1f5d..e31ef6c 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html @@ -28,13 +28,13 @@
fun AkismetComment(request: HttpServletRequest)
-

Create an Akismet comment extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.

See the Akismet API for more details.

See also

+

Creates a new instance extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.

See the Akismet API for more details.

See also

fun AkismetComment(userIp: String, userAgent: String)
-

Create an Akismet comment instance.

See the Akismet API for more details.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+

Creates a new AkismetComment instance.

See the Akismet API for more details.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html index 18e2710..87c350e 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html @@ -29,6 +29,17 @@
const val ADMIN_ROLE: String

Administrator role. If used, Akismet will always return false.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html index 5c81622..666f7c4 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html @@ -29,6 +29,17 @@
const val TYPE_BLOG_POST: String

A blog post.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html index ed7f186..9a99b27 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html @@ -29,6 +29,17 @@
const val TYPE_COMMENT: String

A blog comment.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html index f556eb4..97dccb0 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html @@ -29,6 +29,17 @@
const val TYPE_CONTACT_FORM: String

A contact form or feedback form submission.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html index 5731d47..a271a0c 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html @@ -29,6 +29,17 @@
const val TYPE_FORUM_POST: String

A top-level forum post.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html index 9381c07..baee7a0 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html @@ -29,6 +29,17 @@
const val TYPE_MESSAGE: String

A message sent between just a few users.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html index d8c2fc9..ce896b2 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html @@ -29,6 +29,17 @@
const val TYPE_PINGBACK: String

A pingback.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html index c5b6e08..0e6a7ff 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html @@ -29,6 +29,17 @@
const val TYPE_REPLY: String

A reply to a top-level forum post.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html index b7d2e31..319c709 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html @@ -29,6 +29,17 @@
const val TYPE_SIGNUP: String

A new user account.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html index f52820f..b6c0a7b 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html @@ -29,6 +29,17 @@
const val TYPE_TRACKBACK: String

A trackback.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html index 7788b4c..7b187a3 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html @@ -29,6 +29,17 @@
const val TYPE_TWEET: String

A Twitter message.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html index e3250e1..e774414 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html @@ -25,7 +25,7 @@
object Companion
-
+

Properties

@@ -172,6 +172,17 @@
+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html index c8d2e6c..5bd811a 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html @@ -29,6 +29,17 @@
var authorEmail: String?

Email address submitted with the comment.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html index a449456..ef28d62 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html @@ -29,6 +29,17 @@
var authorUrl: String?

URL submitted with comment.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html index 1503b7d..9100b09 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html @@ -29,6 +29,17 @@
var author: String?

Name submitted with the comment.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html index 8ae6a65..6ede7a5 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html @@ -29,6 +29,17 @@
var blogCharset: String?

The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html index 6a4da3c..6e48447 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html @@ -29,6 +29,17 @@
var blogLang: String?

Indicates the language(s) in use on the blog or site, in ISO 639-1 format, comma-separated.

A site with articles in English and French might use: en, fr_ca

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html index 418fba9..968c444 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html @@ -29,6 +29,17 @@
var content: String?

The content that was submitted.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html index 93c010e..b9827c2 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html @@ -29,6 +29,17 @@
var dateGmt: String?

The UTC timestamp of the creation of the comment, in ISO 8601 format.

May be omitted if the comment is sent to the API at the time it is created.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html index 5c7ed96..bbec800 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html @@ -29,6 +29,17 @@
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is equal to this one.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html index fe52a6c..0a07aca 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html @@ -29,6 +29,17 @@
open override fun hashCode(): Int

Returns a hash code value for the object.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html index c937ea0..8177498 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html @@ -25,7 +25,7 @@
open class AkismetComment(userIp: String, userAgent: String)

A comment to send to Akismet.

Most everything is optional. Performance can drop dramatically if you choose to exclude data points. The more data you send Akismet about each comment, the greater the accuracy. They recommend erring on the side of including too much data.

See the Akismet API for more details.

-
+

Parameters

@@ -40,7 +40,7 @@
-
fun AkismetComment(request: HttpServletRequest)
Create an Akismet comment extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.
+
fun AkismetComment(request: HttpServletRequest)
Creates a new instance extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.
@@ -53,7 +53,7 @@
-
fun AkismetComment(userIp: String, userAgent: String)
Create an Akismet comment instance.
+
fun AkismetComment(userIp: String, userAgent: String)
Creates a new AkismetComment instance.
@@ -371,6 +371,17 @@ +

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html index 7e06ea7..2df7f59 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html @@ -29,6 +29,17 @@
var isTest: Boolean = false

This is an optional parameter. You can use it when submitting test queries to Akismet.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html index 9a69e0f..7e0b3e9 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html @@ -29,6 +29,17 @@
var permalink: String?

The full permanent URL of the entry the comment was submitted to.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html index 9d07a8d..33c0f45 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html @@ -29,6 +29,17 @@
var postModifiedGmt: String?

The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html index 455a2cf..d1aaf2b 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html @@ -29,6 +29,17 @@
var recheckReason: String?

If you are sending content to Akismet to be rechecked, such as a post that has been edited or old pending comments that you'd like to recheck, include this parameter with a string describing why the content is being rechecked.

For example: edit

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html index 71504d9..c8c6634 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html @@ -29,6 +29,17 @@
var referrer: String?

The content of the referer header should be set here.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html index a2d76bb..23e5203 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html @@ -29,6 +29,17 @@
var serverEnv: Map<String, String>

In PHP, there is an array of environmental variables called $_SERVER that contains information about the Web server itself as well as a key/value for every HTTP header sent with the request. This data is highly useful to Akismet.

How the submitted content interacts with the server can be very telling, so please include as much of it as possible.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html index 6a7edf4..00f778a 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html @@ -29,6 +29,17 @@
fun toJson(): String

Returns a JSON representation of the comment.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html index b4323e9..0e8b5d5 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html @@ -29,6 +29,17 @@
open override fun toString(): String

Returns a JSON representation of the comment.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html index e9e6057..3fa9aa9 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html @@ -29,6 +29,17 @@
var type: String?

A string that describes the type of content being sent, such as:

You may send a value not listed above if none of them accurately describe your content.

This is further explained here.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html index 0a3fe8c..bcb37bb 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html @@ -29,6 +29,17 @@
val userAgent: String

Parameters

userAgent

User agent string of the web browser submitting the comment.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html index 12dc7c6..3cd8869 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html @@ -29,6 +29,17 @@
val userIp: String

Parameters

userIp

IP address of the comment submitter.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html index 642708e..7e95de7 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html @@ -29,6 +29,17 @@
var userRole: String?

The user role of the user who submitted the comment. This is an optional parameter.

If you set it to ADMIN_ROLE, Akismet will always return false.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html index 366c165..e04614e 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html @@ -28,13 +28,13 @@
fun Akismet(apiKey: String, blog: String)
-

Create a new instance using an Akismet API key and URL registered with Akismet.

+

Creates a new instance using an Akismet API key and URL registered with Akismet.

fun Akismet(apiKey: String)
-

Creates new instance using the provided Akismet API key.

+

Creates a new instance using the provided Akismet API key.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html index feff6b0..adcb968 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html @@ -28,13 +28,13 @@
fun dateToGmt(date: Date): String
-

Convert a date to a UTC timestamp. (ISO 8601)

See also

+

Converts a date to a UTC timestamp. (ISO 8601)

See also

fun dateToGmt(date: LocalDateTime): String
-

Convert a locale date/time to a UTC timestamp. (ISO 8601)

See also

+

Converts a locale date/time to a UTC timestamp. (ISO 8601)

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html index 41964c4..c3b9778 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html @@ -25,7 +25,7 @@
object Companion
-
+

Functions

@@ -40,13 +40,13 @@
fun dateToGmt(date: LocalDateTime): String
-
Convert a locale date/time to a UTC timestamp.
+
Converts a locale date/time to a UTC timestamp.
fun dateToGmt(date: Date): String
-
Convert a date to a UTC timestamp.
+
Converts a date to a UTC timestamp.
@@ -63,12 +63,23 @@
fun jsonComment(json: String): AkismetComment
-
(Re)Create a comment from a JSON string.
+
(Re)Creates a comment from a JSON string.
+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html index baba689..96bd49d 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html @@ -28,7 +28,18 @@
fun jsonComment(json: String): AkismetComment
-

(Re)Create a comment from a JSON string.

See also

+

(Re)Creates a comment from a JSON string.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html index 65ea083..c2faa28 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html @@ -29,6 +29,17 @@
var appUserAgent: String

The application user agent to be sent to Akismet.

If possible, the application user agent string should always use the following format:

    Application Name/Version

The library's own user agent string will automatically be appended.

See the Akismet API for more details.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html index c2d0cf0..17cf343 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html @@ -29,6 +29,17 @@
var blog: String

The URL registered with Akismet.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html index f928b6c..e5414af 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html @@ -29,6 +29,17 @@
fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean

Comment Check.

This is the call you will make the most. It takes a number of arguments and characteristics about the submitted content and then returns a thumbs up or thumbs down. Performance can drop dramatically if you choose to exclude data points. The more data you send Akismet about each comment, the greater the accuracy. They recommend erring on the side of including too much data

By default, if an error (IO, empty response from Akismet, etc.) occurs the function will return false and log the error, use the trueOnError parameter to change this behavior.

See the Akismet API for more details.

Return

true if the comment is spam, false if the comment is not.

Parameters

trueOnError

Set to return true on error.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html index bd75031..667658e 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html @@ -29,6 +29,17 @@
var debugHelp: String

The x-akismet-debug-help header from the last operation, if any.

If the call returns neither true nor false, the x-akismet-debug-help header will provide context for any error that has occurred.

Note that the x-akismet-debug-help header will not always be sent if a response does not return false or true.

See the Akismet API for more details.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html index f55d28f..5f7709d 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html @@ -29,6 +29,17 @@
var errorMessage: String

The error message.

The error (IO, empty response from Akismet, etc.) message is also logged as a warning.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html index 235ba4d..44341b0 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html @@ -28,7 +28,18 @@
fun executeMethod(apiUrl: HttpUrl?, formBody: FormBody, trueOnError: Boolean = false): Boolean
-

Execute a call to an Akismet REST API method.

Parameters

apiUrl

The Akismet API URL endpoint. (e.g. https://rest.akismet.com/1.1/verify-key)

formBody

The HTTP POST form body containing the request parameters to be submitted.

trueOnError

Set to return true on error (IO, empty response, etc.)

+

Executes a call to an Akismet REST API method.

Parameters

apiUrl

The Akismet API URL endpoint. (e.g. https://rest.akismet.com/1.1/verify-key)

formBody

The HTTP POST form body containing the request parameters to be submitted.

trueOnError

Set to return true on error (IO, empty response, etc.)

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html index bd76a62..703347f 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html @@ -29,6 +29,17 @@
var httpStatusCode: Int = 0

The HTTP status code of the last operation.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html index 64dfc2e..d425220 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html @@ -25,7 +25,7 @@
open class Akismet(apiKey: String)

Provides access to the Akismet API.

-
+

Constructors

@@ -36,7 +36,7 @@
-
fun Akismet(apiKey: String, blog: String)
Create a new instance using an Akismet API key and URL registered with Akismet.
+
fun Akismet(apiKey: String, blog: String)
Creates a new instance using an Akismet API key and URL registered with Akismet.
@@ -49,7 +49,7 @@
-
fun Akismet(apiKey: String)
Creates new instance using the provided Akismet API key.
+
fun Akismet(apiKey: String)
Creates a new instance using the provided Akismet API key.
@@ -104,7 +104,7 @@
fun executeMethod(apiUrl: HttpUrl?, formBody: FormBody, trueOnError: Boolean = false): Boolean
-
Execute a call to an Akismet REST API method.
+
Executes a call to an Akismet REST API method.
@@ -121,7 +121,7 @@
fun reset()
-
Reset the debugHelp, errorMessage, httpStatusCode, isDiscard, isVerifiedKey, proTip, and response properties.
+
Resets the debugHelp, errorMessage, httpStatusCode, isDiscard, isVerifiedKey, proTip, and response properties.
@@ -252,7 +252,7 @@
-
var isDiscard: Boolean = false
Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.
+
var isDiscard: Boolean = false
Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.
@@ -265,7 +265,7 @@
-
var isVerifiedKey: Boolean = false
Check if the API Key has been verified
+
var isVerifiedKey: Boolean = false
Set to true if the API Key has been verified.
@@ -310,6 +310,17 @@ +

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html index 78ac153..9c43d1b 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html @@ -28,7 +28,18 @@
var isDiscard: Boolean = false
-

Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.

See the Akismet API for more details.

See also

+

Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.

See the Akismet API for more details.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html index 773525f..155678b 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html @@ -28,7 +28,18 @@
var isVerifiedKey: Boolean = false
-

Check if the API Key has been verified

See also

+

Set to true if the API Key has been verified.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html index e84978d..1e370a9 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html @@ -29,6 +29,17 @@
val logger: Logger

The logger instance.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html index 661853a..19ae7f1 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html @@ -29,6 +29,17 @@
var proTip: String

The x-akismet-pro-tip header from the last operation, if any.

If the x-akismet-pro-tip header is set to discard, then Akismet has determined that the comment is blatant spam, and you can safely discard it without saving it in any spam queue.

See the Akismet API for more details.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html index 5dc5d62..3266e38 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html @@ -28,7 +28,18 @@
fun reset()
-

Reset the debugHelp, errorMessage, httpStatusCode, isDiscard, isVerifiedKey, proTip, and response properties.

+

Resets the debugHelp, errorMessage, httpStatusCode, isDiscard, isVerifiedKey, proTip, and response properties.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html index 7a0db3d..bac1c4d 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html @@ -29,6 +29,17 @@
var response: String

The actual response sent by Akismet from the last operation.

For example: true, false, valid, invalid, etc.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html index f32e0a7..9ab2410 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html @@ -29,6 +29,17 @@
fun submitHam(comment: AkismetComment): Boolean

Submit Ham. (False Positives)

This call is intended for the submission of false positives - items that were incorrectly classified as spam by Akismet. It takes identical arguments as comment check and submit spam.

It is very important that the values you submit with this call match those of your comment check calls as closely as possible. In order to learn from its mistakes, Akismet needs to match your missed spam and false positive reports to the original comment-check API calls made when the content was first posted. While it is normal for less information to be available for submit-spam and submit-ham calls (most comment systems and forums will not store all metadata), you should ensure that the values that you do send match those of the original content.

See the Akismet API for more details.

Return

true if the comment was submitted, false otherwise.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html index 87120c2..9f3e479 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html @@ -29,6 +29,17 @@
fun submitSpam(comment: AkismetComment): Boolean

Submit Spam. (Missed Spam)

This call is for submitting comments that weren't marked as spam but should have been.

It is very important that the values you submit with this call match those of your comment check calls as closely as possible. In order to learn from its mistakes, Akismet needs to match your missed spam and false positive reports to the original comment-check API calls made when the content was first posted. While it is normal for less information to be available for submit-spam and submit-ham calls (most comment systems and forums will not store all metadata), you should ensure that the values that you do send match those of the original content.

See the Akismet API for more details.

Return

true if the comment was submitted, false otherwise.

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html index e602886..7b3c931 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html +++ b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html @@ -29,6 +29,17 @@
fun verifyKey(): Boolean

Key Verification.

Key verification authenticates your key before calling the comment check, submit spam, or submit ham methods. This is the first call that you should make to Akismet and is especially useful if you will have multiple users with their own Akismet subscriptions using your application.

See the Akismet API for more details.

Return

true if the key is valid, false otherwise.

See also

+

Sources

+
+
+
+
jvm source +
Link copied to clipboard
+
+
+
+
+
diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index bca65a0..2ef6e07 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -1,7 +1,9 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { id("application") id("com.github.ben-manes.versions") version "0.39.0" - kotlin("jvm") version "1.5.21" + kotlin("jvm") version "1.5.30" } // ./gradlew run runJava @@ -24,6 +26,10 @@ application { } tasks { + withType().configureEach { + kotlinOptions.jvmTarget = java.targetCompatibility.toString() + } + register("runJava", JavaExec::class) { group = "application" mainClass.set("com.example.AkismetSample") diff --git a/examples/gradle/wrapper/gradle-wrapper.properties b/examples/gradle/wrapper/gradle-wrapper.properties index 05679dc..ffed3a2 100644 --- a/examples/gradle/wrapper/gradle-wrapper.properties +++ b/examples/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/examples/gradlew b/examples/gradlew index 744e882..1b6c787 100755 --- a/examples/gradlew +++ b/examples/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MSYS* | MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 05679dc..ffed3a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 744e882..1b6c787 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MSYS* | MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/pom.xml b/pom.xml index 55710ee..d3349a9 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ org.jetbrains.kotlin kotlin-bom - 1.5.0 + 1.5.30 pom import @@ -48,16 +48,16 @@ - javax.servlet - javax.servlet-api - 4.0.1 + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + 1.5.30 compile - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - 1.5.0 - compile + javax.servlet + javax.servlet-api + 4.0.1 + runtime com.squareup.okhttp3 @@ -74,7 +74,7 @@ org.jetbrains.kotlinx kotlinx-serialization-json-jvm - 1.2.0 + 1.2.2 runtime diff --git a/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt b/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt index 30c2353..9740f71 100644 --- a/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt +++ b/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt @@ -52,7 +52,7 @@ private fun String?.ifNull() = this ?: "" * * See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details. * - * @constructor Creates a new [AskimetComment] instance. + * @constructor Creates a new instance. * * See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details. *