diff --git a/RCaller/build.gradle b/RCaller/build.gradle index a8491ba..149c140 100644 --- a/RCaller/build.gradle +++ b/RCaller/build.gradle @@ -11,16 +11,29 @@ group = 'com.github.jbytecode' version = '4.0.2' description = 'RCaller is a software library which simplifies performing data analysis and statistical calculations in Java using R. The details are hidden from users including transferring data between platforms, function calls, and retrieving results.' +java.sourceCompatibility = JavaVersion.VERSION_11 + dependencies { - implementation 'org.apache.commons:commons-lang3:3.12.0' - compileOnly 'org.apache.arrow:arrow-vector:[5.0.0,)' + implementation 'org.apache.commons:commons-lang3:3.20.0' + + compileOnly 'org.apache.arrow:arrow-vector:[19.0.0,20.0.0)' testImplementation 'junit:junit:4.13.2' - testImplementation 'org.apache.arrow:arrow-vector:[5.0.0,)' - testImplementation 'org.apache.arrow:arrow-memory-netty:[5.0.0,)' + + testImplementation 'org.apache.arrow:arrow-vector:[19.0.0,)' + testImplementation 'org.apache.arrow:arrow-memory-netty:[19.0.0,)' + testImplementation 'org.apache.arrow:arrow-memory-unsafe:[19.0.0,)' } -java.sourceCompatibility = JavaVersion.VERSION_11 +test { + jvmArgs '-Dio.netty.tryReflectionSetAccessible=true', + '-Dio.netty.noUnsafe=true', + // Force Apache Arrow to use standard Java APIs instead of Netty + '-Darrow.memory.allocation.manager.factory=org.apache.arrow.memory.unsafe.UnsafeAllocationManagerFactory', + // Correct the module open target syntax for standard classpaths + '--add-opens=java.base/java.nio=ALL-UNNAMED', + '--add-opens=java.base/sun.nio.ch=ALL-UNNAMED' +} java { withSourcesJar() diff --git a/RCaller/gradle/wrapper/gradle-wrapper.properties b/RCaller/gradle/wrapper/gradle-wrapper.properties index ffed3a2..b413873 100644 --- a/RCaller/gradle/wrapper/gradle-wrapper.properties +++ b/RCaller/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/RCaller/src/main/java/com/github/rcaller/rstuff/ROutputParser.java b/RCaller/src/main/java/com/github/rcaller/rstuff/ROutputParser.java index ec186cb..4a285bf 100644 --- a/RCaller/src/main/java/com/github/rcaller/rstuff/ROutputParser.java +++ b/RCaller/src/main/java/com/github/rcaller/rstuff/ROutputParser.java @@ -5,6 +5,7 @@ import com.github.rcaller.io.ArrowBridge; import com.github.rcaller.io.ROutputParserArrow; import com.github.rcaller.io.ROutputParserXML; +import org.apache.commons.lang3.NotImplementedException; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import java.io.*; @@ -46,7 +47,7 @@ static ROutputParser create(RCallerOptions rCallerOptions) { * Returns parsed XML document. * @deprecated Do not use if you are not using XML consciously * @return parsed XML document - * @throw NotImplementedException if Arrow implementation is used + * @throws NotImplementedException if Arrow implementation is used */ @Deprecated Document getDocument(); @@ -54,7 +55,7 @@ static ROutputParser create(RCallerOptions rCallerOptions) { /** * Inits parsed XML document. * @deprecated Do not use if you are not using XML consciously - * @throw NotImplementedException if Arrow implementation is used + * @throws NotImplementedException if Arrow implementation is used */ @Deprecated void setDocument(Document document); @@ -63,7 +64,7 @@ static ROutputParser create(RCallerOptions rCallerOptions) { * Returns XML file. * @deprecated Do not use if you are not using XML consciously. Can be replaced with {@link #getIPCResource} * @return XML file - * @throw NotImplementedException if Arrow implementation is used + * @throws NotImplementedException if Arrow implementation is used */ @Deprecated File getXMLFile(); @@ -74,7 +75,7 @@ static ROutputParser create(RCallerOptions rCallerOptions) { * Returns raw XML document. * @deprecated Do not use if you are not using XML consciously * @return raw XML document - * @throw NotImplementedException if Arrow implementation is used + * @throws NotImplementedException if Arrow implementation is used */ @Deprecated String getXMLFileAsString() throws IOException; @@ -82,7 +83,7 @@ static ROutputParser create(RCallerOptions rCallerOptions) { /** * Inits XML file. * @deprecated Do not use if you are not using XML consciously. Can be replaced with {@link #setIPCResource} - * @throw NotImplementedException if Arrow implementation is used + * @throws NotImplementedException if Arrow implementation is used */ @Deprecated void setXMLFile(File xmlFile); @@ -101,7 +102,7 @@ static ROutputParser create(RCallerOptions rCallerOptions) { * Returns nodes from parsed XML document. * @deprecated Do not use if you are not using XML consciously * @return nodes from parsed XML document - * @throw NotImplementedException if Arrow implementation is used + * @throws NotImplementedException if Arrow implementation is used */ @Deprecated NodeList getValueNodes(String name);