You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by ol...@apache.org on 2021/04/29 15:59:31 UTC
[daffodil] branch master updated: Remove unused variable and
parameter
This is an automated email from the ASF dual-hosted git repository.
olabusayo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/daffodil.git
The following commit(s) were added to refs/heads/master by this push:
new 2426e7f Remove unused variable and parameter
2426e7f is described below
commit 2426e7f8527c289937506178a0e65da421d999ea
Author: olabusayoT <50...@users.noreply.github.com>
AuthorDate: Wed Apr 28 16:04:14 2021 -0400
Remove unused variable and parameter
- fixes introduced code smell
DAFFODIL-2457
---
daffodil-lib/src/main/scala/org/apache/daffodil/xml/XMLUtils.scala | 5 -----
.../processors/DaffodilParseOutputStreamContentHandler.scala | 6 ++----
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/daffodil-lib/src/main/scala/org/apache/daffodil/xml/XMLUtils.scala b/daffodil-lib/src/main/scala/org/apache/daffodil/xml/XMLUtils.scala
index 872daa2..8234f96 100644
--- a/daffodil-lib/src/main/scala/org/apache/daffodil/xml/XMLUtils.scala
+++ b/daffodil-lib/src/main/scala/org/apache/daffodil/xml/XMLUtils.scala
@@ -851,11 +851,6 @@ object XMLUtils {
checkPrefixes,
checkNamespaces)
if (diffs.length > 0) {
- val attributesProperty = if(checkPrefixes || checkNamespaces) {
- "attributes not ignored for diff"
- } else {
- "attributes ignored for diff"
- }
throw new XMLDifferenceException("""
Comparison failed.
Expected (attributes %s)
diff --git a/daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DaffodilParseOutputStreamContentHandler.scala b/daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DaffodilParseOutputStreamContentHandler.scala
index 0c71a5f..4e8e658 100644
--- a/daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DaffodilParseOutputStreamContentHandler.scala
+++ b/daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DaffodilParseOutputStreamContentHandler.scala
@@ -26,8 +26,6 @@ import org.apache.daffodil.exceptions.Assert
import org.apache.daffodil.util.Indentable
import org.apache.daffodil.util.MStackOf
import org.apache.daffodil.util.MStackOfBoolean
-import org.apache.daffodil.util.Maybe
-import org.apache.daffodil.util.Maybe.Nope
import org.apache.daffodil.xml.XMLUtils
import org.xml.sax.Attributes
import org.xml.sax.ContentHandler
@@ -192,7 +190,7 @@ class DaffodilParseOutputStreamContentHandler(out: OutputStream, pretty: Boolean
// handle start of tag
writer.write("<")
- outputTagName(uri, localName, qName, Some(atts))
+ outputTagName(uri, localName, qName)
// this contains only xmlns prefixes and are populated via the start/endPrefixMappings
// or Attributes via processAttributes()
@@ -216,7 +214,7 @@ class DaffodilParseOutputStreamContentHandler(out: OutputStream, pretty: Boolean
outputNewlineStack.push(false)
}
- private def outputTagName(uri: String, localName: String, qName: String, atts: Maybe[Attributes] = Nope): Unit = {
+ private def outputTagName(uri: String, localName: String, qName: String): Unit = {
val tagName = {
if (qName.nonEmpty) {
// namespacePrefixes == true, so qName is populated