This is an automated email from the ASF dual-hosted git repository.
mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new aa1120d46 Remove deprecated Apache StringUtils
aa1120d46 is described below
commit aa1120d46ea183fed131a05f207459837de94661
Author: Matthew de Detrich <[email protected]>
AuthorDate: Wed Dec 10 11:08:36 2025 +1100
Remove deprecated Apache StringUtils
---
project/CopyrightHeader.scala | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/project/CopyrightHeader.scala b/project/CopyrightHeader.scala
index d0146e596..93a09ae15 100644
--- a/project/CopyrightHeader.scala
+++ b/project/CopyrightHeader.scala
@@ -13,7 +13,7 @@
import sbt._, 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._
@@ -98,20 +98,20 @@ 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)
}
private def isSbt012Licensed(text: String): Boolean =
- StringUtils.containsIgnoreCase(text, "sbt -- Simple Build Tool")
+ Strings.CI.contains(text, "sbt -- Simple Build Tool")
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]