Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Jun 26, 2024
1 parent 4ede415 commit 83afbb2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ object ClassFileManager {
deleteImpl(classes0.toVector.map(toPath(_).toFile))
private def deleteImpl(classes: Vector[File]): Unit = {
val relClasses =
allFiles(classes).map(c => JarUtils.ClassInJar.fromFile(c).toClassFilePath.get)
allFiles(classes).flatMap(c => JarUtils.ClassInJar.fromFile(c).toClassFilePath)
outputJarContent.removeClasses(relClasses.toSet)
JarUtils.removeFromJar(outputJar, relClasses)
}
Expand Down Expand Up @@ -297,14 +297,14 @@ object ClassFileManager {
val classPaths = classes.toVector.map(_.toPath)
val filesInJar =
allPaths(classPaths)
.map(c => JarUtils.ClassInJar.fromPath(c).toClassFilePath.get)
.flatMap(c => JarUtils.ClassInJar.fromPath(c).toClassFilePath)
JarUtils.removeFromJar(outputJar, filesInJar)
outputJarContent.removeClasses(filesInJar.toSet)
}
override def delete(classes: Array[VirtualFile]): Unit = {
val classPaths = classes.toVector.map(toPath)
val filesInJar =
allPaths(classPaths).map(c => JarUtils.ClassInJar.fromPath(c).toClassFilePath.get)
allPaths(classPaths).flatMap(c => JarUtils.ClassInJar.fromPath(c).toClassFilePath)
JarUtils.removeFromJar(outputJar, filesInJar)
outputJarContent.removeClasses(filesInJar.toSet)
}
Expand Down

0 comments on commit 83afbb2

Please sign in to comment.