@@ -6,14 +6,6 @@ import java.util.stream.Stream as JStream
6
6
import scala .collection .JavaConverters .*
7
7
8
8
object 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
-
17
9
def checkIdempotency (dir1 : String , dir2 : String ): Unit = {
18
10
var failed = 0
19
11
var total = 0
@@ -26,14 +18,14 @@ object IdempotencyCheck {
26
18
val bytecodeFiles = {
27
19
def bytecodeFiles (paths : JStream [JPath ], dir : String ): List [(String , JPath )] = {
28
20
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)
30
22
paths.iterator.asScala.filter(path => isBytecode(path.toString)).map(tupleWithName).toList
31
23
}
32
24
bytecodeFiles(JFiles .walk(dir1Path), dir1String) ++ bytecodeFiles(JFiles .walk(dir2Path), dir2String)
33
25
}
34
26
val groups = bytecodeFiles.groupBy(_._1).mapValues(_.map(_._2))
35
27
36
- groups.filterNot(x => blacklisted(x._1)). iterator.flatMap { g =>
28
+ groups.iterator.flatMap { g =>
37
29
def pred (f : JPath , dir : String , isTasty : Boolean ) =
38
30
f.toString.contains(dir) && f.toString.endsWith(if (isTasty) " .tasty" else " .class" )
39
31
val class1 = g._2.find(f => pred(f, dir1String, isTasty = false ))
0 commit comments