This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-grpc.git
The following commit(s) were added to refs/heads/main by this push:
new f27a2ddb use org.apache.commons.lang3.Strings for contains checks
(#581)
f27a2ddb is described below
commit f27a2ddb2e8db9f3a25ad85b21ee652b9dafa814
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Jan 1 23:45:42 2026 +0100
use org.apache.commons.lang3.Strings for contains checks (#581)
---
project/CopyrightHeader.scala | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/project/CopyrightHeader.scala b/project/CopyrightHeader.scala
index 740287f1..13da2f1a 100644
--- a/project/CopyrightHeader.scala
+++ b/project/CopyrightHeader.scala
@@ -16,7 +16,7 @@ package org.apache.pekko.grpc
import sbt._
import Keys._
import sbtheader.{ CommentCreator, HeaderPlugin, NewLine }
-import org.apache.commons.lang3.StringUtils
+import org.apache.commons.lang3.Strings
object CopyrightHeader extends AutoPlugin {
import HeaderPlugin.autoImport._
@@ -120,15 +120,15 @@ object CopyrightHeader extends AutoPlugin {
})
private def isGenerated(text: String): Boolean =
- StringUtils.contains(text, "DO NOT EDIT DIRECTLY")
+ Strings.CS.contains(text, "DO NOT EDIT DIRECTLY")
private def isApacheCopyrighted(text: String): Boolean =
- StringUtils.containsIgnoreCase(text, "licensed to the apache software
foundation (asf)") ||
- StringUtils.containsIgnoreCase(text,
"www.apache.org/licenses/license-2.0") ||
- StringUtils.contains(text, "Apache-2.0")
+ Strings.CI.contains(text, "licensed to the apache software foundation
(asf)") ||
+ Strings.CI.contains(text, "www.apache.org/licenses/license-2.0") ||
+ Strings.CS.contains(text, "Apache-2.0")
private def isLightbendCopyrighted(text: String): Boolean =
- StringUtils.containsIgnoreCase(text, "lightbend inc.")
+ Strings.CI.contains(text, "lightbend inc.")
private def isOnlyLightbendCopyrightAnnotated(text: String): Boolean =
isLightbendCopyrighted(text) && !isApacheCopyrighted(text)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]