You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/06/08 11:13:53 UTC
[groovy] branch GROOVY_3_0_X updated: FastStringServiceFactory use
single arg ServiceLoader.load (closes #1217)
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new badc6fd FastStringServiceFactory use single arg ServiceLoader.load (closes #1217)
badc6fd is described below
commit badc6fd7f1de597b5f8a8bb130f65eb9682919d9
Author: Brad Beck <br...@gmail.com>
AuthorDate: Mon Apr 6 07:49:19 2020 -0500
FastStringServiceFactory use single arg ServiceLoader.load (closes #1217)
---
.../src/main/java/org/apache/groovy/json/internal/FastStringUtils.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/FastStringUtils.java b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/FastStringUtils.java
index a8c5dc6..4bf9ef4 100644
--- a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/FastStringUtils.java
+++ b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/FastStringUtils.java
@@ -33,11 +33,10 @@ public class FastStringUtils {
static final FastStringService INSTANCE = loadService();
private static FastStringService loadService() {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
// left classloading very simple in light of potential changes needed for jdk9
// that means you might need @GrabConfig(systemClassLoader=true) if getting json via grab
// ClassLoader rootLoader = DefaultGroovyMethods.getRootLoader(loader);
- ServiceLoader<FastStringServiceFactory> serviceLoader = ServiceLoader.load(FastStringServiceFactory.class, loader);
+ ServiceLoader<FastStringServiceFactory> serviceLoader = ServiceLoader.load(FastStringServiceFactory.class);
FastStringService found = null;
for (FastStringServiceFactory factory : serviceLoader) {
FastStringService service = factory.getService();