Skip to content

Commit

Permalink
Merge pull request #363 from ballerina-platform/u10
Browse files Browse the repository at this point in the history
Update dependencies due to Trivy failure
  • Loading branch information
aashikam authored Aug 24, 2024
2 parents db075be + d4976aa commit 02e32ae
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 39 deletions.
48 changes: 24 additions & 24 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,71 +31,71 @@ path = "./lib/opencsv-5.9.jar"
[[platform.java17.dependency]]
groupId = "org.cometd.java"
artifactId = "bayeux-api"
version = "4.0.4"
path = "./lib/bayeux-api-4.0.4.jar"
version = "4.0.9"
path = "./lib/bayeux-api-4.0.9.jar"

[[platform.java17.dependency]]
groupId = "org.cometd.java"
artifactId = "cometd-java-client"
version = "4.0.4"
path = "./lib/cometd-java-client-4.0.4.jar"
version = "4.0.9"
path = "./lib/cometd-java-client-4.0.9.jar"

[[platform.java17.dependency]]
groupId = "org.cometd.java"
artifactId = "cometd-java-common"
version = "4.0.4"
path = "./lib/cometd-java-common-4.0.4.jar"
version = "4.0.9"
path = "./lib/cometd-java-common-4.0.9.jar"

[[platform.java17.dependency]]
groupId = "org.eclipse.jetty"
artifactId = "jetty-client"
version = "9.4.18.v20190429"
path = "./lib/jetty-client-9.4.18.v20190429.jar"
version = "9.4.55.v20240627"
path = "./lib/jetty-client-9.4.55.v20240627.jar"

[[platform.java17.dependency]]
groupId = "org.eclipse.jetty"
artifactId = "jetty-http"
version = "9.4.18.v20190429"
path = "./lib/jetty-http-9.4.18.v20190429.jar"
version = "9.4.55.v20240627"
path = "./lib/jetty-http-9.4.55.v20240627.jar"

[[platform.java17.dependency]]
groupId = "org.eclipse.jetty"
artifactId = "jetty-io"
version = "9.4.18.v20190429"
path = "./lib/jetty-io-9.4.18.v20190429.jar"
version = "9.4.55.v20240627"
path = "./lib/jetty-io-9.4.55.v20240627.jar"

[[platform.java17.dependency]]
groupId = "org.eclipse.jetty"
artifactId = "jetty-util"
version = "9.4.18.v20190429"
path = "./lib/jetty-util-9.4.18.v20190429.jar"
version = "9.4.55.v20240627"
path = "./lib/jetty-util-9.4.55.v20240627.jar"

[[platform.java17.dependency]]
groupId = "org.eclipse.jetty"
artifactId = "jetty-util-ajax"
version = "9.4.18.v20190429"
path = "./lib/jetty-util-ajax-9.4.18.v20190429.jar"
version = "9.4.55.v20240627"
path = "./lib/jetty-util-ajax-9.4.55.v20240627.jar"

[[platform.java17.dependency]]
groupId = "org.json"
artifactId = "json"
version = "20210307"
path = "./lib/json-20210307.jar"
version = "20240303"
path = "./lib/json-20240303.jar"

[[platform.java17.dependency]]
groupId = "com.fasterxml.jackson.core"
artifactId = "jackson-databind"
version = "2.9.10.8"
path = "./lib/jackson-databind-2.9.10.8.jar"
version = "2.13.5"
path = "./lib/jackson-databind-2.13.5.jar"

[[platform.java17.dependency]]
groupId = "com.fasterxml.jackson.core"
artifactId = "jackson-annotations"
version = "2.9.10"
path = "./lib/jackson-annotations-2.9.10.jar"
version = "2.13.5"
path = "./lib/jackson-annotations-2.13.5.jar"

[[platform.java17.dependency]]
groupId = "com.fasterxml.jackson.core"
artifactId = "jackson-core"
version = "2.9.10"
path = "./lib/jackson-core-2.9.10.jar"
version = "2.13.5"
path = "./lib/jackson-core-2.13.5.jar"
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ ballerinaGradlePluginVersion=2.2.3

ballerinaLangVersion=2201.10.0

jacocoToolVersion=0.8.7
jacksonDatabindVersion=2.9.10.8
jacksonAnnotationsVersion=2.9.10
jacksonCoreVersion=2.9.10
cometdJavaClientVersion=4.0.4
jettyVersion=9.4.18.v20190429
gsonVersion=2.8.9
jsonVersion=20210307
slf4jVersion=1.7.32
jacocoToolVersion=0.8.8
jacksonDatabindVersion=2.13.5
jacksonAnnotationsVersion=2.13.5
jacksonCoreVersion=2.13.5
cometdJavaClientVersion=4.0.9
jettyVersion=9.4.55.v20240627
gsonVersion=2.10.1
jsonVersion=20240303
slf4jVersion=1.7.36
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package io.ballerinax.salesforce;

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Runtime;
import io.ballerina.runtime.api.creators.ErrorCreator;
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.api.values.BError;
Expand All @@ -45,7 +44,6 @@
public class ListenerUtil {
private static final ArrayList<BObject> services = new ArrayList<>();
private static final Map<BObject, DispatcherService> serviceDispatcherMap = new HashMap<>();
private static Runtime runtime;
private static EmpConnector connector;
private static TopicSubscription subscription;

Expand All @@ -56,7 +54,7 @@ public static void initListener(BObject listener, int replayFrom, boolean isSand
listener.addNativeData(IS_SAND_BOX, isSandBox);
}

public static Object attachService(BObject listener, BObject service, Object channelName) {
public static Object attachService(Environment environment, BObject listener, BObject service, Object channelName) {
listener.addNativeData(CHANNEL_NAME, ((BString) channelName).getValue());

@SuppressWarnings("unchecked")
Expand All @@ -69,14 +67,14 @@ public static Object attachService(BObject listener, BObject service, Object cha
return null;
}

DispatcherService dispatcherService = new DispatcherService(service, runtime);
DispatcherService dispatcherService = new DispatcherService(service, environment.getRuntime());
services.add(service);
serviceDispatcherMap.put(service, dispatcherService);

return null;
}

public static Object startListener(Environment environment, BString username, BString password, BObject listener) {
public static Object startListener(BString username, BString password, BObject listener) {
BearerTokenProvider tokenProvider = new BearerTokenProvider(() -> {
try {
return LoginHelper.login(username.getValue(), password.getValue(), listener);
Expand All @@ -96,7 +94,6 @@ public static Object startListener(Environment environment, BString username, BS
} catch (Exception e) {
return sfdcError(e.getMessage());
}
runtime = environment.getRuntime();
@SuppressWarnings("unchecked")
ArrayList<BObject> services = (ArrayList<BObject>) listener.getNativeData(CONSUMER_SERVICES);
@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 02e32ae

Please sign in to comment.