You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/01/22 23:18:31 UTC
[maven-indexer] branch MINDEXER-126 updated (7651b9b -> 612e54f)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a change to branch MINDEXER-126
in repository https://gitbox.apache.org/repos/asf/maven-indexer.git.
discard 7651b9b [MINDEXER-126] Remove guava dependency from indexer-core
new c3199df Bump junit from 4.13 to 4.13.1
new 612e54f [MINDEXER-126] Remove guava dependency from indexer-core
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (7651b9b)
\
N -- N -- N refs/heads/MINDEXER-126 (612e54f)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/main/java/org/apache/maven/index/ArtifactInfo.java | 2 +-
.../org/apache/maven/index/context/TrackingLockFactory.java | 10 +++++-----
.../org/apache/maven/index/packer/IndexPackingRequest.java | 4 ++--
.../java/org/apache/maven/index/updater/IndexDataReader.java | 4 ++--
pom.xml | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
[maven-indexer] 01/02: Bump junit from 4.13 to 4.13.1
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MINDEXER-126
in repository https://gitbox.apache.org/repos/asf/maven-indexer.git
commit c3199dff3e46ced2e22b0fea27ae47e2dd64c787
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Fri Jan 22 23:37:45 2021 +0100
Bump junit from 4.13 to 4.13.1
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index fa0b4eb..1967ca7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -270,7 +270,7 @@ under the License.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.13</version>
+ <version>4.13.1</version>
<scope>test</scope>
</dependency>
[maven-indexer] 02/02: [MINDEXER-126] Remove guava dependency from
indexer-core
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MINDEXER-126
in repository https://gitbox.apache.org/repos/asf/maven-indexer.git
commit 612e54fe6a87a8b485331cda5e242f7ebe215930
Author: Alexander Kurtakov <ak...@redhat.com>
AuthorDate: Fri Jan 22 23:51:52 2021 +0200
[MINDEXER-126] Remove guava dependency from indexer-core
It suffers from multiple CVEs:
* guava < 24.1.1 is vulnerable to CVE-2018-10237.
* guava < 30.0 is vulnerable to CVE-2020-8908.
Moving to guava 30.1 will require moving to Java 8 so it's actually
simpler to just remove the dependency altogether.
Signed-off-by: Alexander Kurtakov <ak...@redhat.com>
---
indexer-core/pom.xml | 5 -----
.../src/main/java/org/apache/maven/index/ArtifactInfo.java | 5 ++---
.../org/apache/maven/index/context/TrackingLockFactory.java | 12 +++++++-----
.../org/apache/maven/index/packer/IndexPackingRequest.java | 8 ++++----
.../java/org/apache/maven/index/updater/IndexDataReader.java | 3 +--
5 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/indexer-core/pom.xml b/indexer-core/pom.xml
index d6f6fdc..c36de84 100644
--- a/indexer-core/pom.xml
+++ b/indexer-core/pom.xml
@@ -40,11 +40,6 @@ under the License.
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
-
<!-- DI -->
<dependency>
<groupId>javax.inject</groupId>
diff --git a/indexer-core/src/main/java/org/apache/maven/index/ArtifactInfo.java b/indexer-core/src/main/java/org/apache/maven/index/ArtifactInfo.java
index 7f75838..389b89b 100644
--- a/indexer-core/src/main/java/org/apache/maven/index/ArtifactInfo.java
+++ b/indexer-core/src/main/java/org/apache/maven/index/ArtifactInfo.java
@@ -37,8 +37,6 @@ import org.eclipse.aether.version.InvalidVersionSpecificationException;
import org.eclipse.aether.version.Version;
import org.eclipse.aether.version.VersionScheme;
-import com.google.common.base.Strings;
-
/**
* ArtifactInfo holds the values known about an repository artifact. This is a simple Value Object kind of stuff.
* Phasing out.
@@ -431,7 +429,8 @@ public class ArtifactInfo
public String toString()
{
final StringBuilder result = new StringBuilder( getUinfo() );
- if ( !Strings.isNullOrEmpty( getPackaging() ) )
+ String packaging = getPackaging();
+ if ( packaging != null && !getPackaging().isEmpty() )
{
result.append( "[" ).append( getPackaging() ).append( "]" );
}
diff --git a/indexer-core/src/main/java/org/apache/maven/index/context/TrackingLockFactory.java b/indexer-core/src/main/java/org/apache/maven/index/context/TrackingLockFactory.java
index 9bc6a02..0eb17c0 100644
--- a/indexer-core/src/main/java/org/apache/maven/index/context/TrackingLockFactory.java
+++ b/indexer-core/src/main/java/org/apache/maven/index/context/TrackingLockFactory.java
@@ -9,7 +9,7 @@ package org.apache.maven.index.context;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -26,7 +26,9 @@ import java.util.concurrent.ConcurrentHashMap;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.Lock;
import org.apache.lucene.store.LockFactory;
-import static com.google.common.base.Preconditions.checkNotNull;
+
+import static java.util.Objects.requireNonNull;
+
import java.util.HashSet;
/**
@@ -43,7 +45,7 @@ final class TrackingLockFactory
TrackingLockFactory( final LockFactory delegate )
{
- this.delegate = checkNotNull( delegate );
+ this.delegate = requireNonNull( delegate );
this.emittedLocks = Collections.newSetFromMap( new ConcurrentHashMap<TrackingLock, Boolean>() );
}
@@ -78,8 +80,8 @@ final class TrackingLockFactory
TrackingLock( final Lock delegate, final String name )
{
- this.delegate = checkNotNull( delegate );
- this.name = checkNotNull( name );
+ this.delegate = requireNonNull( delegate );
+ this.name = requireNonNull( name );
}
String getName()
diff --git a/indexer-core/src/main/java/org/apache/maven/index/packer/IndexPackingRequest.java b/indexer-core/src/main/java/org/apache/maven/index/packer/IndexPackingRequest.java
index 850d9d8..a4af036 100644
--- a/indexer-core/src/main/java/org/apache/maven/index/packer/IndexPackingRequest.java
+++ b/indexer-core/src/main/java/org/apache/maven/index/packer/IndexPackingRequest.java
@@ -26,7 +26,7 @@ import java.util.Collection;
import org.apache.lucene.index.IndexReader;
import org.apache.maven.index.context.IndexingContext;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
/**
* An index packing request.
@@ -53,11 +53,11 @@ public class IndexPackingRequest
public IndexPackingRequest( final IndexingContext context, final IndexReader indexReader, final File targetDir )
{
- this.context = checkNotNull( context );
+ this.context = requireNonNull( context );
- this.indexReader = checkNotNull( indexReader );
+ this.indexReader = requireNonNull( indexReader );
- this.targetDir = checkNotNull( targetDir );
+ this.targetDir = requireNonNull( targetDir );
this.createIncrementalChunks = true;
diff --git a/indexer-core/src/main/java/org/apache/maven/index/updater/IndexDataReader.java b/indexer-core/src/main/java/org/apache/maven/index/updater/IndexDataReader.java
index c5f1d71..055d288 100644
--- a/indexer-core/src/main/java/org/apache/maven/index/updater/IndexDataReader.java
+++ b/indexer-core/src/main/java/org/apache/maven/index/updater/IndexDataReader.java
@@ -29,7 +29,6 @@ import java.io.UTFDataFormatException;
import java.util.Date;
import java.util.zip.GZIPInputStream;
-import com.google.common.base.Strings;
import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.lucene.document.Document;
@@ -159,7 +158,7 @@ public class IndexDataReader
// Fix up UINFO field wrt MINDEXER-41
final Field uinfoField = (Field) doc.getField( ArtifactInfo.UINFO );
final String info = doc.get( ArtifactInfo.INFO );
- if ( uinfoField != null && !Strings.isNullOrEmpty( info ) )
+ if ( uinfoField != null && info != null && !info.isEmpty() )
{
final String[] splitInfo = ArtifactInfo.FS_PATTERN.split( info );
if ( splitInfo.length > 6 )