Fixed opening file and not closing it.
This led to impossibility to delete file during incremental compilation.
This commit is contained in:
+1
-1
@@ -79,7 +79,7 @@ public class AnonymousObjectTransformer {
|
||||
if (file == null) {
|
||||
throw new RuntimeException("Couldn't find virtual file for " + objectInternalName);
|
||||
}
|
||||
reader = new ClassReader(file.getInputStream());
|
||||
reader = new ClassReader(file.contentsToByteArray());
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
@@ -154,7 +154,7 @@ public class InlineCodegen implements CallGenerator {
|
||||
MethodNode node;
|
||||
if (functionDescriptor instanceof DeserializedSimpleFunctionDescriptor) {
|
||||
VirtualFile file = InlineCodegenUtil.getVirtualFileForCallable((DeserializedSimpleFunctionDescriptor) functionDescriptor, state);
|
||||
node = InlineCodegenUtil.getMethodNode(file.getInputStream(), asmMethod.getName(), asmMethod.getDescriptor());
|
||||
node = InlineCodegenUtil.getMethodNode(file.contentsToByteArray(), asmMethod.getName(), asmMethod.getDescriptor());
|
||||
|
||||
if (node == null) {
|
||||
throw new RuntimeException("Couldn't obtain compiled function body for " + descriptorName(functionDescriptor));
|
||||
|
||||
@@ -75,7 +75,7 @@ public class InlineCodegenUtil {
|
||||
|
||||
@Nullable
|
||||
public static MethodNode getMethodNode(
|
||||
InputStream classData,
|
||||
byte[] classData,
|
||||
final String methodName,
|
||||
final String methodDescriptor
|
||||
) throws ClassNotFoundException, IOException {
|
||||
|
||||
Reference in New Issue
Block a user