Skip to content
Snippets Groups Projects
Commit add898ba authored by felmer's avatar felmer
Browse files

New constructor introduce for JythonEvaluatorSpringComponent in order to make...

New constructor introduce for JythonEvaluatorSpringComponent in order to make it usable in unit tests.

SVN: 37522
parent 436cfca2
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@
package ch.systemsx.cisd.common.jython.evaluator;
import java.util.Properties;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.BeanInitializationException;
......@@ -31,6 +33,7 @@ import ch.systemsx.cisd.common.spring.ExposablePropertyPlaceholderConfigurer;
*/
public class JythonEvaluatorSpringComponent
{
public static final String JYTHON_VERSION_KEY = "jython-version";
@Private
final static Logger operationLog = LogFactory.getLogger(LogCategory.OPERATION,
......@@ -38,7 +41,12 @@ public class JythonEvaluatorSpringComponent
public JythonEvaluatorSpringComponent(ExposablePropertyPlaceholderConfigurer propertyConfigurer)
{
String jythonVersion = propertyConfigurer.getResolvedProps().getProperty("jython-version");
this(propertyConfigurer.getResolvedProps());
}
public JythonEvaluatorSpringComponent(Properties resolvedProps)
{
String jythonVersion = resolvedProps.getProperty(JYTHON_VERSION_KEY);
if ("2.7".equals(jythonVersion))
{
Evaluator.setFactory(createJython27EvaluatorFactory());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment