Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #27775: Upgrade commons compress to 1.26 #27776

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions dev/cnf/dependabot/check_this_in_if_it_changes/pom.xml
Expand Up @@ -394,7 +394,7 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
<version>1.16.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
Expand All @@ -414,7 +414,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<version>2.15.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand Down Expand Up @@ -1696,6 +1696,11 @@
<artifactId>commons-compress</artifactId>
<version>1.24.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
Expand Down
5 changes: 3 additions & 2 deletions dev/cnf/oss_dependencies.maven
Expand Up @@ -74,11 +74,11 @@ com.sun.xml.ws:jaxws-tools:2.3.6
com.sun.xml.ws:jaxws-tools:3.0.2
com.unboundid:unboundid-ldapsdk:5.1.0
commons-cli:commons-cli:1.4
commons-codec:commons-codec:1.15
commons-codec:commons-codec:1.16.1
commons-collections:commons-collections:3.2.2
commons-digester:commons-digester:2.1
commons-fileupload:commons-fileupload:1.5
commons-io:commons-io:2.11.0
commons-io:commons-io:2.15.1
commons-lang:commons-lang:2.4
commons-logging:commons-logging:1.2
commons-net:commons-net:3.6
Expand Down Expand Up @@ -335,6 +335,7 @@ org.apache.ant:ant:1.10.10
org.apache.bcel:bcel:6.6.1
org.apache.commons:commons-collections4:4.4
org.apache.commons:commons-compress:1.24.0
org.apache.commons:commons-compress:1.26.0
org.apache.commons:commons-dbcp2:2.7.0
org.apache.commons:commons-lang3:3.14.0
org.apache.commons:commons-math:2.2
Expand Down
7 changes: 5 additions & 2 deletions dev/com.ibm.ws.filetransfer.routing.archiveExpander/bnd.bnd
Expand Up @@ -20,10 +20,12 @@ Bundle-Description: Archive Expander; version=${bVersion}
Main-Class: com.ibm.ws.filetransfer.routing.archiveExpander.ArchiveExpander

Export-Package: \
com.ibm.ws.filetransfer.routing.archiveExpander
com.ibm.ws.filetransfer.routing.archiveExpander

Private-Package: \
org.apache.commons.compress.archivers.zip
org.apache.commons.compress.archivers.zip, \
org.apache.commons.io.build, \
org.apache.commons.io.file.attribute

Import-Package: \
!org.apache.commons.compress.compressors.lzw, \
Expand Down Expand Up @@ -53,4 +55,5 @@ instrument.disabled: true

-buildpath: \
com.ibm.ws.org.apache.commons.compress;version=latest,\
com.ibm.ws.org.apache.commons.io;version=latest, \
com.ibm.ws.org.osgi.annotation.versioning;version=latest
7 changes: 5 additions & 2 deletions dev/com.ibm.ws.filetransfer/bnd.bnd
Expand Up @@ -21,7 +21,9 @@ Export-Package:\
com.ibm.ws.filetransfer.util

Private-Package: \
com.ibm.ws.filetransfer.internal.*
com.ibm.ws.filetransfer.internal.*, \
org.apache.commons.io.build, \
org.apache.commons.io.file.attribute

