Skip to content

Commit ba5fe65

Browse files
Formatting fixed
1 parent 359730a commit ba5fe65

2 files changed

Lines changed: 31 additions & 27 deletions

File tree

debugger/src/main/scala-2/org.apache.daffodil.debugger.dap/Support.scala

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ import cats.syntax.all._
3333
object Support {
3434
/* Daffodil DataProcessor wrapper methods */
3535
def dataProcessorWithDebugger(
36-
p: DataProcessor,
37-
debugger: org.apache.daffodil.runtime1.debugger.Debugger,
38-
variables: Map[String, String]
39-
): IO[DataProcessor] = {
40-
val base = p.withDebugger(debugger).withDebugging(true)
36+
p: DataProcessor,
37+
debugger: org.apache.daffodil.runtime1.debugger.Debugger,
38+
variables: Map[String, String]
39+
): IO[DataProcessor] = {
40+
val base = p.withDebugger(debugger).withDebugging(true)
4141

42-
variables.toList
43-
.foldLeftM(base) { case (dp, (k, v)) =>
44-
IO(dp.withExternalVariables(Map(k -> v))).handleErrorWith {
45-
case e: ExternalVariableException =>
46-
IO.println(s"[WARNING] Skipping unknown external variable '$k': ${e.getMessage}") *>
47-
IO.pure(dp)
48-
case e => IO.raiseError(e)
42+
variables.toList
43+
.foldLeftM(base) { case (dp, (k, v)) =>
44+
IO(dp.withExternalVariables(Map(k -> v))).handleErrorWith {
45+
case e: ExternalVariableException =>
46+
IO.println(s"[WARNING] Skipping unknown external variable '$k': ${e.getMessage}") *>
47+
IO.pure(dp)
48+
case e => IO.raiseError(e)
49+
}
4950
}
50-
}
51-
.map(_.withValidationMode(ValidationMode.Limited))
52-
}
51+
.map(_.withValidationMode(ValidationMode.Limited))
52+
}
5353

5454
/* Daffodil infoset wrapper methods */
5555
def getInputSourceDataInputStream(data: InputStream): InputSourceDataInputStream = new InputSourceDataInputStream(

debugger/src/main/scala-3/org.apache.daffodil.debugger.dap/Support.scala

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,24 @@ import org.apache.daffodil.api.exceptions.ExternalVariableException
3232

3333
object Support {
3434
/* Daffodil DataProcessor wrapper methods */
35-
def dataProcessorWithDebugger(p: DataProcessor, debugger: Debugger, variables: Map[String, String]): IO[DataProcessor] = {
36-
val base = p.withDebugger(debugger)
35+
def dataProcessorWithDebugger(
36+
p: DataProcessor,
37+
debugger: Debugger,
38+
variables: Map[String, String]
39+
): IO[DataProcessor] = {
40+
val base = p.withDebugger(debugger)
3741

38-
variables.toList
39-
.foldLeftM(base) { case (dp, (k, v)) =>
40-
IO(dp.withExternalVariables(Map(k -> v).asJava)).handleErrorWith {
41-
case e: ExternalVariableException =>
42-
IO.println(s"[WARNING] Skipping unknown external variable '$k': ${e.getMessage}") *>
43-
IO.pure(dp)
44-
case e => IO.raiseError(e)
42+
variables.toList
43+
.foldLeftM(base) { case (dp, (k, v)) =>
44+
IO(dp.withExternalVariables(Map(k -> v).asJava)).handleErrorWith {
45+
case e: ExternalVariableException =>
46+
IO.println(s"[WARNING] Skipping unknown external variable '$k': ${e.getMessage}") *>
47+
IO.pure(dp)
48+
case e => IO.raiseError(e)
49+
}
4550
}
46-
}
47-
.map(_.withValidation("daffodil"))
48-
}
51+
.map(_.withValidation("daffodil"))
52+
}
4953

5054
/* Daffodil ProcessorFactory wrapper methods */
5155
def getProcessorFactory(

0 commit comments

Comments
 (0)