Questions tagged [apache-commons-text]

For questions about the "Text" sub-project of the "Commons" project from Apache (also known as Apache Software Foundation or ASF) which is a java library for dealing with strings including manipulation, parsing and comparing.

Text is a sub-project of the Commons project from the Apache Software Foundation (ASF). It is a Java library for dealing with strings. It includes utilities for manipulating strings and parsing strings and comparing strings.

11 questions
1
vote
1 answer

Apache commons-text throwing NoClassDefFoundError on Android 4.4.4

I have a library which uses the Apache Commons Text library. A test suite for my library runs fine in JRE. However, when I use the library in an Android app and try to run it on an old device (running Android 4.4.4 aka KitKat), it crashes with a…
user149408
  • 5,385
  • 4
  • 33
  • 69
1
vote
1 answer

Capital letters after punctuation marks, but with some exceptions

My exceptions are: Capital letter at the beginning of the sentence or after a punctuation mark Add space after punctuation mark After an abbreviation, don't use capital letters After a "- " (with a space), use capital letters After a "-" (no…
Despotars
  • 541
  • 1
  • 8
  • 23
0
votes
0 answers

Disabling Geode Pulse in Apache Geode

I have apache-geode-1.15.1 installed on multiple Linux servers. Is there a way to disable Geode Pulse (located in /tools/Pulse/geode-pulse-1.15.1.war) in Apache Geode? I'm encountering a security vulnerability and Geode Pulse is a major…
eli
  • 1
  • 2
0
votes
1 answer

How to resolve dangling ${ when using StringSubstitutor?

Test Case // Build map Map valuesMap = new HashMap<>(); valuesMap.put("animal", "quick brown fox"); valuesMap.put("target", "lazy dog"); String templateString = "The ${animal} jumped ${ over the ${target}.%"; // Build…
Ian Lim
  • 4,164
  • 3
  • 29
  • 43
0
votes
1 answer

Apache Commons StringSubstitutor Working in main Method Call but failing when Run As Part of a Unit Test

So I am trying to create a method that replaces Placeholders in a block of text read from a file. I have created a method that utilises StringSubstitutor from Apache Commons Text, and when I call my method in the main method, it works, yet my Unit…
0
votes
1 answer

Is it OK to replace commons-text-1.6.jar by commons-text-1.10.jar (related to security alert CVE-2022-42889 / QID 377639 Text4Shell)?

Is it OK to replace commons-text-1.6.jar by commons-text-1.10.jar (related to security alert CVE-2022-42889 / QID 377639 Text4Shell)? Would it introduce compatibility issues for the users pyspark code? The reason for this question is in many…
HAltos
  • 701
  • 7
  • 6
0
votes
1 answer

Gradle owasp plugin does not see CVE-2022-42889

I have a build.gradle file with the following plugins and dependencies plugins { ... id 'org.owasp.dependencycheck' version '7.3.0', ... } ext { ... okHttpVersion = '4.9.3' ... } repositories { …
0
votes
0 answers

Apache commons text version vulnerability

I have an apache web server running a WordPress site. The Apache web server has a new vulnerability called text4shell. Apache suggests upgrading the commons text version. Can any body know how to upgrade the apache commons text version in…
0
votes
2 answers

CVE-2022-42889 in Apache Commons Text and impact on Cassandra 3.11.x

Can someone help and share information, is there any analysis available to know which Cassandra 3.11.x version is not impacted directly or indirectly by CVE-2022-42889?
0
votes
1 answer

apache commons-text StringSubstitutor, valueMap.put("amount", 20.0); how to output `$20.0`?

code: Map valueMap = new HashMap<>(); valueMap.put("amount", 20.0); valueMap.put("id", 123456); StringSubstitutor ss = new StringSubstitutor(valueMap); // I expect output:…
Guo
  • 1,761
  • 2
  • 22
  • 45
0
votes
0 answers

java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils

I am trying to call a method, but I keep getting the following error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils From what I understood I was supposed to have this dependency in my…
csymvoul
  • 677
  • 3
  • 15
  • 30