Skip to content

Commit

Permalink
Merge branch 'wso2:master' into Revision-Deployment-failed-with-the-E…
Browse files Browse the repository at this point in the history
…RROR
  • Loading branch information
thisaltennakoon authored Mar 20, 2024
2 parents 1daf8dc + d93d854 commit 5e5d03e
Show file tree
Hide file tree
Showing 42 changed files with 160 additions and 132 deletions.
2 changes: 1 addition & 1 deletion modules/commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,24 +321,27 @@ public JsonElement evaluateJson(MessageContext synCtx, SynapseLog synLog,
case EnrichMediator.INLINE: {
assert inlineOMNode != null
|| inlineKey != null : "inlineJSONNode or key shouldn't be null when type is INLINE";
if (inlineOMNode instanceof OMText) {
object = JsonPath.parse(((OMTextImpl) inlineOMNode).getText()).json();
} else if (inlineKey != null && !inlineKey.trim().equals("")) {
Object inlineObj = synCtx.getEntry(inlineKey);
if ((inlineObj instanceof String) && !(((String) inlineObj).trim().equals(""))) {
object = JsonPath.parse(((String) inlineObj)).json();
try {
if (inlineOMNode instanceof OMText) {
object = JsonPath.parse(((OMTextImpl) inlineOMNode).getText()).json();
} else if (inlineKey != null && !inlineKey.trim().equals("")) {
Object inlineObj = synCtx.getEntry(inlineKey);
if ((inlineObj instanceof String) && !(((String) inlineObj).trim().equals(""))) {
object = JsonPath.parse(((String) inlineObj)).json();
} else {
synLog.error("Source failed to get inline JSON" + "inlineKey=" + inlineKey);
}
} else {
synLog.error("Source failed to get inline JSON" + "inlineKey=" + inlineKey);
synLog.error("Source failed to get inline JSON" + "inlineJSONNode=" + inlineOMNode + ", inlineKey="
+ inlineKey);
}
} finally {
// If the initialInlineOMNode is not null, it means that inline OM Node has been overridden with the
// inline string containing resolved dynamic values. Therefore, we should set the initial OM Node back
// which contains the original inline value
if (initialInlineOMNode != null) {
this.inlineOMNode = initialInlineOMNode;
}
} else {
synLog.error("Source failed to get inline JSON" + "inlineJSONNode=" + inlineOMNode + ", inlineKey="
+ inlineKey);
}
// If the initialInlineOMNode is not null, it means that inline OM Node has been overridden with the
// inline string containing resolved dynamic values. Therefore, we should set the initial OM Node back
// which contains the original inline value
if (initialInlineOMNode != null) {
this.inlineOMNode = initialInlineOMNode;
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void destroy(boolean removeTask) {
}
if (synapseTaskManager.isInitialized()) {
TaskScheduler taskScheduler = synapseTaskManager.getTaskScheduler();
if (taskScheduler != null && taskScheduler.isInitialized() && removeTask) {
if (taskScheduler != null && taskScheduler.isTaskSchedulerInitialized() && removeTask) {
taskScheduler.deleteTask(taskDescription.getName(), taskDescription.getTaskGroup());
}
TaskDescriptionRepository repository = synapseTaskManager.getTaskDescriptionRepository();
Expand Down
2 changes: 1 addition & 1 deletion modules/coverage-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/experimental/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
1 change: 1 addition & 0 deletions modules/extensions/src/test/resources/synapse.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ limit_java_class_access_in_scripts.class_prefixes = java.util.ArrayList
limit_java_native_object_access_in_scripts.enable = true
limit_java_native_object_access_in_scripts.list_type = BLOCK_LIST
limit_java_native_object_access_in_scripts.object_names = getClassLoader,loadClass

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<parent>
<artifactId>synapse-features</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<groupId>org.apache.synapse</groupId>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<parent>
<artifactId>synapse-features</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<groupId>org.apache.synapse</groupId>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<parent>
<artifactId>synapse-features</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<groupId>org.apache.synapse</groupId>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<parent>
<artifactId>synapse-features</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<groupId>org.apache.synapse</groupId>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<parent>
<artifactId>synapse-features</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<groupId>org.apache.synapse</groupId>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>synapse-features</artifactId>
<groupId>org.apache.synapse</groupId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion modules/features/org.apache.synapse.wso2.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>synapse-features</artifactId>
<groupId>org.apache.synapse</groupId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion modules/features/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/migrator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/packaging/package-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>synapse-package-archetype</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/packaging/package-skeleton/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>synapse-package-skeleton</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/patches/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>synapse-patches</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/securevault/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.apache.synapse</groupId>
Expand Down
2 changes: 1 addition & 1 deletion modules/tasks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>Apache-Synapse</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ public boolean isInitialized() {
}
}

public boolean isTaskSchedulerInitialized() {
synchronized (lock) {
return initialized;
}
}

public void deleteTask(String name, String group) {
synchronized (lock) {
if (!initialized) {
Expand Down
2 changes: 1 addition & 1 deletion modules/transports/core/nhttp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.synapse</groupId>
<artifactId>synapse-transports</artifactId>
<version>4.0.0-wso2v96-SNAPSHOT</version>
<version>4.0.0-wso2v99-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ public interface TestConstants {

/**
* The certificates in the resources folder will contain the certificates in the certificate chain from
* https://www.github.com
* https://www.digicert.com
* These certificates are chosen because the certificate issuers support both CRL and OCSP. Read the certificates for
* more details.
*
* CAUTION: Replace the certificates if they expire or are marked as revoked by their issuers. At the moment they are
* valid. The expiry dates of the certificates are as follows:
*
* github.com : 3/15/2024
* DigiCertHighAssuranceEVCA-1 : 4/14/2031
* DigiCertHighAssuranceEVRootCA : 11/10/2031
* digicert.com : 31/07/2024
* DigiCertHighAssuranceEVCA-1 : 02/07/2030
* DigiCertHighAssuranceEVRootCA : 15/01/2038
*/
final static String REAL_PEER_CERT = "/org/apache/synapse/transport/certificatevalidation" +
"/certificates/github/github.com";
"/certificates/digicert/digicert.com";
final static String INTERMEDIATE_CERT = "/org/apache/synapse/transport/certificatevalidation" +
"/certificates/github/DigiCertHighAssuranceEVCA-1";
"/certificates/digicert/DigiCertHighAssuranceEVCA-1";
final static String ROOT_CERT = "/org/apache/synapse/transport/certificatevalidation" +
"/certificates/github/DigiCertHighAssuranceEVRootCA";
"/certificates/digicert/DigiCertHighAssuranceEVRootCA";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN CERTIFICATE-----
MIIFPDCCBCSgAwIBAgIQAWePH++IIlXYsKcOa3uyIDANBgkqhkiG9w0BAQsFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
MjAeFw0yMDA3MDIxMjQyNTBaFw0zMDA3MDIxMjQyNTBaMEQxCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxHjAcBgNVBAMTF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