Synchronize access to AccessTransformSet$Class#getOrCreateClass

This commit is contained in:
Jason Penilla 2021-09-22 22:39:58 -07:00 committed by Jason
parent 3695c2ebaf
commit d7e97c0ae1

View file

@ -170,8 +170,9 @@ class AccessTransformerVisitor(
super.visitInnerClass(name, outerName, innerName, completedClassAt(name).get().apply(access))
}
private fun completedClassAt(className: String): AccessTransformSet.Class =
private fun completedClassAt(className: String): AccessTransformSet.Class = synchronized(at) {
at.getOrCreateClass(className).apply { complete(inheritanceProvider) }
}
}
private const val RESET_ACCESS: Int = (Opcodes.ACC_PUBLIC or Opcodes.ACC_PRIVATE or Opcodes.ACC_PROTECTED).inv()