Include-Resource: \
OSGI-INF=resources/OSGI-INF
Expand Down Expand Up @@ -49,4 +51,5 @@ instrument.classesExcludes: com/ibm/ws/filetransfer/internal/resources/*.class
org.hamcrest:hamcrest-all;version=1.3, \
org.jmock:jmock-junit4;strategy=exact;version=2.5.1, \
org.jmock:jmock;strategy=exact;version=2.5.1, \
com.ibm.ws.kernel.boot;version=latest
com.ibm.ws.kernel.boot;version=latest, \
com.ibm.ws.org.apache.commons.io;version=latest
14 changes: 12 additions & 2 deletions dev/com.ibm.ws.kernel.boot.archive/bnd.bnd
Expand Up @@ -24,7 +24,15 @@ Private-Package: \
org.apache.commons.compress.compressors.deflate64, \
org.apache.commons.compress.compressors, \
org.apache.commons.compress.compressors.lzw, \
org.apache.commons.compress.utils
org.apache.commons.compress.utils, \
org.apache.commons.codec, \
org.apache.commons.io, \
org.apache.commons.io.file.attribute, \
org.apache.commons.io.input, \
org.apache.commons.io.output, \
org.apache.commons.io.function




instrument.disabled: true
Expand All @@ -36,4 +44,6 @@ instrument.disabled: true
com.ibm.ws.logging.core;version=latest, \
com.ibm.ws.org.osgi.annotation.versioning;version=latest, \
com.ibm.ws.logging;version=latest, \
com.ibm.ws.org.apache.commons.compress;version=latest
com.ibm.ws.org.apache.commons.compress;version=latest, \
com.ibm.ws.org.apache.commons.io;version=latest,\
io.openliberty.org.apache.commons.codec;version=latest
1 change: 1 addition & 0 deletions dev/com.ibm.ws.kernel.boot_fat/bnd.bnd
Expand Up @@ -33,6 +33,7 @@ tested.features: mpconfig-1.3, concurrent-1.0, mpfaulttolerance-1.1, mpmetrics-1
org.jmock:jmock-junit4;strategy=exact;version=2.5.1, \
org.jmock:jmock;strategy=exact;version=2.5.1, \
com.ibm.ws.org.apache.commons.compress;version=latest, \
com.ibm.ws.org.apache.commons.io;version=latest, \
com.ibm.websphere.org.osgi.core;version=latest, \
com.ibm.websphere.org.osgi.service.cm;version=latest,\
com.ibm.websphere.org.osgi.service.component;version=latest,\
Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.kernel.feature_fat/bnd.bnd
Expand Up @@ -60,8 +60,7 @@ tested.features: needsNewEe-1.0, newEe-1.0, \
org.hamcrest:hamcrest-all;version=1.3,\
org.jmock:jmock-junit4;strategy=exact;version=2.5.1,\
org.jmock:jmock;strategy=exact;version=2.5.1,\
com.ibm.ws.org.apache.commons.compress;version=latest,\
com.ibm.ws.org.apache.commons.compress,\
org.apache.commons:commons-compress;strategy=exact;version=1.24.0, \
fattest.simplicity;version=latest,\
com.ibm.websphere.org.osgi.core;version=latest,\
com.ibm.websphere.org.osgi.service.cm;version=latest,\
Expand Down
2 changes: 1 addition & 1 deletion dev/com.ibm.ws.kernel.feature_fat/build.gradle
Expand Up @@ -12,7 +12,7 @@
*******************************************************************************/

dependencies {
requiredLibs project(':com.ibm.ws.org.apache.commons.compress')
requiredLibs 'org.apache.commons:commons-compress:1.24.0'
}

