Sync from SUSE:SLFO:Main apache-commons-text revision 53bd8a736b3d920800bd4ec14d4821da

This commit is contained in:
Adrian Schröter 2024-05-03 11:03:02 +02:00
commit a88ec4391f
7 changed files with 9852 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="commons-text" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property name="project.groupId" value="org.apache.commons"/>
<property name="project.artifactId" value="commons-text"/>
<property name="project.version" value="1.10.0"/>
<property name="spec.version" value="1.10"/>
<property name="compiler.source" value="1.8"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="build.resourceDir.1" value="."/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<include name="**/*"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
encoding="iso-8859-1"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<mkdir dir="${build.outputDir}/META-INF"/>
<copy todir="${build.outputDir}/META-INF">
<fileset dir="${build.resourceDir.1}">
<include name="NOTICE.txt"/>
<include name="LICENSE.txt"/>
<include name="NOTICE"/>
<include name="LICENSE"/>
</fileset>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
verbose="false"
encoding="iso-8859-1"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
charset="ISO-8859-1"
source="${compiler.source}"
linksource="true"
breakiterator="false">
<classpath refid="build.classpath"/>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Automatic-Module-Name" value="org.apache.commons.text"/>
<attribute name="Bundle-Description" value="Apache Commons Text is a library focused on algorithms working on strings."/>
<attribute name="Bundle-DocURL" value="https://commons.apache.org/proper/commons-text"/>
<attribute name="Bundle-License" value="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="Apache Commons Text"/>
<attribute name="Bundle-SymbolicName" value="org.apache.commons.commons-text"/>
<attribute name="Bundle-Vendor" value="The Apache Software Foundation"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="org.apache.commons.text.diff;version=&quot;${project.version}&quot;,org.apache.commons.text.lookup;version=&quot;${project.version}&quot;,org.apache.commons.text.matcher;version=&quot;${project.version}&quot;,org.apache.commons.text.similarity;version=&quot;${project.version}&quot;,org.apache.commons.text.translate;version=&quot;${project.version}&quot;,org.apache.commons.text;version=&quot;${project.version}&quot;"/>
<attribute name="Implementation-Title" value="Apache Commons Text"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
<attribute name="Implementation-Version" value="${project.version}"/>
<attribute name="Import-Package" value="javax.script,javax.xml.xpath,org.apache.commons.lang3,org.apache.commons.lang3.time,org.xml.sax"/>
<attribute name="Include-Resource" value="META-INF/NOTICE.txt=NOTICE.txt,META-INF/LICENSE.txt=LICENSE.txt"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
<attribute name="Specification-Title" value="Apache Commons Text"/>
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
<attribute name="Specification-Version" value="${spec.version}"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

116
apache-commons-text.changes Normal file
View File

