public class org.graalvm.component.installer.commands.InstallerTest extends org.graalvm.component.installer.TestBase
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.graalvm.component.installer.commands.InstallerTest
super_class: org.graalvm.component.installer.TestBase
{
public org.junit.rules.ExpectedException exception;
descriptor: Lorg/junit/rules/ExpectedException;
flags: (0x0001) ACC_PUBLIC
RuntimeVisibleAnnotations:
org.junit.Rule()
protected org.graalvm.component.installer.jar.JarArchive componentJarFile;
descriptor: Lorg/graalvm/component/installer/jar/JarArchive;
flags: (0x0004) ACC_PROTECTED
public org.junit.rules.TemporaryFolder folder;
descriptor: Lorg/junit/rules/TemporaryFolder;
flags: (0x0001) ACC_PUBLIC
RuntimeVisibleAnnotations:
org.junit.Rule()
private java.nio.file.Path targetPath;
descriptor: Ljava/nio/file/Path;
flags: (0x0002) ACC_PRIVATE
private org.graalvm.component.installer.commands.MockStorage storage;
descriptor: Lorg/graalvm/component/installer/commands/MockStorage;
flags: (0x0002) ACC_PRIVATE
private org.graalvm.component.installer.model.ComponentRegistry registry;
descriptor: Lorg/graalvm/component/installer/model/ComponentRegistry;
flags: (0x0002) ACC_PRIVATE
private org.graalvm.component.installer.persist.ComponentPackageLoader loader;
descriptor: Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
flags: (0x0002) ACC_PRIVATE
private org.graalvm.component.installer.commands.Installer installer;
descriptor: Lorg/graalvm/component/installer/commands/Installer;
flags: (0x0002) ACC_PRIVATE
private org.graalvm.component.installer.model.ComponentInfo componentInfo;
descriptor: Lorg/graalvm/component/installer/model/ComponentInfo;
flags: (0x0002) ACC_PRIVATE
protected org.graalvm.component.installer.FileOperations fileOps;
descriptor: Lorg/graalvm/component/installer/FileOperations;
flags: (0x0004) ACC_PROTECTED
private static final java.lang.String BLOCKED_CONTENT;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "This is a blocked file"
private static final java.lang.String INSTALL_CONTENT;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Test content: ./jre/bin/ruby"
private void setupComponentInstall(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=9, locals=4, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.graalvm.component.installer.commands.InstallerTest.dataFile:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
astore 2
start local 2 1: new java.util.jar.JarFile
dup
aload 2
invokespecial java.util.jar.JarFile.<init>:(Ljava/io/File;)V
astore 3
start local 3 2: aload 0
new org.graalvm.component.installer.jar.JarMetaLoader
dup
aload 3
aload 0
invokespecial org.graalvm.component.installer.jar.JarMetaLoader.<init>:(Ljava/util/jar/JarFile;Lorg/graalvm/component/installer/Feedback;)V
putfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
3: aload 0
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.createComponentInfo:()Lorg/graalvm/component/installer/model/ComponentInfo;
putfield org.graalvm.component.installer.commands.InstallerTest.componentInfo:Lorg/graalvm/component/installer/model/ComponentInfo;
4: aload 0
new org.graalvm.component.installer.jar.JarArchive
dup
aload 3
invokespecial org.graalvm.component.installer.jar.JarArchive.<init>:(Ljava/util/jar/JarFile;)V
putfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPaths:()V
6: aload 0
new org.graalvm.component.installer.commands.Installer
dup
aload 0
invokevirtual org.graalvm.component.installer.commands.InstallerTest.fb:()Lorg/graalvm/component/installer/Feedback;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentInfo:Lorg/graalvm/component/installer/model/ComponentInfo;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
invokespecial org.graalvm.component.installer.commands.Installer.<init>:(Lorg/graalvm/component/installer/Feedback;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/model/ComponentInfo;Lorg/graalvm/component/installer/model/ComponentRegistry;Lorg/graalvm/component/installer/ComponentCollection;Lorg/graalvm/component/installer/Archive;)V
putfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.commands.Installer.setInstallPath:(Ljava/nio/file/Path;)V
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.getLicensePath:()Ljava/lang/String;
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonRelative:(Ljava/lang/String;)Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.commands.Installer.setLicenseRelativePath:(Ljava/nio/file/Path;)V
9: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
0 10 1 relativePath Ljava/lang/String;
1 10 2 f Ljava/io/File;
2 10 3 jf Ljava/util/jar/JarFile;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
relativePath
private org.graalvm.component.installer.Feedback fb();
descriptor: ()Lorg/graalvm/component/installer/Feedback;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.InstallerTest.withBundle:(Ljava/lang/Class;)Lorg/graalvm/component/installer/Feedback;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.graalvm.component.installer.TestBase.<init>:()V
1: aload 0
invokestatic org.junit.rules.ExpectedException.none:()Lorg/junit/rules/ExpectedException;
putfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
2: aload 0
new org.junit.rules.TemporaryFolder
dup
invokespecial org.junit.rules.TemporaryFolder.<init>:()V
putfield org.graalvm.component.installer.commands.InstallerTest.folder:Lorg/junit/rules/TemporaryFolder;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
public static void setUpClass();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=0, locals=0, args_size=0
0: return
LocalVariableTable:
Start End Slot Name Signature
RuntimeVisibleAnnotations:
org.junit.BeforeClass()
public static void tearDownClass();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=0, locals=0, args_size=0
0: return
LocalVariableTable:
Start End Slot Name Signature
RuntimeVisibleAnnotations:
org.junit.AfterClass()
public void setUp();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.folder:Lorg/junit/rules/TemporaryFolder;
ldc "inst"
invokevirtual org.junit.rules.TemporaryFolder.newFolder:(Ljava/lang/String;)Ljava/io/File;
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
putfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
1: aload 0
new org.graalvm.component.installer.commands.MockStorage
dup
invokespecial org.graalvm.component.installer.commands.MockStorage.<init>:()V
putfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
2: aload 0
new org.graalvm.component.installer.model.ComponentRegistry
dup
aload 0
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
invokespecial org.graalvm.component.installer.model.ComponentRegistry.<init>:(Lorg/graalvm/component/installer/Feedback;Lorg/graalvm/component/installer/model/ManagementStorage;)V
putfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
3: aload 0
invokestatic org.graalvm.component.installer.SystemUtils.isWindows:()Z
ifeq 4
new org.graalvm.component.installer.os.WindowsFileOperations
dup
invokespecial org.graalvm.component.installer.os.WindowsFileOperations.<init>:()V
goto 5
StackMap locals:
StackMap stack: org.graalvm.component.installer.commands.InstallerTest
4: new org.graalvm.component.installer.os.DefaultFileOperations
dup
invokespecial org.graalvm.component.installer.os.DefaultFileOperations.<init>:()V
StackMap locals: org.graalvm.component.installer.commands.InstallerTest
StackMap stack: org.graalvm.component.installer.commands.InstallerTest org.graalvm.component.installer.FileOperations
5: putfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 0
invokevirtual org.graalvm.component.installer.FileOperations.init:(Lorg/graalvm/component/installer/Feedback;)V
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.FileOperations.setRootPath:(Ljava/nio/file/Path;)V
8: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Before()
public void tearDown();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ifnull 2
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
invokevirtual org.graalvm.component.installer.jar.JarArchive.close:()V
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.After()
public void testFailRemoteComponentExisting();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: new org.graalvm.component.installer.model.ComponentInfo
dup
ldc "org.graalvm.ruby"
ldc "Fake ruby"
ldc "1.0"
invokespecial org.graalvm.component.installer.model.ComponentInfo.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
getfield org.graalvm.component.installer.commands.MockStorage.installed:Ljava/util/List;
aload 1
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Lorg/graalvm/component/installer/DependencyException$Conflict;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "VERIFY_ComponentExists"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setFailOnExisting:(Z)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 8 1 fakeInfo Lorg/graalvm/component/installer/model/ComponentInfo;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testFailOnExistingComponent();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: new org.graalvm.component.installer.model.ComponentInfo
dup
ldc "org.graalvm.ruby"
ldc "Fake ruby"
ldc "1.1"
invokespecial org.graalvm.component.installer.model.ComponentInfo.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
getfield org.graalvm.component.installer.commands.MockStorage.installed:Ljava/util/List;
aload 1
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Lorg/graalvm/component/installer/DependencyException$Conflict;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "VERIFY_ComponentExists"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setFailOnExisting:(Z)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 8 1 fakeInfo Lorg/graalvm/component/installer/model/ComponentInfo;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testDontFailOnComponentUpdate();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: new org.graalvm.component.installer.model.ComponentInfo
dup
ldc "org.graalvm.ruby"
ldc "Fake ruby"
ldc "0.99"
invokespecial org.graalvm.component.installer.model.ComponentInfo.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
getfield org.graalvm.component.installer.commands.MockStorage.installed:Ljava/util/List;
aload 1
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setFailOnExisting:(Z)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 6 1 fakeInfo Lorg/graalvm/component/installer/model/ComponentInfo;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testSkipExistingComponent();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: new org.graalvm.component.installer.model.ComponentInfo
dup
ldc "org.graalvm.ruby"
ldc "Fake ruby"
ldc "1.0"
invokespecial org.graalvm.component.installer.model.ComponentInfo.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
getfield org.graalvm.component.installer.commands.MockStorage.installed:Ljava/util/List;
aload 1
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_0
invokevirtual org.graalvm.component.installer.commands.Installer.setFailOnExisting:(Z)V
4: ldc "Must refuse installation"
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateAll:()Z
invokestatic org.junit.Assert.assertFalse:(Ljava/lang/String;Z)V
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 6 1 fakeInfo Lorg/graalvm/component/installer/model/ComponentInfo;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testAcceptComponentUpgrade();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: new org.graalvm.component.installer.model.ComponentInfo
dup
ldc "org.graalvm.ruby"
ldc "Fake ruby"
ldc "0.32"
invokespecial org.graalvm.component.installer.model.ComponentInfo.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
getfield org.graalvm.component.installer.commands.MockStorage.installed:Ljava/util/List;
aload 1
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_0
invokevirtual org.graalvm.component.installer.commands.Installer.setFailOnExisting:(Z)V
4: ldc "Must refuse installation"
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateAll:()Z
invokestatic org.junit.Assert.assertTrue:(Ljava/lang/String;Z)V
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 6 1 fakeInfo Lorg/graalvm/component/installer/model/ComponentInfo;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testUninstall();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.getComponentInfo:()Lorg/graalvm/component/installer/model/ComponentInfo;
astore 1
start local 1 5: new org.graalvm.component.installer.commands.Uninstaller
dup
aload 0
invokevirtual org.graalvm.component.installer.commands.InstallerTest.fb:()Lorg/graalvm/component/installer/Feedback;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
invokespecial org.graalvm.component.installer.commands.Uninstaller.<init>:(Lorg/graalvm/component/installer/Feedback;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/model/ComponentInfo;Lorg/graalvm/component/installer/model/ComponentRegistry;)V
astore 2
start local 2 6: aload 2
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.commands.Uninstaller.setInstallPath:(Ljava/nio/file/Path;)V
7: aload 2
invokevirtual org.graalvm.component.installer.commands.Uninstaller.uninstallContent:()V
8: ldc "All files should be removed after uninstall"
9: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokestatic java.nio.file.Files.list:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findAny:()Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
10: invokestatic org.junit.Assert.assertFalse:(Ljava/lang/String;Z)V
11: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
5 12 1 savedInfo Lorg/graalvm/component/installer/model/ComponentInfo;
6 12 2 uninstaller Lorg/graalvm/component/installer/commands/Uninstaller;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testUninstallFailsOnExtraFile();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=6, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.getComponentInfo:()Lorg/graalvm/component/installer/model/ComponentInfo;
astore 1
start local 1 5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 6: aload 2
ldc "doc/user"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 3
start local 3 7: aload 3
ldc "userFile.txt"
invokestatic org.graalvm.component.installer.SystemUtils.fileName:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 4
start local 4 8: aload 4
iconst_2
anewarray java.lang.String
dup
iconst_0
ldc "This file"
aastore
dup
iconst_1
ldc "Should vanish"
aastore
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.write:(Ljava/nio/file/Path;Ljava/lang/Iterable;[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;
pop
9: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Ljava/nio/file/DirectoryNotEmptyException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
10: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "jre/languages/ruby/doc/user"
ldc "/"
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.String.replace:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
11: new org.graalvm.component.installer.commands.Uninstaller
dup
aload 0
invokevirtual org.graalvm.component.installer.commands.InstallerTest.fb:()Lorg/graalvm/component/installer/Feedback;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
invokespecial org.graalvm.component.installer.commands.Uninstaller.<init>:(Lorg/graalvm/component/installer/Feedback;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/model/ComponentInfo;Lorg/graalvm/component/installer/model/ComponentRegistry;)V
astore 5
start local 5 12: aload 5
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.commands.Uninstaller.setInstallPath:(Ljava/nio/file/Path;)V
13: aload 5
invokevirtual org.graalvm.component.installer.commands.Uninstaller.uninstallContent:()V
14: ldc "Shouldn't be reached"
invokestatic org.junit.Assert.fail:(Ljava/lang/String;)V
15: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
5 16 1 savedInfo Lorg/graalvm/component/installer/model/ComponentInfo;
6 16 2 langPath Ljava/nio/file/Path;
7 16 3 roPath Ljava/nio/file/Path;
8 16 4 uf Ljava/nio/file/Path;
12 16 5 uninstaller Lorg/graalvm/component/installer/commands/Uninstaller;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testRecursiveDelete();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
4: new org.graalvm.component.installer.commands.PreRemoveProcess
dup
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 0
invokespecial org.graalvm.component.installer.commands.PreRemoveProcess.<init>:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/Feedback;)V
astore 1
start local 1 5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 6: aload 1
aload 2
invokevirtual org.graalvm.component.installer.commands.PreRemoveProcess.deleteContentsRecursively:(Ljava/nio/file/Path;)V
7: aload 2
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
8: ldc "All files should be removed by recursive delete"
9: aload 2
invokestatic java.nio.file.Files.list:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findAny:()Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
10: invokestatic org.junit.Assert.assertFalse:(Ljava/lang/String;Z)V
11: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
5 12 1 preRemove Lorg/graalvm/component/installer/commands/PreRemoveProcess;
6 12 2 langPath Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testRecursiveDeleteWithReadonlyFiles();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 7: aload 1
ldc "doc/legal"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 8: aload 2
ldc "r-xr-xr-x"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
9: new org.graalvm.component.installer.commands.PreRemoveProcess
dup
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 0
invokespecial org.graalvm.component.installer.commands.PreRemoveProcess.<init>:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/Feedback;)V
astore 3
start local 3 10: aload 3
aload 1
invokevirtual org.graalvm.component.installer.commands.PreRemoveProcess.deleteContentsRecursively:(Ljava/nio/file/Path;)V
11: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
12: ldc "All files should be removed by recursive delete"
13: aload 1
invokestatic java.nio.file.Files.list:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findAny:()Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
14: invokestatic org.junit.Assert.assertFalse:(Ljava/lang/String;Z)V
15: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
7 16 1 langPath Ljava/nio/file/Path;
8 16 2 roPath Ljava/nio/file/Path;
10 16 3 preRemove Lorg/graalvm/component/installer/commands/PreRemoveProcess;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testUninstallComponentWithROFiles();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=1
start local 0 0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "trufflerubyRO.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.getComponentInfo:()Lorg/graalvm/component/installer/model/ComponentInfo;
astore 1
start local 1 7: new org.graalvm.component.installer.commands.Uninstaller
dup
aload 0
invokevirtual org.graalvm.component.installer.commands.InstallerTest.fb:()Lorg/graalvm/component/installer/Feedback;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
invokespecial org.graalvm.component.installer.commands.Uninstaller.<init>:(Lorg/graalvm/component/installer/Feedback;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/model/ComponentInfo;Lorg/graalvm/component/installer/model/ComponentRegistry;)V
astore 2
start local 2 8: aload 2
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.commands.Uninstaller.setInstallPath:(Ljava/nio/file/Path;)V
9: aload 2
invokevirtual org.graalvm.component.installer.commands.Uninstaller.uninstallContent:()V
10: ldc "All files should be removed after uninstall"
11: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokestatic java.nio.file.Files.list:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findAny:()Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
12: invokestatic org.junit.Assert.assertFalse:(Ljava/lang/String;Z)V
13: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
7 14 1 savedInfo Lorg/graalvm/component/installer/model/ComponentInfo;
8 14 2 uninstaller Lorg/graalvm/component/installer/commands/Uninstaller;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testUninstallComponentWithUserROFiles();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=6, args_size=1
start local 0 0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "trufflerubyWork.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.getComponentInfo:()Lorg/graalvm/component/installer/model/ComponentInfo;
astore 1
start local 1 7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 8: aload 2
ldc "doc/user"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 3
start local 3 9: aload 3
ldc "userFile.txt"
invokestatic org.graalvm.component.installer.SystemUtils.fileName:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 4
start local 4 10: aload 4
iconst_2
anewarray java.lang.String
dup
iconst_0
ldc "This file"
aastore
dup
iconst_1
ldc "Should vanish"
aastore
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.write:(Ljava/nio/file/Path;Ljava/lang/Iterable;[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;
pop
11: aload 4
ldc "r--r-----"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
12: aload 3
ldc "r-xr-xr-x"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
13: new org.graalvm.component.installer.commands.Uninstaller
dup
aload 0
invokevirtual org.graalvm.component.installer.commands.InstallerTest.fb:()Lorg/graalvm/component/installer/Feedback;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
invokespecial org.graalvm.component.installer.commands.Uninstaller.<init>:(Lorg/graalvm/component/installer/Feedback;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/model/ComponentInfo;Lorg/graalvm/component/installer/model/ComponentRegistry;)V
astore 5
start local 5 14: aload 5
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.commands.Uninstaller.setInstallPath:(Ljava/nio/file/Path;)V
15: aload 5
invokevirtual org.graalvm.component.installer.commands.Uninstaller.uninstallContent:()V
16: ldc "All files should be removed after uninstall"
17: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokestatic java.nio.file.Files.list:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findAny:()Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
18: invokestatic org.junit.Assert.assertFalse:(Ljava/lang/String;Z)V
19: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
7 20 1 savedInfo Lorg/graalvm/component/installer/model/ComponentInfo;
8 20 2 langPath Ljava/nio/file/Path;
9 20 3 roPath Ljava/nio/file/Path;
10 20 4 uf Ljava/nio/file/Path;
14 20 5 uninstaller Lorg/graalvm/component/installer/commands/Uninstaller;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testSetIgnoreFailedDeletions();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=1
start local 0 0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.getComponentInfo:()Lorg/graalvm/component/installer/model/ComponentInfo;
astore 1
start local 1 7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages/ruby/doc/legal"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 8: aload 2
ldc "r--r--r--"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
9: new org.graalvm.component.installer.commands.Uninstaller
dup
aload 0
invokevirtual org.graalvm.component.installer.commands.InstallerTest.fb:()Lorg/graalvm/component/installer/Feedback;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
invokespecial org.graalvm.component.installer.commands.Uninstaller.<init>:(Lorg/graalvm/component/installer/Feedback;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/model/ComponentInfo;Lorg/graalvm/component/installer/model/ComponentRegistry;)V
astore 3
start local 3 10: aload 3
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.commands.Uninstaller.setInstallPath:(Ljava/nio/file/Path;)V
11: aload 3
iconst_1
invokevirtual org.graalvm.component.installer.commands.Uninstaller.setIgnoreFailedDeletions:(Z)V
12: aload 3
invokevirtual org.graalvm.component.installer.commands.Uninstaller.uninstall:()V
13: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
7 14 1 savedInfo Lorg/graalvm/component/installer/model/ComponentInfo;
8 14 2 p Ljava/nio/file/Path;
10 14 3 uninstaller Lorg/graalvm/component/installer/commands/Uninstaller;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testFailedDeletionAborts();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=1
start local 0 0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.getComponentInfo:()Lorg/graalvm/component/installer/model/ComponentInfo;
astore 1
start local 1 7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages/ruby/doc/legal"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 8: aload 2
ldc "r--r--r--"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
9: new org.graalvm.component.installer.commands.Uninstaller
dup
aload 0
invokevirtual org.graalvm.component.installer.commands.InstallerTest.fb:()Lorg/graalvm/component/installer/Feedback;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.registry:Lorg/graalvm/component/installer/model/ComponentRegistry;
invokespecial org.graalvm.component.installer.commands.Uninstaller.<init>:(Lorg/graalvm/component/installer/Feedback;Lorg/graalvm/component/installer/FileOperations;Lorg/graalvm/component/installer/model/ComponentInfo;Lorg/graalvm/component/installer/model/ComponentRegistry;)V
astore 3
start local 3 10: aload 3
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.commands.Uninstaller.setInstallPath:(Ljava/nio/file/Path;)V
11: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Ljava/io/IOException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
12: aload 3
invokevirtual org.graalvm.component.installer.commands.Uninstaller.uninstall:()V
13: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
7 14 1 savedInfo Lorg/graalvm/component/installer/model/ComponentInfo;
8 14 2 p Ljava/nio/file/Path;
10 14 3 uninstaller Lorg/graalvm/component/installer/commands/Uninstaller;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testValidateRequirementsSuccess();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testValidateRequirementsGraalVersion();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.getComponentInfo:()Lorg/graalvm/component/installer/model/ComponentInfo;
ldc "graalvm_version"
ldc "0.33"
invokevirtual org.graalvm.component.installer.model.ComponentInfo.addRequiredValue:(Ljava/lang/String;Ljava/lang/String;)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Lorg/graalvm/component/installer/DependencyException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "VERIFY_UpdateGraalVM"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testValidateRequirementsGraalVersion2();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
getfield org.graalvm.component.installer.commands.MockStorage.graalInfo:Ljava/util/Map;
ldc "graalvm_version"
ldc "0.30"
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Lorg/graalvm/component/installer/DependencyException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "VERIFY_UpdateGraalVM"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testValidateRequirementsDifferentJava();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "truffleruby2-11.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Lorg/graalvm/component/installer/DependencyException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "VERIFY_Dependency_Failed"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testValidateRequirementsJavaMatches();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc "truffleruby2-11.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
getfield org.graalvm.component.installer.commands.MockStorage.graalInfo:Ljava/util/Map;
ldc "java_version"
ldc "11"
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testSetIgnoreRequirements();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc "truffleruby2-11.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.storage:Lorg/graalvm/component/installer/commands/MockStorage;
getfield org.graalvm.component.installer.commands.MockStorage.graalInfo:Ljava/util/Map;
ldc "graalvm_version"
ldc "0.30"
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setIgnoreRequirements:(Z)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateRequirements:()Lorg/graalvm/component/installer/model/Verifier;
pop
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testInstall();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 6: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
7: invokestatic org.graalvm.component.installer.commands.InstallerTest.isWindows:()Z
ifne 9
8: aload 2
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
9: StackMap locals: java.nio.file.Path java.nio.file.Path
StackMap stack:
ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifne 12
10: aload 1
invokestatic java.nio.file.Files.isExecutable:(Ljava/nio/file/Path;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
11: aload 2
invokestatic java.nio.file.Files.isSymbolicLink:(Ljava/nio/file/Path;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
12: StackMap locals:
StackMap stack:
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
13: ldc "No files should be created under dry run"
14: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokestatic java.nio.file.Files.list:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findAny:()Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
15: invokestatic org.junit.Assert.assertFalse:(Ljava/lang/String;Z)V
16: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
5 17 1 jreRuby Ljava/nio/file/Path;
6 17 2 binRuby Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testInstallOneRegularFile();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/ruby"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 1
start local 1 2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 1
invokevirtual org.graalvm.component.installer.commands.Installer.translateTargetPath:(Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
aload 1
invokevirtual org.graalvm.component.installer.commands.Installer.installOneFile:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
astore 2
start local 2 3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
aload 2
invokeinterface java.nio.file.Path.relativize:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 3
start local 3 4: aload 1
invokeinterface org.graalvm.component.installer.Archive$FileEntry.getName:()Ljava/lang/String;
aload 3
invokestatic org.graalvm.component.installer.SystemUtils.toCommonPath:(Ljava/nio/file/Path;)Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 4
start local 4 6: aload 4
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
7: aload 1
invokeinterface org.graalvm.component.installer.Archive$FileEntry.getSize:()J
aload 4
invokestatic java.nio.file.Files.size:(Ljava/nio/file/Path;)J
invokestatic org.junit.Assert.assertEquals:(JJ)V
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
9: aload 4
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
10: aload 4
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
11: aload 4
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
12: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 13 1 entry Lorg/graalvm/component/installer/Archive$FileEntry;
3 13 2 resultPath Ljava/nio/file/Path;
4 13 3 relative Ljava/nio/file/Path;
6 13 4 check Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testInstallExistingFileWillNotRevert();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 2: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
3: aload 0
ldc "ruby"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.dataFile:(Ljava/lang/String;)Ljava/nio/file/Path;
aload 1
iconst_0
anewarray java.nio.file.CopyOption
invokestatic java.nio.file.Files.copy:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)Ljava/nio/file/Path;
pop
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/ruby"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 2
start local 2 5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.translateTargetPath:(Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.installOneFile:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
astore 3
start local 3 6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
aload 3
invokeinterface java.nio.file.Path.relativize:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 4
start local 4 7: aload 2
invokeinterface org.graalvm.component.installer.Archive$FileEntry.getName:()Ljava/lang/String;
aload 4
invokestatic org.graalvm.component.installer.SystemUtils.toCommonPath:(Ljava/nio/file/Path;)Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 5
start local 5 9: aload 5
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
10: aload 2
invokeinterface org.graalvm.component.installer.Archive$FileEntry.getSize:()J
aload 5
invokestatic java.nio.file.Files.size:(Ljava/nio/file/Path;)J
invokestatic org.junit.Assert.assertEquals:(JJ)V
11: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
12: aload 5
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
13: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 14 1 existing Ljava/nio/file/Path;
5 14 2 entry Lorg/graalvm/component/installer/Archive$FileEntry;
6 14 3 resultPath Ljava/nio/file/Path;
7 14 4 relative Ljava/nio/file/Path;
9 14 5 check Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testInstallOverwrittemFileWillNotRevert();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setReplaceDiferentFiles:(Z)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 3: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
4: aload 0
ldc "ruby2"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.dataFile:(Ljava/lang/String;)Ljava/nio/file/Path;
aload 1
iconst_0
anewarray java.nio.file.CopyOption
invokestatic java.nio.file.Files.copy:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)Ljava/nio/file/Path;
pop
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/ruby"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 2
start local 2 6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.translateTargetPath:(Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.installOneFile:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
astore 3
start local 3 7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
aload 3
invokeinterface java.nio.file.Path.relativize:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 4
start local 4 8: aload 2
invokeinterface org.graalvm.component.installer.Archive$FileEntry.getName:()Ljava/lang/String;
aload 4
invokestatic org.graalvm.component.installer.SystemUtils.toCommonPath:(Ljava/nio/file/Path;)Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
9: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 5
start local 5 10: aload 5
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
11: aload 2
invokeinterface org.graalvm.component.installer.Archive$FileEntry.getSize:()J
aload 5
invokestatic java.nio.file.Files.size:(Ljava/nio/file/Path;)J
invokestatic org.junit.Assert.assertEquals:(JJ)V
12: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
13: aload 5
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
14: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
3 15 1 existing Ljava/nio/file/Path;
6 15 2 entry Lorg/graalvm/component/installer/Archive$FileEntry;
7 15 3 resultPath Ljava/nio/file/Path;
8 15 4 relative Ljava/nio/file/Path;
10 15 5 check Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testInstallOneDirectory();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 1
start local 1 2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 1
invokevirtual org.graalvm.component.installer.commands.Installer.installOneEntry:(Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
pop
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 4: aload 2
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
5: aload 2
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.isDirectory:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
7: aload 2
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
8: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 9 1 entry Lorg/graalvm/component/installer/Archive$FileEntry;
4 9 2 check Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testInstallExistingDirectoryWillNotRevert();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 2: aload 1
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 2
start local 2 4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.installOneEntry:(Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
pop
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 3
start local 3 6: aload 3
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
7: aload 3
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.isDirectory:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
9: aload 3
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
10: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 11 1 existing Ljava/nio/file/Path;
4 11 2 entry Lorg/graalvm/component/installer/Archive$FileEntry;
6 11 3 check Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testProcessPermissions();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby3.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.unpackFiles:()V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 5: aload 1
invokestatic java.nio.file.Files.isExecutable:(Ljava/nio/file/Path;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.processPermissions:()V
7: aload 1
invokestatic java.nio.file.Files.isExecutable:(Ljava/nio/file/Path;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
9: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.processPermissions:()V
10: aload 1
invokestatic java.nio.file.Files.isExecutable:(Ljava/nio/file/Path;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
11: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
12: ldc "jre/languages/ruby/bin/ri"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
13: invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
invokestatic java.nio.file.Files.isExecutable:(Ljava/nio/file/Path;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
14: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
5 15 1 check Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testCreateSymlinks();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.unpackFiles:()V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 5: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.createSymlinks:()V
8: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
9: aload 1
invokestatic java.nio.file.Files.isSymbolicLink:(Ljava/nio/file/Path;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
10: aload 1
invokestatic java.nio.file.Files.readSymbolicLink:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 11: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
aload 1
aload 2
invokeinterface java.nio.file.Path.resolveSibling:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.normalize:()Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.relativize:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 3
start local 3 12: ldc "jre/bin/ruby"
aload 3
invokestatic org.graalvm.component.installer.SystemUtils.toCommonPath:(Ljava/nio/file/Path;)Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
13: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
14: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
15: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
5 16 1 check Ljava/nio/file/Path;
11 16 2 target Ljava/nio/file/Path;
12 16 3 resolved Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testCheckFileReplacementSame();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
ldc "ruby"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.dataFile:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 1
start local 1 2: getstatic org.graalvm.component.installer.commands.InstallerTest.expandedFolder:Lorg/junit/rules/TemporaryFolder;
ldc "testCheckFileReplacementSame-ruby"
invokevirtual org.junit.rules.TemporaryFolder.newFile:(Ljava/lang/String;)Ljava/io/File;
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
astore 2
start local 2 3: aload 2
new java.lang.StringBuilder
dup
ldc "\n"
aload 1
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
invokestatic java.lang.String.join:(Ljava/lang/CharSequence;Ljava/lang/Iterable;)Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
ldc "UTF-8"
invokevirtual java.lang.String.getBytes:(Ljava/lang/String;)[B
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.write:(Ljava/nio/file/Path;[B[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;
pop
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/ruby"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 3
start local 3 5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 2
aload 3
invokevirtual org.graalvm.component.installer.commands.Installer.checkFileReplacement:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/Archive$FileEntry;)Z
pop
6: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 7 1 existingOrig Ljava/nio/file/Path;
3 7 2 existing Ljava/nio/file/Path;
5 7 3 je Lorg/graalvm/component/installer/Archive$FileEntry;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testCheckFileReplacementDifferent();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
ldc "ruby2"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.dataFile:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 1
start local 1 2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/ruby"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 2
start local 2 3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Lorg/graalvm/component/installer/FailedOperationException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "INSTALL_ReplacedFileDiffers"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 1
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.checkFileReplacement:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/Archive$FileEntry;)Z
pop
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 7 1 existing Ljava/nio/file/Path;
3 7 2 je Lorg/graalvm/component/installer/Archive$FileEntry;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testCheckFileReplacementForced();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setReplaceDiferentFiles:(Z)V
2: aload 0
ldc "ruby2"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.dataFile:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 1
start local 1 3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/ruby"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 2
start local 2 4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 1
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.checkFileReplacement:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/Archive$FileEntry;)Z
pop
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
3 6 1 existing Ljava/nio/file/Path;
4 6 2 je Lorg/graalvm/component/installer/Archive$FileEntry;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testSetDryRun();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setDryRun:(Z)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
5: ldc "No files should be created under dry run"
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokestatic java.nio.file.Files.list:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findAny:()Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
7: invokestatic org.junit.Assert.assertFalse:(Ljava/lang/String;Z)V
8: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testValidateFiles();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateFiles:()V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateAll:()Z
pop
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testValidateOverwriteDirectoryWithFile();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 2: aload 1
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/bin/ruby"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 2
start local 2 4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Ljava/io/IOException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "INSTALL_OverwriteWithFile"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.translateTargetPath:(Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
aload 2
8: invokevirtual org.graalvm.component.installer.commands.Installer.validateOneEntry:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/Archive$FileEntry;)Z
pop
9: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 10 1 offending Ljava/nio/file/Path;
4 10 2 entry Lorg/graalvm/component/installer/Archive$FileEntry;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testValidateOverwriteFileWithDirectory();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 2: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
3: aload 1
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createFile:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentJarFile:Lorg/graalvm/component/installer/jar/JarArchive;
ldc "jre/languages/ruby/"
invokevirtual org.graalvm.component.installer.jar.JarArchive.getJarEntry:(Ljava/lang/String;)Lorg/graalvm/component/installer/Archive$FileEntry;
astore 2
start local 2 5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Ljava/io/IOException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "INSTALL_OverwriteWithDirectory"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 2
invokevirtual org.graalvm.component.installer.commands.Installer.translateTargetPath:(Lorg/graalvm/component/installer/Archive$FileEntry;)Ljava/nio/file/Path;
aload 2
9: invokevirtual org.graalvm.component.installer.commands.Installer.validateOneEntry:(Ljava/nio/file/Path;Lorg/graalvm/component/installer/Archive$FileEntry;)Z
pop
10: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 11 1 offending Ljava/nio/file/Path;
5 11 2 entry Lorg/graalvm/component/installer/Archive$FileEntry;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testRevertInstallFailureFile();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: invokestatic org.graalvm.component.installer.commands.InstallerTest.isWindows:()Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 4: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
6: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
7: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
ldc "r-xr-xr-x"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
8: invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
9: new org.graalvm.component.installer.commands.InstallerTest$1FD
dup
aload 0
invokespecial org.graalvm.component.installer.commands.InstallerTest$1FD.<init>:(Lorg/graalvm/component/installer/commands/InstallerTest;)V
astore 2
start local 2 10: aload 0
aload 2
invokevirtual org.graalvm.component.installer.commands.InstallerTest.delegateFeedback:(Lorg/graalvm/component/installer/Feedback;)V
11: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
12: aload 2
getfield org.graalvm.component.installer.commands.InstallerTest$1FD.errors:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
13: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
end local 2 14: goto 19
StackMap locals: org.graalvm.component.installer.commands.InstallerTest java.nio.file.Path
StackMap stack: java.lang.Throwable
15: astore 3
16: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
ldc "rwxrwxrwx"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
17: invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
18: aload 3
athrow
19: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
ldc "rwxrwxrwx"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
20: invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
21: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
4 22 1 jreRuby Ljava/nio/file/Path;
10 14 2 fd Lorg/graalvm/component/installer/commands/InstallerTest$1FD;
Exception table:
from to target type
9 15 15 any
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testRevertInstallFailureDir();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: invokestatic org.graalvm.component.installer.commands.InstallerTest.isWindows:()Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 4: aload 1
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
6: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
7: aload 1
ldc "r-xr-xr-x"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
8: invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
9: new org.graalvm.component.installer.commands.InstallerTest$2FD
dup
aload 0
invokespecial org.graalvm.component.installer.commands.InstallerTest$2FD.<init>:(Lorg/graalvm/component/installer/commands/InstallerTest;)V
astore 2
start local 2 10: aload 0
aload 2
invokevirtual org.graalvm.component.installer.commands.InstallerTest.delegateFeedback:(Lorg/graalvm/component/installer/Feedback;)V
11: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.revertInstall:()V
12: aload 2
getfield org.graalvm.component.installer.commands.InstallerTest$2FD.errors:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
13: aload 1
invokestatic java.nio.file.Files.list:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.iterator:()Ljava/util/Iterator;
invokeinterface java.util.Iterator.hasNext:()Z
invokestatic org.junit.Assert.assertFalse:(Z)V
end local 2 14: goto 19
StackMap locals: org.graalvm.component.installer.commands.InstallerTest java.nio.file.Path
StackMap stack: java.lang.Throwable
15: astore 3
16: aload 1
ldc "rwxrwxrwx"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
17: invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
18: aload 3
athrow
19: StackMap locals:
StackMap stack:
aload 1
ldc "rwxrwxrwx"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
20: invokestatic java.nio.file.Files.setPosixFilePermissions:(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;
pop
21: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
4 22 1 jreLang Ljava/nio/file/Path;
10 14 2 fd Lorg/graalvm/component/installer/commands/InstallerTest$2FD;
Exception table:
from to target type
9 15 15 any
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testUnpackExistingSymlinks();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 4: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
5: aload 1
ldc "../jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createSymbolicLink:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/languages/ruby/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 2
start local 2 7: aload 2
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
8: aload 2
ldc "xxx"
invokestatic org.graalvm.component.installer.SystemUtils.fileName:(Ljava/lang/String;)Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createSymbolicLink:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
9: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setReplaceDiferentFiles:(Z)V
10: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
11: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.createSymlinks:()V
12: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.componentInfo:Lorg/graalvm/component/installer/model/ComponentInfo;
invokevirtual org.graalvm.component.installer.model.ComponentInfo.getPaths:()Ljava/util/List;
astore 3
start local 3 13: aload 3
ldc "bin/ruby"
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
14: aload 3
ldc "jre/languages/ruby/bin/ruby"
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
15: ldc "truffleruby"
invokestatic org.graalvm.component.installer.SystemUtils.fileName:(Ljava/lang/String;)Ljava/nio/file/Path;
aload 2
invokestatic java.nio.file.Files.readSymbolicLink:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
16: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
4 17 1 offending Ljava/nio/file/Path;
7 17 2 offending2 Ljava/nio/file/Path;
13 17 3 paths Ljava/util/List<Ljava/lang/String;>;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testFailOverwriteFileWithSymlink();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 2: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
3: aload 1
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createFile:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Ljava/io/IOException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "INSTALL_OverwriteWithLink"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateSymlinks:()V
8: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
2 9 1 offending Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testOverwriteFileWithSymlink();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: invokestatic org.graalvm.component.installer.commands.InstallerTest.isWindows:()Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 4: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
5: aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "../jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createSymbolicLink:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setReplaceDiferentFiles:(Z)V
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateSymlinks:()V
9: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
4 10 1 offending Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testFailOverwriteOtherSymlink();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: invokestatic org.graalvm.component.installer.commands.InstallerTest.isWindows:()Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 4: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
5: aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "../x"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createSymbolicLink:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc Lorg/graalvm/component/installer/FailedOperationException;
invokevirtual org.junit.rules.ExpectedException.expect:(Ljava/lang/Class;)V
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.exception:Lorg/junit/rules/ExpectedException;
ldc "INSTALL_ReplacedFileDiffers"
invokevirtual org.junit.rules.ExpectedException.expectMessage:(Ljava/lang/String;)V
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
9: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateSymlinks:()V
10: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
4 11 1 offending Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testOverwriteOtherSymlink();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: invokestatic org.graalvm.component.installer.commands.InstallerTest.isWindows:()Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
ldc "truffleruby2.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 4: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
5: aload 1
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "../x"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createSymbolicLink:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
7: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setReplaceDiferentFiles:(Z)V
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.validateSymlinks:()V
9: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
4 10 1 offending Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testComponentRegistryNotWrittenTo();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=5, args_size=1
start local 0 0: aload 0
ldc "trufflerubyWork.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
1: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
2: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
3: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
4: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "lib/installer/components"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 5: aload 1
ldc "org.graalvm.ruby.meta"
invokeinterface java.nio.file.Path.resolve:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 2
start local 2 6: aload 1
ldc "other"
invokeinterface java.nio.file.Path.resolve:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 3
start local 3 7: aload 1
ldc "python.list"
invokeinterface java.nio.file.Path.resolve:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 4
start local 4 8: aload 2
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
9: aload 4
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
10: aload 3
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
11: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
5 12 1 p Ljava/nio/file/Path;
6 12 2 rubyMeta Ljava/nio/file/Path;
7 12 3 other Ljava/nio/file/Path;
8 12 4 pythonList Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testOverwriteBlockedFile();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=9, args_size=1
start local 0 0: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin/ruby"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 1
start local 1 1: aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
2: aload 1
iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "This is a blocked file"
aastore
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.write:(Ljava/nio/file/Path;Ljava/lang/Iterable;[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;
pop
3: new org.graalvm.component.installer.commands.BlockedFileOps
dup
invokespecial org.graalvm.component.installer.commands.BlockedFileOps.<init>:()V
astore 2
start local 2 4: aload 0
aload 2
putfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
5: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 0
invokevirtual org.graalvm.component.installer.FileOperations.init:(Lorg/graalvm/component/installer/Feedback;)V
6: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.fileOps:Lorg/graalvm/component/installer/FileOperations;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
invokevirtual org.graalvm.component.installer.FileOperations.setRootPath:(Ljava/nio/file/Path;)V
7: aload 2
getfield org.graalvm.component.installer.commands.BlockedFileOps.blockedPaths:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
8: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.folder:Lorg/junit/rules/TemporaryFolder;
ldc "delayDeletes"
invokevirtual org.junit.rules.TemporaryFolder.newFile:(Ljava/lang/String;)Ljava/io/File;
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
astore 3
start local 3 9: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.folder:Lorg/junit/rules/TemporaryFolder;
ldc "copiedDirs"
invokevirtual org.junit.rules.TemporaryFolder.newFile:(Ljava/lang/String;)Ljava/io/File;
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
astore 4
start local 4 10: aload 2
aload 3
invokevirtual org.graalvm.component.installer.commands.BlockedFileOps.setDelayDeletedList:(Ljava/nio/file/Path;)V
11: aload 2
aload 4
invokevirtual org.graalvm.component.installer.commands.BlockedFileOps.setCopyContents:(Ljava/nio/file/Path;)V
12: aload 0
ldc "trufflerubyWork.jar"
invokevirtual org.graalvm.component.installer.commands.InstallerTest.setupComponentInstall:(Ljava/lang/String;)V
13: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadSymlinks:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setSymlinks:(Ljava/util/Map;)V
14: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.loader:Lorg/graalvm/component/installer/persist/ComponentPackageLoader;
invokevirtual org.graalvm.component.installer.persist.ComponentPackageLoader.loadPermissions:()Ljava/util/Map;
invokevirtual org.graalvm.component.installer.commands.Installer.setPermissions:(Ljava/util/Map;)V
15: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
iconst_1
invokevirtual org.graalvm.component.installer.commands.Installer.setReplaceDiferentFiles:(Z)V
16: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.installer:Lorg/graalvm/component/installer/commands/Installer;
invokevirtual org.graalvm.component.installer.commands.Installer.install:()V
17: aload 2
invokevirtual org.graalvm.component.installer.commands.BlockedFileOps.getDelayDeletedPaths:()Ljava/util/Set;
invokeinterface java.util.Set.isEmpty:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
18: aload 2
invokevirtual org.graalvm.component.installer.commands.BlockedFileOps.getCopiedPaths:()Ljava/util/Map;
astore 5
start local 5 19: aload 0
getfield org.graalvm.component.installer.commands.InstallerTest.targetPath:Ljava/nio/file/Path;
ldc "jre/bin.new"
invokestatic org.graalvm.component.installer.SystemUtils.fromCommonString:(Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.resolve:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
astore 6
start local 6 20: aload 6
ldc "ruby"
invokeinterface java.nio.file.Path.resolve:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 7
start local 7 21: lconst_1
aload 5
invokeinterface java.util.Map.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
22: aload 6
aload 5
aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
23: ldc "This is a blocked file"
aload 1
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
24: ldc "Test content: ./jre/bin/ruby"
aload 7
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
25: aload 2
invokevirtual org.graalvm.component.installer.commands.BlockedFileOps.flush:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
26: lconst_0
aload 3
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
27: new java.lang.StringBuilder
dup
aload 1
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "|"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 6
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 8
start local 8 28: aload 8
aload 4
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
29: return
end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 30 0 this Lorg/graalvm/component/installer/commands/InstallerTest;
1 30 1 blockedFile Ljava/nio/file/Path;
4 30 2 blockedOps Lorg/graalvm/component/installer/commands/BlockedFileOps;
9 30 3 delayDeletes Ljava/nio/file/Path;
10 30 4 copiedFiles Ljava/nio/file/Path;
19 30 5 copies Ljava/util/Map<Ljava/nio/file/Path;Ljava/nio/file/Path;>;
20 30 6 copyDir Ljava/nio/file/Path;
21 30 7 copyFile Ljava/nio/file/Path;
28 30 8 l Ljava/lang/String;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
}
SourceFile: "InstallerTest.java"
NestMembers:
org.graalvm.component.installer.commands.InstallerTest$1FD org.graalvm.component.installer.commands.InstallerTest$2FD
InnerClasses:
public abstract FileEntry = org.graalvm.component.installer.Archive$FileEntry of org.graalvm.component.installer.Archive
public Conflict = org.graalvm.component.installer.DependencyException$Conflict of org.graalvm.component.installer.DependencyException
FD = org.graalvm.component.installer.commands.InstallerTest$1FD
FD = org.graalvm.component.installer.commands.InstallerTest$2FD