Conversation
📝 WalkthroughWalkthroughThe Apache Tika dependency version was updated from 2.7.0 to 3.2.3 in the Maven configuration file. This is a major version bump across multiple minor versions that may affect dependency resolution and Tika functionality. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pom.xml`:
- Line 2328: The Tika version bump to 3.2.3 requires Java 11+, but the project
currently targets Java 1.8; before merging either confirm the runtime/JDK used
for build and deployment is Java 11+ or revert/fix the dependency to remain Java
8 compatible. Specifically, check/update the pom's tika.version change or the
build configuration: if you want to keep Tika 3.2.3, update the project Java
target (maven-compiler-plugin/source & target or toolchains) to 11+ and ensure
CI + deployment images use JDK11+; otherwise pin tika.version back to 2.7.0 (or
another 2.x) so RestApiPublisherUtils.java (which uses Tika, TikaConfig,
Metadata, MimeTypes) continues to load under Java 1.8.
| <h2.orbit.version>2.3.232.wso2v1</h2.orbit.version> | ||
| <tomcat.version>9.0.108</tomcat.version> | ||
| <tika.version>2.7.0</tika.version> | ||
| <tika.version>3.2.3</tika.version> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# 1. Confirm the Java compiler source/target used across the project.
echo "=== Java compiler configuration ==="
rg -n --type xml 'maven-compiler-plugin|<source>|<target>|<release>' -A 3 -B 3
# 2. Locate every file importing or referencing Tika types.
echo -e "\n=== Tika imports ==="
rg -rn --type java 'import org\.apache\.tika\.'
# 3. Check for AbstractParser usage (deprecated in 3.x, removed in 4.x).
echo -e "\n=== AbstractParser usage ==="
rg -rn --type java 'AbstractParser'
# 4. Check for HTMLParser / TagSoupParser references.
echo -e "\n=== HTMLParser / TagSoup usage ==="
rg -rn --type java 'HTMLParser|TagSoupParser'
# 5. Check for hardcoded MIME type strings that changed in 3.x.
echo -e "\n=== application/javascript MIME type usage ==="
rg -rn 'application/javascript'
# 6. Check for custom-mimetypes.xml placement.
echo -e "\n=== custom-mimetypes.xml location ==="
fd -I 'custom-mimetypes.xml'Repository: wso2/carbon-apimgt
Length of output: 50375
🏁 Script executed:
#!/bin/bash
# 1. Check for custom-mimetypes.xml
echo "=== custom-mimetypes.xml location ==="
fd -I 'custom-mimetypes.xml'
# 2. Examine the actual Tika usage in RestApiPublisherUtils.java
echo -e "\n=== Tika usage in RestApiPublisherUtils.java ==="
cat -n components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/utils/RestApiPublisherUtils.java | grep -A 30 -B 5 "import org.apache.tika"Repository: wso2/carbon-apimgt
Length of output: 2973
Verify Java 11+ runtime requirement before merging.
This 2.7.0 → 3.2.3 version bump crosses a major version boundary. Tika 3.x officially requires Java 11+, but the project explicitly targets Java 1.8 for most components (gateway, keymgt, tokenmgt, cleanup.service, output.adapter.http, persistence). If the runtime environment or compilation is Java 8, Tika 3.x classes will fail to load. Confirm the actual deployment Java version before proceeding.
The project uses Tika only in RestApiPublisherUtils.java with standard MIME detection APIs (Tika, TikaConfig, Metadata, MimeTypes) which remain compatible across 2.7.0 → 3.2.3. No deprecated APIs or custom Tika configuration changes are required.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pom.xml` at line 2328, The Tika version bump to 3.2.3 requires Java 11+, but
the project currently targets Java 1.8; before merging either confirm the
runtime/JDK used for build and deployment is Java 11+ or revert/fix the
dependency to remain Java 8 compatible. Specifically, check/update the pom's
tika.version change or the build configuration: if you want to keep Tika 3.2.3,
update the project Java target (maven-compiler-plugin/source & target or
toolchains) to 11+ and ensure CI + deployment images use JDK11+; otherwise pin
tika.version back to 2.7.0 (or another 2.x) so RestApiPublisherUtils.java (which
uses Tika, TikaConfig, Metadata, MimeTypes) continues to load under Java 1.8.
Purpose
$subject
Related issues
wso2/api-manager#4605