task copyBundles {
Expand Down
1 change: 1 addition & 0 deletions dev/com.ibm.ws.logging_fat/bnd.bnd
Expand Up @@ -42,6 +42,7 @@ fat.project: true
org.jmock:jmock-junit4;strategy=exact;version=2.5.1, \
org.jmock:jmock;strategy=exact;version=2.5.1, \
com.ibm.ws.org.apache.commons.compress;version=latest, \
com.ibm.ws.org.apache.commons.io;version=latest, \
com.ibm.websphere.org.osgi.core;version=latest, \
com.ibm.websphere.org.osgi.service.cm;version=latest,\
com.ibm.websphere.org.osgi.service.component;version=latest,\
Expand Down
1 change: 1 addition & 0 deletions dev/com.ibm.ws.microprofile.health.2.0_fat/bnd.bnd
Expand Up @@ -27,6 +27,7 @@ tested.features=servlet-4.0,cdi-2.0,mphealth-3.0,mphealth-3.1,mpConfig-1.4,mpCon

-buildpath: \
com.ibm.ws.org.apache.commons.compress;version=latest, \
com.ibm.ws.org.apache.commons.io;version=latest, \
org.apache.johnzon:johnzon-core;version=1.1.0, \
com.ibm.websphere.javaee.jsonp.1.1;version=latest, \
com.ibm.websphere.javaee.cdi.1.2;version=latest, \
Expand Down
1 change: 1 addition & 0 deletions dev/com.ibm.ws.microprofile.health_fat/bnd.bnd
Expand Up @@ -29,6 +29,7 @@ fat.project: true

-buildpath: \
com.ibm.ws.org.apache.commons.compress;version=latest, \
com.ibm.ws.org.apache.commons.io;version=latest, \
org.apache.johnzon:johnzon-core;version=1.1.0, \
com.ibm.websphere.javaee.jsonp.1.1;version=latest, \
com.ibm.websphere.javaee.cdi.1.2;version=latest, \
Expand Down
Expand Up @@ -39,6 +39,7 @@ tested.features:\
org.jmock:jmock-junit4;strategy=exact;version=2.5.1,\
org.jmock:jmock;strategy=exact;version=2.5.1,\
com.ibm.ws.org.apache.commons.compress;version=latest,\
com.ibm.ws.org.apache.commons.io;version=latest, \
com.ibm.websphere.rest.handler;version=latest,\
com.ibm.websphere.javaee.servlet.3.1;version=latest,\
com.ibm.websphere.javaee.cdi.2.0;version=latest,\
Expand Down
1 change: 1 addition & 0 deletions dev/com.ibm.ws.microprofile.metrics.monitor_fat/bnd.bnd
Expand Up @@ -37,6 +37,7 @@ fat.project: true
org.jmock:jmock-junit4;strategy=exact;version=2.5.1, \
org.jmock:jmock;strategy=exact;version=2.5.1, \
com.ibm.ws.org.apache.commons.compress;version=latest,\
com.ibm.ws.org.apache.commons.io;version=latest, \
com.ibm.websphere.rest.handler;version=latest, \
com.ibm.websphere.javaee.servlet.3.1;version=latest, \
com.ibm.websphere.javaee.cdi.2.0;version=latest,\
Expand Down
1 change: 1 addition & 0 deletions dev/com.ibm.ws.microprofile.metrics_fat/bnd.bnd
Expand Up @@ -36,6 +36,7 @@ fat.project: true
org.jmock:jmock-junit4;strategy=exact;version=2.5.1,\
org.jmock:jmock;strategy=exact;version=2.5.1,\
com.ibm.ws.org.apache.commons.compress;version=latest,\
com.ibm.ws.org.apache.commons.io;version=latest, \
com.ibm.websphere.rest.handler;version=latest,\
com.ibm.websphere.javaee.servlet.3.1;version=latest,\
com.ibm.websphere.javaee.cdi.2.0;version=latest,\
Expand Down
4 changes: 2 additions & 2 deletions dev/com.ibm.ws.org.apache.commons.compress/bnd.bnd
Expand Up @@ -10,8 +10,8 @@
# Contributors:
# IBM Corporation - initial API and implementation
#*******************************************************************************
-include= jar:${fileuri;${repo;org.apache.commons:commons-compress;1.24.0}}!/META-INF/MANIFEST.MF,bnd.overrides
-include= jar:${fileuri;${repo;org.apache.commons:commons-compress;1.26.0}}!/META-INF/MANIFEST.MF,bnd.overrides

publish.wlp.jar.disabled: true

-buildpath: org.apache.commons:commons-compress;version=1.24.0
-buildpath: org.apache.commons:commons-compress;version=1.26.0
2 changes: 1 addition & 1 deletion dev/com.ibm.ws.org.apache.commons.compress/bnd.overrides
Expand Up @@ -4,4 +4,4 @@ bVersion=1.0
Bundle-SymbolicName: com.ibm.ws.org.apache.commons.compress

Include-Resource: \
@${repo;org.apache.commons:commons-compress;1.24.0}!/!META-INF/maven/*
@${repo;org.apache.commons:commons-compress;1.26.0}!/!META-INF/maven/*
4 changes: 2 additions & 2 deletions dev/com.ibm.ws.org.apache.commons.io/bnd.bnd
Expand Up @@ -10,6 +10,6 @@
# Contributors:
# IBM Corporation - initial API and implementation
#*******************************************************************************
-include= jar:${fileuri;${repo;commons-io:commons-io;2.11.0;EXACT}}!/META-INF/MANIFEST.MF,bnd.overrides
-include= jar:${fileuri;${repo;commons-io:commons-io;2.15.1;EXACT}}!/META-INF/MANIFEST.MF,bnd.overrides

-buildpath: commons-io:commons-io;strategy=exact;version=2.11.0
-buildpath: commons-io:commons-io;strategy=exact;version=2.15.1
14 changes: 7 additions & 7 deletions dev/com.ibm.ws.org.apache.commons.io/bnd.overrides
Expand Up @@ -13,12 +13,12 @@ Import-Package: \
!org.apache.commons.io.*, *

Export-Package: \
org.apache.commons.io;version="2.11.0",org.apache.commons.io.comparator;version="2.11.0", \
org.apache.commons.io.file;version="2.11.0",org.apache.commons.io.file.spi;version="2.11.0", \
org.apache.commons.io.filefilter;version="2.11.0",org.apache.commons.io.function;version="2.11.0", \
org.apache.commons.io.input;version="2.11.0",org.apache.commons.io.input.buffer;version="2.11.0", \
org.apache.commons.io.monitor;version="2.11.0",org.apache.commons.io.output;version="2.11.0", \
org.apache.commons.io.serialization;version="2.11.0"
org.apache.commons.io;version="2.15.1",org.apache.commons.io.comparator;version="2.15.1", \
org.apache.commons.io.file;version="2.15.1",org.apache.commons.io.file.spi;version="2.15.1", \
org.apache.commons.io.filefilter;version="2.15.1",org.apache.commons.io.function;version="2.15.1", \
org.apache.commons.io.input;version="2.15.1",org.apache.commons.io.input.buffer;version="2.15.1", \
org.apache.commons.io.monitor;version="2.15.1",org.apache.commons.io.output;version="2.15.1", \
org.apache.commons.io.serialization;version="2.15.1"

Include-Resource: @${repo;commons-io:commons-io;2.11.0;EXACT}!/!META-INF/MANIFEST.MF|META-INF/maven/*
Include-Resource: @${repo;commons-io:commons-io;2.15.1;EXACT}!/!META-INF/MANIFEST.MF|META-INF/maven/*

Expand Up @@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-2.0/
*
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
Expand All @@ -15,6 +15,7 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.NoSuchFileException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.HashMap;
Expand Down Expand Up @@ -74,7 +75,7 @@ public FilePersistenceProvider() {
/**
* Unit test constructor. Allows for override of the JSON API object and
* IFileDebugger.
*
*
* @param json
* @param fDebug
*/
Expand Down Expand Up @@ -120,7 +121,7 @@ protected void deactivate() {
* This method should not be called directly by any method except getPersistenceFileLockObj().
* <p>
* This method will create the File object.
*
*
* @param name The persistence name associated with the File
* @return The File object which represents the underlying persistent file.
* @throws IOException If the parent directories could not be created (if necessary)
Expand All @@ -145,7 +146,7 @@ private File getPersistenceFile(final String name) {
* <p>
* Access to this method is synchronized. Callers should use the returned
* object for local synchronization.
*
*
* @param name The persistence name associated with the File 'lock object'
* @return The associated File 'lock object'
* @throws IOException If the File 'lock object' could not be properly created because the parent directories could not be created.
Expand All @@ -165,7 +166,7 @@ private synchronized File getPersistenceFileLockObj(final String name) {
* directories do not exist they will be created. If they can not be
* created, an exception will be thrown to the caller. Parent directories
* are NOT created by the Rest handler JSON API so we must ensure they are created here.
*
*
* @param file The File whose parents should be created, if needed.
* @throws IOException If the parent directories could not be created.
*/
Expand Down Expand Up @@ -277,6 +278,9 @@ public String loadPlainText(final String name) throws FileNotFoundException, IOE
} catch (FileNotFoundException e) {
// This is an expected error flow, do not FFDC or log anything
throw e;
} catch (NoSuchFileException e) {
// This is an expected error flow, do not FFDC or log anything
throw e;
} catch (IOException e) {
Tr.error(tc, "FILE_PERSISTENCE_IO_ERROR", file.getAbsolutePath(), e.getMessage());
throw e;
Expand Down Expand Up @@ -305,10 +309,8 @@ public Boolean run() {
boolean deleted = file.delete();
File parent = file.getParentFile();
String[] sa = parent.list();
if (sa.length == 0)
{
if (parent.delete() == false)
{
if (sa.length == 0) {
if (parent.delete() == false) {
Tr.warning(tc, "TOOLDATA_PARENT_DIR_DELETE_RESULT_FALSE", parent.getAbsolutePath());
}
}
Expand All @@ -321,8 +323,7 @@ public Boolean run() {

/** {@inheritDoc} */
@Override
public boolean exists(String name)
{
public boolean exists(String name) {
final File file = getPersistenceFileLockObj(name);

synchronized (file) {
Expand Down