apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Golovko <ser...@datatorrent.com>
Subject Questions about the method JarHelper.getJar()
Date Mon, 10 Jul 2017 05:37:19 GMT
Hello All,

I have a couple of questions about the usage of the
method JarHelper.getJar().

1. The implementation of the method JarHelper.getJar() takes a Java class
as a parameter and tries to find the jar file that contains the Java class.
If the class does not belong to a jar-file, it  implicitly creates a
jar-file from the folder that contains the class.

I'm not sure the name of the method is correct, because the implementation
of the method combines the getting of a jar file and creation of a jar
file. It can be confusion for developers who try to use the method or read
the source code that calls the method.

Also the implementation of the method JarHelper.getJar() excludes the usage
of the method if somebody needs to get a jar-file by Java class without
creation of the jar implicitly.

I'd suggest to split the implementation of the method on the two
independent methods getJar() and createJar().

2. The method StramClient.findJars() is only the method in the Apex code
(excluding JUnit tests) that calls the method JarHelper.getJar() in order
to include the jar files that contain all dag Java classes. Are there any
independent Java classes in a dag (the classes that don't belong to any
jar-files)? Do we really need to create jar-files in run-time?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message