Bumped Asciidoctor to 1.5.6.1 and removed setting TCCL again.
MODIFY
asciidoctorj-core/src/main/java/org/asciidoctor/internal/JRubyAsciidoctor.java
asciidoctorj-core/src/main/java/org/asciidoctor/internal/JRubyAsciidoctor.java
@@ -26,9 +26,17 @@ import org.jruby.embed.ScriptingContainer;
import org.jruby.exceptions.RaiseException;
import org.jruby.javasupport.JavaEmbedUtils;
-import java.io.*;
-import java.util.*;
-import java.util.logging.Level;
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.logging.Logger;
public class JRubyAsciidoctor implements Asciidoctor {
@@ -299,16 +307,13 @@ public class JRubyAsciidoctor implements Asciidoctor {
RubyHash rubyHash = RubyHashUtil.convertMapToRubyHashWithSymbols(rubyRuntime, options);
- ClassLoader oldTCCL = Thread.currentThread().getContextClassLoader();
try {
- Thread.currentThread().setContextClassLoader(rubyRuntime.getJRubyClassLoader());
Object object = this.asciidoctorModule.convert(content, rubyHash);
return returnExpectedValue(object);
} catch(RaiseException e) {
logger.severe(e.getException().getClass().getCanonicalName());
throw new AsciidoctorCoreException(e);
} finally {
- Thread.currentThread().setContextClassLoader(oldTCCL);
// we restore current directory to its original value.
rubyRuntime.setCurrentDirectory(currentDirectory);
}
@@ -332,16 +337,13 @@ public class JRubyAsciidoctor implements Asciidoctor {
RubyHash rubyHash = RubyHashUtil.convertMapToRubyHashWithSymbols(rubyRuntime, options);
- ClassLoader oldTCCL = Thread.currentThread().getContextClassLoader();
try {
- Thread.currentThread().setContextClassLoader(rubyRuntime.getJRubyClassLoader());
Object object = this.asciidoctorModule.convertFile(filename.getAbsolutePath(), rubyHash);
return returnExpectedValue(object);
} catch(RaiseException e) {
logger.severe(e.getMessage());
throw new AsciidoctorCoreException(e);
} finally {
- Thread.currentThread().setContextClassLoader(oldTCCL);
// we restore current directory to its original value.
rubyRuntime.setCurrentDirectory(currentDirectory);
}

MODIFY
asciidoctorj-diagram/gradle.properties
asciidoctorj-diagram/gradle.properties
properName=AsciidoctorJ Diagram
description=AsciidoctorJ Diagram bundles the Asciidoctor Diagram RubyGem (asciidoctor-diagram) so it can be loaded into the JVM using JRuby.
-version=1.5.5
+version=1.5.4
gem_name=asciidoctor-diagram

MODIFY
build.gradle
build.gradle
@@ -45,7 +45,7 @@ ext {
xmlMatchersVersion = '1.0-RC1'
// gem versions
- asciidoctorGemVersion = project.hasProperty('asciidoctorGemVersion') ? project.asciidoctorGemVersion : '1.5.6'
+ asciidoctorGemVersion = project.hasProperty('asciidoctorGemVersion') ? project.asciidoctorGemVersion : '1.5.6.1'
asciidoctorEpub3GemVersion = project(':asciidoctorj-epub3').version.replace('-', '.')
asciidoctorDiagramGemVersion = project(':asciidoctorj-diagram').version.replace('-', '.')

Bumped Asciidoctor to 1.5.6.1 and removed setting TCCL again.