Skip to content

Commit 0c035c5

Browse files
dsilvamDaniel Silvaclaude
authored
refactor(deps): remove dot.guava repackaged dependency (#35315)
## Summary - Replaces all 240 occurrences of `com.dotcms.repackage.com.google.common.*` imports with standard `com.google.common.*` equivalents across the codebase (222 in `dotCMS/src`, 18 in `dotcms-integration/src`) - Removes `com.dotcms.lib:dot.guava:11.0.1_2` from `dotCMS/pom.xml` and `bom/application/pom.xml` - Fixes two API compatibility breaks surfaced by the Guava 32 upgrade: - `Objects.toStringHelper()` → `MoreObjects.toStringHelper()` (removed in Guava 20) - `Cache.get(key)` → `Cache.getIfPresent(key)` (removed in Guava 22) Closes #35235 (partial — companion to the OWASP dependency upgrade PR) ## Motivation `dot.guava` was a dotCMS-repackaged version of Guava 11.0.1 that provided a `com.dotcms.repackage.com.google.common.*` namespace alongside the standard `com.google.guava:guava` artifact. Both coexisted on the classpath. Now that guava has been upgraded to 32.0.1-jre, `dot.guava` is redundant and its old APIs are a liability. ## Test plan - [x] `./mvnw install -pl :dotcms-core -DskipTests` — BUILD SUCCESS - [ ] Verify no `com.dotcms.repackage.com.google` references remain: `grep -r "com.dotcms.repackage.com.google" dotCMS/src dotcms-integration/src --include="*.java"` → 0 results - [ ] Run integration tests for rules engine (most heavily affected area): `RulesAPIImpl`, `RulesFactoryImpl`, conditionlets 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Daniel Silva <[email protected]> Co-authored-by: Claude Sonnet 4.6 <[email protected]>
1 parent a2f24da commit 0c035c5

254 files changed

Lines changed: 385 additions & 394 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bom/application/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,6 @@
220220
<artifactId>dot.google</artifactId>
221221
<version>ukv_2</version>
222222
</dependency>
223-
<dependency>
224-
<groupId>com.dotcms.lib</groupId>
225-
<artifactId>dot.guava</artifactId>
226-
<version>11.0.1_2</version>
227-
</dependency>
228223
<dependency>
229224
<groupId>com.dotcms.lib</groupId>
230225
<artifactId>dot.hibernate</artifactId>

dotCMS/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,6 @@
216216
<groupId>com.dotcms.lib</groupId>
217217
<artifactId>dot.google</artifactId>
218218
</dependency>
219-
<dependency>
220-
<groupId>com.dotcms.lib</groupId>
221-
<artifactId>dot.guava</artifactId>
222-
</dependency>
223219
<dependency>
224220
<groupId>com.dotcms.lib</groupId>
225221
<artifactId>dot.hibernate</artifactId>

dotCMS/src/enterprise/java/com/dotcms/enterprise/RulesAPIProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import com.dotcms.enterprise.license.LicenseLevel;
1717
import com.dotcms.enterprise.rules.RulesAPI;
1818
import com.dotcms.enterprise.rules.RulesAPIImpl;
19-
import com.dotcms.repackage.com.google.common.collect.Lists;
19+
import com.google.common.collect.Lists;
2020
import com.dotmarketing.business.Ruleable;
2121
import com.dotmarketing.exception.DotDataException;
2222
import com.dotmarketing.exception.DotSecurityException;

dotCMS/src/enterprise/java/com/dotcms/enterprise/publishing/bundlers/URLMapBundler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import com.dotcms.publishing.*;
1616
import com.dotcms.publishing.output.BundleOutput;
1717
import com.dotcms.publishing.output.FileCreationException;
18-
import com.dotcms.repackage.com.google.common.collect.Lists;
18+
import com.google.common.collect.Lists;
1919
import com.dotmarketing.beans.Host;
2020
import com.dotmarketing.beans.Identifier;
2121
import com.dotmarketing.business.APILocator;

dotCMS/src/enterprise/java/com/dotcms/enterprise/publishing/remote/handler/ContentHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import com.dotcms.publishing.FilterDescriptor;
3636
import com.dotcms.publishing.PublisherConfig;
3737
import com.dotcms.rendering.velocity.services.PageLoader;
38-
import com.dotcms.repackage.com.google.common.base.Strings;
38+
import com.google.common.base.Strings;
3939
import com.dotcms.storage.FileMetadataAPI;
4040
import com.dotcms.storage.model.Metadata;
4141
import com.dotcms.util.CollectionsUtils;

dotCMS/src/enterprise/java/com/dotcms/enterprise/publishing/remote/handler/StructureHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import com.dotcms.publishing.DotPublishingException;
1818
import com.dotcms.publishing.PublisherConfig;
1919
import com.dotcms.publishing.PublisherConfig.Operation;
20-
import com.dotcms.repackage.com.google.common.collect.ImmutableList;
20+
import com.google.common.collect.ImmutableList;
2121
import com.dotcms.util.xstream.XStreamHandler;
2222
import com.dotmarketing.business.APILocator;
2323
import com.dotmarketing.business.CacheLocator;

dotCMS/src/enterprise/java/com/dotcms/enterprise/publishing/sitesearch/ESSiteSearchPublisher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import com.dotcms.publishing.PublishStatus;
2525
import com.dotcms.publishing.Publisher;
2626
import com.dotcms.publishing.PublisherConfig;
27-
import com.dotcms.repackage.com.google.common.collect.Lists;
27+
import com.google.common.collect.Lists;
2828
import com.dotcms.storage.FileMetadataAPI;
2929
import com.dotcms.storage.model.Metadata;
3030
import com.dotmarketing.beans.Host;

dotCMS/src/enterprise/java/com/dotcms/enterprise/publishing/staticpublishing/AWSS3EndPointPublisher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import com.amazonaws.services.s3.transfer.Upload;
3131
import com.amazonaws.services.s3.transfer.model.UploadResult;
3232
import com.amazonaws.util.IOUtils;
33-
import com.dotcms.repackage.com.google.common.annotations.VisibleForTesting;
33+
import com.google.common.annotations.VisibleForTesting;
3434
import com.dotcms.tika.TikaUtils;
3535
import com.dotcms.util.CloseUtils;
3636
import com.dotmarketing.util.Config;

dotCMS/src/enterprise/java/com/dotcms/enterprise/rules/RulesAPIImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
import com.dotcms.business.CloseDBIfOpened;
1313
import com.dotcms.business.WrapInTransaction;
14-
import com.dotcms.repackage.com.google.common.collect.ImmutableList;
15-
import com.dotcms.repackage.com.google.common.collect.Lists;
16-
import com.dotcms.repackage.com.google.common.collect.Maps;
14+
import com.google.common.collect.ImmutableList;
15+
import com.google.common.collect.Lists;
16+
import com.google.common.collect.Maps;
1717
import com.dotmarketing.beans.Host;
1818
import com.dotmarketing.beans.Identifier;
1919
import com.dotmarketing.business.APILocator;

dotCMS/src/enterprise/java/com/dotcms/enterprise/rules/RulesFactoryImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
package com.dotcms.enterprise.rules;
1111

12-
import com.dotcms.repackage.com.google.common.base.Strings;
13-
import com.dotcms.repackage.com.google.common.collect.Lists;
14-
import com.dotcms.repackage.com.google.common.collect.Maps;
15-
import com.dotcms.repackage.com.google.common.collect.Sets;
12+
import com.google.common.base.Strings;
13+
import com.google.common.collect.Lists;
14+
import com.google.common.collect.Maps;
15+
import com.google.common.collect.Sets;
1616
import com.dotmarketing.business.CacheLocator;
1717
import com.dotmarketing.business.Ruleable;
1818
import com.dotmarketing.common.db.DotConnect;

0 commit comments

Comments
 (0)