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:08 UTC
[groovy] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 73b669a FastStringServiceFactory use single arg ServiceLoader.load (closes #1217)
73b669a is described below
commit 73b669abfc65de7994eb24b64598bb2d55cfb8c9
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();