mbeckerle commented on code in PR #1090:
URL: https://github.com/apache/daffodil/pull/1090#discussion_r1345071970


##########
build.sbt:
##########
@@ -268,28 +272,30 @@ def buildScalacOptions(scalaVersion: String) = {
     case _ => Seq.empty
   }
 
-  val javaVersionSpecificOptions =
-    if (scala.util.Properties.isJavaAtLeast("9"))
-      Seq("-release", "8") // ensure Java backwards compatibility 
(DAFFODIL-2579)
-    else
-      Seq.empty
+  commonOptions ++ scalaVersionSpecificOptions

Review Comment:
   Added per comment. 
   
   But... It's a bit trickier. Scala 2.12 can't specify a release other than 8. 
So we can't just default to specifying java 11 class files when we are using 
Java 21, because scala warns about that, and we're fatal warnings. 
   
   So I did the minSupportedJavaVersion thing, but it's only used by java 
compilation for now. We have very small amounts of java code today, but those 
would complain about java 8, so those will use Java 11 classes IF the JVM is 
Java 21 only. Scala compilation does not specify any "-target" option. 
   
   



##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/xml/XMLUtils.scala:
##########
@@ -850,6 +886,14 @@ Differences were (path, expected, actual):
     arrayCounters
   }
 
+  private def getXSIType(a: Elem) = {
+    val res = a.attribute(XSI_NAMESPACE.toString, 
"type").map(_.head.text).orElse {
+      val a2 = a.attributes.asAttrMap.get("xsi:type")

Review Comment:
   Removed. Requires an xmlns:xsi definition now. 



##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/xml/XMLUtils.scala:
##########
@@ -1113,6 +1189,29 @@ Differences were (path, expected, actual):
         val b = DFDLDateTimeConversion.fromXMLString(dataB)
         a == b
       }
+      case Some("xs:double") => {
+        val a = strToDouble(dataA)
+        val b = strToDouble(dataB)

Review Comment:
   Same resolution. NodeInfo.Double.fromString calls this. 



##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/util/Misc.scala:
##########
@@ -103,38 +102,99 @@ object Misc {
     // more time is wasted by people forgetting that the initial "/" is needed
     // to get classpath relative behavior... Let's make sure there is a 
leading "/"
     val resPath = if (resourcePath.startsWith("/")) resourcePath else "/" + 
resourcePath
-    val res = this.getClass().getResource(resPath)
-    if (res == null) {
-      (None, resPath)
-    } else (Some(res.toURI), resPath)
+    val res = Option(this.getClass().getResource(resPath))
+    (res.map.(_.toURI), resPath)

Review Comment:
   Fixed. 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to