@ -0,0 +1,116 @@
-------------------------------------------------------------------
Mon Oct 31 19:49:13 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
- add upstream signing key and verify source signature
-------------------------------------------------------------------
Fri Oct 14 12:47:40 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 1.10.0 (mitigation of bsc#1204284,
CVE-2022-42889)
* Changes of 1.10.0:
+ Fix CaseUtils when the input string contains only delimiters
+ Add GraalVM test dependencies to fix test failures with Java
15
+ Incorrect values for Jaccard similarity with empty strings
+ StringSubstitutor map constructor throws NPE on 1.9 with null
map
+ JaroWinklerDistance returns the same values as
JaroWinklerSimilarity
+ Correct Javadoc in FileStringLookup
+ Use StringUtils.INDEX_NOT_FOUND constant
+ Remove redundant local variable
+ Replace lambda with method reference
+ Simplify statements
+ Replace statement lambda with expression lambda
+ Use static class inner class in tests
+ Simplify assertion
+ Extract duplicate code
+ Set void return method
+ Remove unused exception from
TextStringBuilder.readFrom(CharBuffer). This preserves binary
compatibility but not source compatibility
+ StrBuilder.StrBuilderReader.skip(long): Throw an exception
when an implicit narrowing conversion in a compound assignment
would result in information loss or a numeric error such as an
overflows
+ TextStringBuilder.TextStringBuilderReader.skip(long): Throw
an exception when an implicit narrowing conversion in a
compound assignment would result in information loss or a
numeric error such as an overflows
+ TextStringBuilder.equals whatever the capacity is
+ A More Efficient Implementation for Calculating Size of
Longest Common Subsequence
+ LookupTranslator returns count of chars consumed, not of
codepoints consumed
+ Use Math.min() call instead of doing it manually
+ TextStringBuilder: Throw OutOfMemoryError instead of
NegativeArraySizeException
+ TextStringBuilder: Can't grow to sizes up to
Integer.MAX_VALUE
+ Make default string lookups configurable via system property
Remove dns, url, and script lookups from defaults. If these
lookups are required for use in StringSubstitutor
.createInterpolator(), they must be enabled via system
property (bsc#
+ Add DoubleFormat utility
+ Document negative limit for WordUtils abbreviate method
+ Speed up LevenshteinDistance with threshold by exiting early
+ Release Notes page hasn't been updated for 1.9 release yet
+ Add StrBuilder.isNotEmpty()
* Changes of 1.9:
+ Removed non-existing parameter from Javadocs and spelled out
parameters in throws
+ StringEscapeUtils.unescapeCsv doesn't remove quotes at begin
and end of string
+ ScriptStringLookup does not accept ":"
+ StringSubstitutor incorrectly removes some escape characters
+ Make ConstantStringLookup.constantCache final
+ Simplify if in CaseUtils
+ Add StringMatcher.size()
+ Refactor TextStringBuilder.readFrom(Readable), extracting
readFrom(CharBuffer) and readFrom(Reader)
+ Add BiStringLookup and implementation BiFunctionStringLookup
+ Add org.apache.commons.text.StringSubstitutor
.StringSubstitutor(StringSubstitutor)
+ Add org.apache.commons.text.TextStringBuilder
.TextStringBuilder(CharSequence)
+ Add org.apache.commons.text.TextStringBuilder.drainChar(int)
+ Add org.apache.commons.text.TextStringBuilder.drainChars(int,
int, char[]. int)
+ Add org.apache.commons.text.TextStringBuilder.isNotEmpty()
+ Add org.apache.commons.text.TextStringBuilder.isReallocated()
+ Add org.apache.commons.text.TextStringBuilder.readFrom(Reader,
int)
+ Add org.apache.commons.text.TextStringBuilder.set(String)
+ Add org.apache.commons.text.TextStringBuilder.wrap(char[])
+ Add org.apache.commons.text.TextStringBuilder.wrap(char[],
int)
+ Add org.apache.commons.text.io.StringSubstitutorReader
+ Add org.apache.commons.text.lookup.StringLookupFactory
.functionStringLookup(Function<String, V>)
+ Add org.apache.commons.text.matcher.StringMatcher
.isMatch(CharSequence, int)
+ Add org.apache.commons.text.matcher.StringMatcher
.isMatch(CharSequence, int, int, int)
+ Add org.apache.commons.text.matcher.StringMatcherFactory
.andMatcher(StringMatcher...)
+ Add org.apache.commons.text.matcher.StringMatcherFactory
.stringMatcher(char...)
-------------------------------------------------------------------
Thu Mar 10 14:03:25 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Rewrite build system to build with ant in order to avoid build
cycles.
* This package is now the dependency of maven-javadoc-plugin
-------------------------------------------------------------------
Sat Nov 9 18:36:06 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 1.8
-------------------------------------------------------------------
Tue Jun 25 07:38:44 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Initial release v1.6 on OBS

9467
apache-commons-text.keyring Normal file

File diff suppressed because it is too large Load Diff

83
apache-commons-text.spec Normal file
View File

@ -0,0 +1,83 @@
#
# spec file for package apache-commons-text
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global base_name text
%global short_name commons-%{base_name}
Name: apache-%{short_name}
Version: 1.10.0
Release: 0
Summary: A library focused on algorithms working on strings
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://commons.apache.org/proper/commons-text/
Source0: http://archive.apache.org/dist/commons/text/source/commons-text-%{version}-src.tar.gz
Source1: %{name}-build.xml
Source2: http://archive.apache.org/dist/commons/text/source/commons-text-%{version}-src.tar.gz.asc
Source3: https://www.apache.org/dist/commons/KEYS#/%{name}.keyring
BuildRequires: ant
BuildRequires: apache-commons-lang3
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildArch: noarch
%description
Apache Commons Text is a library focused on algorithms working on strings.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n commons-text-%{version}-src
cp %{SOURCE1} build.xml
%pom_remove_parent
%pom_xpath_inject pom:project "<groupId>org.apache.commons</groupId>"
%build
mkdir -p lib
build-jar-repository -s lib apache-commons-lang3
%{ant} package javadoc
%install
# jars
install -dm 755 %{buildroot}%{_javadir}/%{name}
install -m 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{short_name}.jar
# pom
install -dm 755 %{buildroot}%{_mavenpomdir}/%{name}
install -m 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{short_name}.pom
%add_maven_depmap %{name}/%{short_name}.pom %{name}/%{short_name}.jar
# javadoc
install -dm 755 %{buildroot}/%{_javadocdir}/%{name}
cp -r target/site/apidocs/* %{buildroot}/%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE.txt NOTICE.txt
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE.txt NOTICE.txt
%changelog

BIN
commons-text-1.10.0-src.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEELbTx7w+nYezE6pNchv3H4qESYssFAmMvGsIACgkQhv3H4qES
Yss3EggAkT8hrxVGVfRmJOfGgXgZq6z/rDYR2yXT9Fh9C2UFELJiPLWaRoSwwEJx
4uI41gjdjeYWDAZCaaMztM/ZIDoxUWVIZNPNyulVZ/Nz/bKUdf3JsXmAZUnVrIpt
DEkCv6R9UlSSJIawyLjaaiAwOu7Qo8blIfmDHpCMpHCIF3tc1JkLqq1Jz4/6qkUf
eujw0Apxc+CreDa7OOEd9obmxL4XGRNqLRcRzaO1YZjgUbBDCSRkAT8Pe4fOmp0c
w79eLP7ICBhl+DejPIaWx3PD7Drdt5IUmApi+5S/3xK8dg1LTVpsldV8rYTCAvhR
1yanT2yIrSp9AefzPw1Qs8bGTw6daw==
=7Hot
-----END PGP SIGNATURE-----