diff --git a/avrohugger-core/src/main/scala/input/parsers/FileInputParser.scala b/avrohugger-core/src/main/scala/input/parsers/FileInputParser.scala index fc1c8845..022290be 100644 --- a/avrohugger-core/src/main/scala/input/parsers/FileInputParser.scala +++ b/avrohugger-core/src/main/scala/input/parsers/FileInputParser.scala @@ -114,11 +114,11 @@ class FileInputParser { protocol: Protocol, importedSchemaOrProtocols: Set[Either[Schema, Protocol]]) = { val imported = importedSchemaOrProtocols.flatMap { - case Left(importedSchema) => Set(importedSchema) + case Left(importedSchema) => List(importedSchema) case Right(importedProtocol) => importedProtocol.getTypes().asScala } - val types = protocol.getTypes().asScala.toSet - val localTypes = types -- imported + val types = protocol.getTypes().asScala.toList + val localTypes = types.filterNot(imported.contains) protocol.setTypes(localTypes.asJava) protocol } diff --git a/avrohugger-core/src/test/scala/util/Util.scala b/avrohugger-core/src/test/scala/util/Util.scala index 8f627f6d..d6bc2903 100644 --- a/avrohugger-core/src/test/scala/util/Util.scala +++ b/avrohugger-core/src/test/scala/util/Util.scala @@ -37,7 +37,7 @@ object Util { val rightValue: String = right.value val rightAsList = if (rightValue.contains("\r\n")) rightValue.split("\r\n") else rightValue.split("\n") - val res = leftAsList === rightAsList + val res = leftAsList.mkString("\n") === rightAsList.mkString("\n") result(res.isSuccess, res.message, res.message, right) } } diff --git a/build.sbt b/build.sbt index 042ec042..21a27dd2 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val avroVersion = "1.11.4" lazy val commonSettings = Seq( organization := "com.julianpeeters", - version := "3.0-MJ", + version := "2.9.0", ThisBuild / versionScheme := Some("semver-spec"), scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature"), Test / scalacOptions ++= Seq("-Yrangepos"),