mbeckerle commented on a change in pull request #343: WIP: Daf 2302 ext var
URL: https://github.com/apache/incubator-daffodil/pull/343#discussion_r400192203
 
 

 ##########
 File path: daffodil-japi/src/main/scala/org/apache/daffodil/japi/Daffodil.scala
 ##########
 @@ -257,7 +264,7 @@ class Compiler private[japi] () {
    * @param tunables a map of key/value pairs, where the key is the tunable 
name and the value is the value to set it to
    */
   def setTunables(tunables: java.util.AbstractMap[String, String]): Unit = {
-    sCompiler.setTunables(tunables.asScala.toMap)
+    sCompiler = sCompiler.withTunables(tunables.asScala.toMap)
 
 Review comment:
   I have not yet gone so far as to modify sapi/japi, and the TDMLDFDLProcessor 
classes. These are one-indirection away from the actual compiler, PF, and 
DataProcessor objects. It's pretty easy to make them work properly with 
setters. 
   
   That said, yes I do think a side-effect free design point is better, as it 
eliminates broad classes of otherwise subtle bugs. I just didn't want to go 
that far in this patch. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to