@@ -6,14 +6,6 @@ import java.util.stream.Stream as JStream
66import scala .collection .JavaConverters .*
77
88object IdempotencyCheck {
9- val blacklisted = Set (
10- // No fix needed. Bridges on collections in different order. Second one in scala2 order.
11- s " pos{JFile.separator}Map{JFile.separator}scala{JFile.separator}collection{JFile.separator}immutable/Map " ,
12- s " pos{JFile.separator}Map{JFile.separator}scala{JFile.separator}collection{JFile.separator}immutable{JFile.separator}AbstractMap " ,
13- s " pos{JFile.separator}t1203a/NodeSeq " ,
14- s " pos{JFile.separator}i2345{JFile.separator}Whatever "
15- )
16-
179 def checkIdempotency (dir1 : String , dir2 : String ): Unit = {
1810 var failed = 0
1911 var total = 0
@@ -26,14 +18,14 @@ object IdempotencyCheck {
2618 val bytecodeFiles = {
2719 def bytecodeFiles (paths : JStream [JPath ], dir : String ): List [(String , JPath )] = {
2820 def isBytecode (file : String ) = file.endsWith(" .class" ) || file.endsWith(" .tasty" )
29- def tupleWithName (f : JPath ) = (f.toString.substring(dir.length + 1 , f.toString.length - 6 ), f)
21+ def tupleWithName (f : JPath ) = (f.toString.substring(dir.length, f.toString.length - 6 ), f)
3022 paths.iterator.asScala.filter(path => isBytecode(path.toString)).map(tupleWithName).toList
3123 }
3224 bytecodeFiles(JFiles .walk(dir1Path), dir1String) ++ bytecodeFiles(JFiles .walk(dir2Path), dir2String)
3325 }
3426 val groups = bytecodeFiles.groupBy(_._1).mapValues(_.map(_._2))
3527
36- groups.filterNot(x => blacklisted(x._1)). iterator.flatMap { g =>
28+ groups.iterator.flatMap { g =>
3729 def pred (f : JPath , dir : String , isTasty : Boolean ) =
3830 f.toString.contains(dir) && f.toString.endsWith(if (isTasty) " .tasty" else " .class" )
3931 val class1 = g._2.find(f => pred(f, dir1String, isTasty = false ))
0 commit comments