public final class jdk.jfr.internal.WriteableUserPath
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.jfr.internal.WriteableUserPath
super_class: java.lang.Object
{
private final java.security.AccessControlContext controlContext;
descriptor: Ljava/security/AccessControlContext;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.nio.file.Path original;
descriptor: Ljava/nio/file/Path;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.nio.file.Path real;
descriptor: Ljava/nio/file/Path;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String text;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile boolean inPrivileged;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
public void <init>(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
invokestatic java.security.AccessController.getContext:()Ljava/security/AccessControlContext;
putfield jdk.jfr.internal.WriteableUserPath.controlContext:Ljava/security/AccessControlContext;
2: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifeq 4
aload 1
invokestatic java.nio.file.Files.isWritable:(Ljava/nio/file/Path;)Z
ifne 4
3: new java.io.FileNotFoundException
dup
new java.lang.StringBuilder
dup
ldc "Could not write to file: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokeinterface java.nio.file.Path.toAbsolutePath:()Ljava/nio/file/Path;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.FileNotFoundException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: jdk.jfr.internal.WriteableUserPath java.nio.file.Path
StackMap stack:
aload 1
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.newBufferedWriter:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/BufferedWriter;
astore 2
start local 2 5: aload 2
invokevirtual java.io.BufferedWriter.close:()V
6: aload 0
aload 1
putfield jdk.jfr.internal.WriteableUserPath.original:Ljava/nio/file/Path;
7: aload 0
aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokeinterface java.nio.file.Path.toRealPath:([Ljava/nio/file/LinkOption;)Ljava/nio/file/Path;
putfield jdk.jfr.internal.WriteableUserPath.real:Ljava/nio/file/Path;
8: aload 0
aload 0
getfield jdk.jfr.internal.WriteableUserPath.real:Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
putfield jdk.jfr.internal.WriteableUserPath.text:Ljava/lang/String;
9: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Ljdk/jfr/internal/WriteableUserPath;
0 10 1 path Ljava/nio/file/Path;
5 10 2 fw Ljava/io/BufferedWriter;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
path
public java.nio.file.Path getPotentiallyMaliciousOriginal();
descriptor: ()Ljava/nio/file/Path;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.jfr.internal.WriteableUserPath.original:Ljava/nio/file/Path;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/jfr/internal/WriteableUserPath;
public java.lang.String getText();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.jfr.internal.WriteableUserPath.text:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/jfr/internal/WriteableUserPath;
public java.nio.file.Path getReal();
descriptor: ()Ljava/nio/file/Path;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.jfr.internal.WriteableUserPath.inPrivileged:Z
ifne 2
1: new java.lang.InternalError
dup
ldc "A user path was accessed outside the context it was supplied in"
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield jdk.jfr.internal.WriteableUserPath.real:Ljava/nio/file/Path;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/jfr/internal/WriteableUserPath;
public void doPriviligedIO(java.util.concurrent.Callable<?>);
descriptor: (Ljava/util/concurrent/Callable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
iconst_1
putfield jdk.jfr.internal.WriteableUserPath.inPrivileged:Z
1: new jdk.jfr.internal.WriteableUserPath$1
dup
aload 0
aload 1
invokespecial jdk.jfr.internal.WriteableUserPath$1.<init>:(Ljdk/jfr/internal/WriteableUserPath;Ljava/util/concurrent/Callable;)V
2: aload 0
getfield jdk.jfr.internal.WriteableUserPath.controlContext:Ljava/security/AccessControlContext;
3: invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
pop
4: goto 10
StackMap locals:
StackMap stack: java.lang.Throwable
5: pop
6: new java.io.IOException
dup
ldc "Unexpected error during I/O operation"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
8: aload 0
iconst_0
putfield jdk.jfr.internal.WriteableUserPath.inPrivileged:Z
9: aload 2
athrow
10: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield jdk.jfr.internal.WriteableUserPath.inPrivileged:Z
11: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/jfr/internal/WriteableUserPath;
0 12 1 function Ljava/util/concurrent/Callable<*>;
Exception table:
from to target type
0 4 5 Class java.lang.Throwable
0 7 7 any
Exceptions:
throws java.io.IOException
Signature: (Ljava/util/concurrent/Callable<*>;)V
MethodParameters:
Name Flags
function
}
SourceFile: "WriteableUserPath.java"
NestMembers:
jdk.jfr.internal.WriteableUserPath$1
InnerClasses:
jdk.jfr.internal.WriteableUserPath$1