stevedlawrence commented on code in PR #1707:
URL: https://github.com/apache/daffodil/pull/1707#discussion_r3832359100


##########
daffodil-core/src/main/scala/org/apache/daffodil/lib/schema/annotation/props/Properties.scala:
##########
@@ -120,18 +120,15 @@ trait EnumValue extends EnumValueBase {
   override lazy val toString = {
     val theVal = this
     val cn = getNameFromClass(this)
-    val en = cn match {
-      //
-      // Special case for CalendarFirstDayOfWeek
-      //
-      case "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | 
"Friday" | "Saturday" =>
-        cn
-      case _ => Misc.toInitialLowerCaseUnlessAllUpperCase(cn)
-    }
+    val en = Misc.toInitialLowerCaseUnlessAllUpperCase(cn)
     en
   }
 }
 
+trait EnumValueSimple extends EnumValueBase {

Review Comment:
   I don't love the name `Simple` since it doesn't really convey much. Thoughts 
on `EnumValueUpperCamel` with the understanding that `EnumValue` is the normal 
camel case for the vast majority of properties? No strong preference though if 
that feels too verbose/specific.



##########
daffodil-core/src/main/scala/org/apache/daffodil/lib/schema/annotation/props/Properties.scala:
##########
@@ -120,18 +120,15 @@ trait EnumValue extends EnumValueBase {
   override lazy val toString = {
     val theVal = this
     val cn = getNameFromClass(this)
-    val en = cn match {
-      //
-      // Special case for CalendarFirstDayOfWeek
-      //
-      case "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | 
"Friday" | "Saturday" =>
-        cn
-      case _ => Misc.toInitialLowerCaseUnlessAllUpperCase(cn)
-    }
+    val en = Misc.toInitialLowerCaseUnlessAllUpperCase(cn)
     en
   }
 }
 
+trait EnumValueSimple extends EnumValueBase {
+  override def toString = getNameFromClass(this)

Review Comment:
   Suggest we make this a `override lazy val` to match EnumValue.



##########
daffodil-core/src/main/scala/org/apache/daffodil/lib/schema/annotation/props/Properties.scala:
##########
@@ -120,18 +120,15 @@ trait EnumValue extends EnumValueBase {
   override lazy val toString = {

Review Comment:
   Note, there's a typo in bug number in the commit, it should be DAFFODIL-2983 
instead of 2963 



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