Skip to content

Commit 5b379a4

Browse files
committed
removed jython usage
1 parent 5c90c68 commit 5b379a4

3 files changed

Lines changed: 5 additions & 322 deletions

File tree

pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
5151
<scope>test</scope>
5252
</dependency>
5353

54-
<dependency>
55-
<groupId>org.python</groupId>
56-
<artifactId>jython</artifactId>
57-
<version>2.7.0</version>
58-
<!-- disabled (too large ~ 30Mb) -->
59-
<scope>provided</scope>
60-
</dependency>
61-
6254
<dependency>
6355
<groupId>org.gnu.jel</groupId>
6456
<artifactId>JEL</artifactId>

src/main/java/fr/jmmc/oitools/model/ExpressionEvaluator.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public abstract class ExpressionEvaluator {
3030

3131
/** logger */
3232
private final static Logger _logger = Logger.getLogger(ExpressionEvaluator.class.getName());
33-
/** flag enabling Jython 2.7 support (false by default as this library is too heavy) */
34-
private final static boolean ENABLE_JYTHON_SUPPORT = false;
3533

3634
/** Factory instance */
3735
private static ExpressionEvaluator instance = null;
@@ -46,29 +44,15 @@ public final static ExpressionEvaluator getInstance() {
4644
if (instance == null) {
4745
// create an ExpressionEvaluator instance:
4846
ExpressionEvaluator eval = null;
49-
if (ENABLE_JYTHON_SUPPORT) {
50-
try {
51-
_logger.fine("new JythonEval");
52-
eval = new JythonEval();
53-
} catch (NoClassDefFoundError cnfe) {
54-
_logger.info("JythonEval can not load Jython library.");
55-
} catch (Throwable th) {
56-
_logger.log(Level.SEVERE, "JythonEval creation failure:", th);
57-
}
47+
try {
48+
_logger.fine("new JELEval");
49+
eval = new JELEval();
50+
} catch (Throwable th) {
51+
_logger.log(Level.SEVERE, "JELEval creation failure:", th);
5852
}
59-
if (eval == null) {
60-
try {
61-
_logger.fine("new JELEval");
62-
eval = new JELEval();
63-
} catch (Throwable th) {
64-
_logger.log(Level.SEVERE, "JELEval creation failure:", th);
65-
}
66-
}
67-
6853
if (eval == null) {
6954
throw new IllegalStateException("unable to create an ExpressionEvaluator !");
7055
}
71-
7256
instance = eval;
7357
}
7458
return instance;

src/main/java/fr/jmmc/oitools/model/JythonEval.java

Lines changed: 0 additions & 293 deletions
This file was deleted.

0 commit comments

Comments
 (0)