-
Notifications
You must be signed in to change notification settings - Fork 268
Provide JDK21 compilation support #4555
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,6 +101,8 @@ | |
| <Export-Package> | ||
| org.wso2.carbon.mediator.cache.*, | ||
| </Export-Package> | ||
| <Import-Package> | ||
| </Import-Package> | ||
|
Comment on lines
+104
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check if other fragment bundles in the project use similar patterns
rg -A3 "Fragment-Host" --type xml -g "pom.xml" | rg -B1 -A2 "Import-Package"Repository: wso2/product-micro-integrator Length of output: 633 🏁 Script executed: #!/bin/bash
# First, view the cache-mediator pom.xml around lines 104-105
echo "=== Cache-mediator pom.xml around lines 104-105 ==="
sed -n '100,110p' components/mediation/mediators/cache-mediator/org.wso2.carbon.mediator.cache/pom.xml
# Find all fragment bundles and their Import-Package patterns
echo -e "\n=== All fragment bundles with their instructions sections ==="
rg -B5 -A15 "Fragment-Host" --type xml -g "pom.xml" | grep -A15 "Fragment-Host"Repository: wso2/product-micro-integrator Length of output: 14876 Remove the explicitly empty The empty 🤖 Prompt for AI Agents |
||
| <DynamicImport-Package>*</DynamicImport-Package> | ||
| <Fragment-Host>synapse-core</Fragment-Host> | ||
| </instructions> | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,10 +21,6 @@ | |||||||||||||||||||||
| import org.apache.commons.logging.Log; | ||||||||||||||||||||||
| import org.apache.commons.logging.LogFactory; | ||||||||||||||||||||||
| import org.osgi.service.component.ComponentContext; | ||||||||||||||||||||||
| import org.osgi.service.component.annotations.Activate; | ||||||||||||||||||||||
| import org.osgi.service.component.annotations.Component; | ||||||||||||||||||||||
| import org.osgi.service.component.annotations.Deactivate; | ||||||||||||||||||||||
| import org.osgi.service.component.annotations.Reference; | ||||||||||||||||||||||
| import org.osgi.service.component.annotations.ReferenceCardinality; | ||||||||||||||||||||||
| import org.osgi.service.component.annotations.ReferencePolicy; | ||||||||||||||||||||||
| import org.wso2.micro.core.Constants; | ||||||||||||||||||||||
|
|
@@ -36,8 +32,7 @@ | |||||||||||||||||||||
| import javax.transaction.TransactionManager; | ||||||||||||||||||||||
| import javax.transaction.UserTransaction; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Component(name = "org.wso2.micro.integrator.transaction.manager.TransactionManagerComponent", | ||||||||||||||||||||||
| immediate = true) | ||||||||||||||||||||||
| //TODO: need a way to solve javax.transaction service dependency | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: TODO indicates incomplete refactoring. The TODO comment acknowledges an unresolved dependency issue for |
||||||||||||||||||||||
| public class TransactionManagerComponent { | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| private static Log log = LogFactory.getLog(TransactionManagerComponent.class); | ||||||||||||||||||||||
|
|
@@ -49,23 +44,16 @@ public class TransactionManagerComponent { | |||||||||||||||||||||
| /* class level lock for controlling synchronized access to static variables */ | ||||||||||||||||||||||
| private static Object txManagerComponentLock = new Object(); | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Activate | ||||||||||||||||||||||
| protected void activate(ComponentContext ctxt) { | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| bindTransactionManagerWithJNDI(); | ||||||||||||||||||||||
| log.debug("Transaction Manager bundle is activated "); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
Comment on lines
47
to
51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log Improvement Suggestion No: 1
Suggested change
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Deactivate | ||||||||||||||||||||||
| protected void deactivate(ComponentContext ctxt) { | ||||||||||||||||||||||
| log.debug("Transaction Manager bundle is deactivated "); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Reference(name = "transactionmanager", | ||||||||||||||||||||||
| service = TransactionManager.class, | ||||||||||||||||||||||
| cardinality = ReferenceCardinality.MANDATORY, | ||||||||||||||||||||||
| policy = ReferencePolicy.DYNAMIC, | ||||||||||||||||||||||
| unbind = "unsetTransactionManager") | ||||||||||||||||||||||
| protected void setTransactionManager(TransactionManager txManager) { | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| synchronized (txManagerComponentLock) { | ||||||||||||||||||||||
|
|
@@ -88,11 +76,6 @@ private static TransactionManager getTransactionManager() { | |||||||||||||||||||||
| return txManager; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Reference(name = "usertransaction", | ||||||||||||||||||||||
| service = UserTransaction.class, | ||||||||||||||||||||||
| cardinality = ReferenceCardinality.MANDATORY, | ||||||||||||||||||||||
| policy = ReferencePolicy.DYNAMIC, | ||||||||||||||||||||||
| unbind = "unsetUserTransaction") | ||||||||||||||||||||||
| protected void setUserTransaction(UserTransaction userTransaction) { | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| synchronized (txManagerComponentLock) { | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty Import-Package may cause missing dependencies.
The empty
<Import-Package>block prevents automatic import calculation by the Maven Bundle Plugin. Unlikecomponents/org.wso2.micro.integrator.ndatasource.common/pom.xml, this POM lacks a<DynamicImport-Package>fallback, which may lead toClassNotFoundExceptionat runtime.Consider one of the following:
<DynamicImport-Package>*</DynamicImport-Package>as a fallback (though this reduces build-time validation)🤖 Prompt for AI Agents