public class jdk.internal.org.jline.reader.impl.history.DefaultHistory implements jdk.internal.org.jline.reader.History
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.org.jline.reader.impl.history.DefaultHistory
super_class: java.lang.Object
{
public static final int DEFAULT_HISTORY_SIZE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 500
public static final int DEFAULT_HISTORY_FILE_SIZE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 10000
private final java.util.LinkedList<jdk.internal.org.jline.reader.History$Entry> items;
descriptor: Ljava/util/LinkedList;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/LinkedList<Ljdk/internal/org/jline/reader/History$Entry;>;
private jdk.internal.org.jline.reader.LineReader reader;
descriptor: Ljdk/internal/org/jline/reader/LineReader;
flags: (0x0002) ACC_PRIVATE
private int lastLoaded;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int nbEntriesInFile;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int offset;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int index;
descriptor: I
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
2: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
3: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.nbEntriesInFile:I
4: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
5: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
6: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public void <init>(jdk.internal.org.jline.reader.LineReader);
descriptor: (Ljdk/internal/org/jline/reader/LineReader;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
2: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
3: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.nbEntriesInFile:I
4: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
5: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
6: aload 0
aload 1
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.attach:(Ljdk/internal/org/jline/reader/LineReader;)V
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 8 1 reader Ljdk/internal/org/jline/reader/LineReader;
MethodParameters:
Name Flags
reader
private java.nio.file.Path getPath();
descriptor: ()Ljava/nio/file/Path;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
ifnull 1
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
invokeinterface jdk.internal.org.jline.reader.LineReader.getVariables:()Ljava/util/Map;
ldc "history-file"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
goto 2
StackMap locals:
StackMap stack:
1: aconst_null
StackMap locals:
StackMap stack: java.lang.Object
2: astore 1
start local 1 3: aload 1
instanceof java.nio.file.Path
ifeq 5
4: aload 1
checkcast java.nio.file.Path
areturn
5: StackMap locals: java.lang.Object
StackMap stack:
aload 1
instanceof java.io.File
ifeq 7
6: aload 1
checkcast java.io.File
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
areturn
7: StackMap locals:
StackMap stack:
aload 1
ifnull 9
8: aload 1
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
areturn
9: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
3 10 1 obj Ljava/lang/Object;
public void attach(jdk.internal.org.jline.reader.LineReader);
descriptor: (Ljdk/internal/org/jline/reader/LineReader;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
aload 1
if_acmpeq 7
1: aload 0
aload 1
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
2: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.load:()V
3: goto 7
4: StackMap locals:
StackMap stack: java.io.IOException
astore 2
start local 2 5: iconst_2
anewarray java.lang.Object
dup
iconst_0
6: ldc "Failed to load history"
aastore
dup
iconst_1
aload 2
aastore
invokestatic jdk.internal.org.jline.utils.Log.warn:([Ljava/lang/Object;)V
end local 2 7: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 8 1 reader Ljdk/internal/org/jline/reader/LineReader;
5 7 2 e Ljava/io/IOException;
Exception table:
from to target type
2 3 4 Class java.io.IOException
MethodParameters:
Name Flags
reader
public void load();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.getPath:()Ljava/nio/file/Path;
astore 1
start local 1 1: aload 1
ifnull 22
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 22
iconst_2
anewarray java.lang.Object
dup
iconst_0
3: ldc "Loading history from: "
aastore
dup
iconst_1
aload 1
aastore
invokestatic jdk.internal.org.jline.utils.Log.trace:([Ljava/lang/Object;)V
4: aconst_null
astore 2
aconst_null
astore 3
5: aload 1
invokestatic java.nio.file.Files.newBufferedReader:(Ljava/nio/file/Path;)Ljava/io/BufferedReader;
astore 4
start local 4 6: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.internalClear:()V
7: aload 4
invokevirtual java.io.BufferedReader.lines:()Ljava/util/stream/Stream;
aload 0
aload 1
invokedynamic accept(Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;Ljava/nio/file/Path;)Ljava/util/function/Consumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
jdk/internal/org/jline/reader/impl/history/DefaultHistory.lambda$0(Ljava/nio/file/Path;Ljava/lang/String;)V (7)
(Ljava/lang/String;)V
invokeinterface java.util.stream.Stream.forEach:(Ljava/util/function/Consumer;)V
8: aload 0
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
9: aload 0
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.nbEntriesInFile:I
10: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.maybeResize:()V
11: aload 4
ifnull 22
aload 4
invokevirtual java.io.BufferedReader.close:()V
goto 22
StackMap locals: jdk.internal.org.jline.reader.impl.history.DefaultHistory java.nio.file.Path java.lang.Throwable java.lang.Throwable java.io.BufferedReader
StackMap stack: java.lang.Throwable
12: astore 2
aload 4
ifnull 13
aload 4
invokevirtual java.io.BufferedReader.close:()V
end local 4 StackMap locals:
StackMap stack:
13: aload 2
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
14: astore 3
aload 2
ifnonnull 15
aload 3
astore 2
goto 16
StackMap locals:
StackMap stack:
15: aload 2
aload 3
if_acmpeq 16
aload 2
aload 3
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
16: aload 2
athrow
17: StackMap locals: jdk.internal.org.jline.reader.impl.history.DefaultHistory java.nio.file.Path
StackMap stack: java.io.IOException
astore 2
start local 2 18: iconst_2
anewarray java.lang.Object
dup
iconst_0
19: ldc "Failed to load history; clearing"
aastore
dup
iconst_1
aload 2
aastore
invokestatic jdk.internal.org.jline.utils.Log.debug:([Ljava/lang/Object;)V
20: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.internalClear:()V
21: aload 2
athrow
end local 2 22: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
1 23 1 path Ljava/nio/file/Path;
6 13 4 reader Ljava/io/BufferedReader;
18 22 2 e Ljava/io/IOException;
Exception table:
from to target type
6 11 12 any
5 14 14 any
2 17 17 Class java.io.IOException
Exceptions:
throws java.io.IOException
protected void addHistoryLine(java.nio.file.Path, java.lang.String);
descriptor: (Ljava/nio/file/Path;Ljava/lang/String;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
getstatic jdk.internal.org.jline.reader.LineReader$Option.HISTORY_TIMESTAMPED:Ljdk/internal/org/jline/reader/LineReader$Option;
invokeinterface jdk.internal.org.jline.reader.LineReader.isSet:(Ljdk/internal/org/jline/reader/LineReader$Option;)Z
ifeq 11
1: aload 2
bipush 58
invokevirtual java.lang.String.indexOf:(I)I
istore 3
start local 3 2: iload 3
ifge 7
3: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Bad history file syntax! The history file `"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
4: aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "` may be an older history: "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
5: ldc "please remove it or use a different history file."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: int
StackMap stack:
aload 2
iconst_0
iload 3
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokestatic java.lang.Long.parseLong:(Ljava/lang/String;)J
invokestatic java.time.Instant.ofEpochMilli:(J)Ljava/time/Instant;
astore 4
start local 4 8: aload 2
iload 3
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic jdk.internal.org.jline.reader.impl.history.DefaultHistory.unescape:(Ljava/lang/String;)Ljava/lang/String;
astore 5
start local 5 9: aload 0
aload 4
aload 5
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.internalAdd:(Ljava/time/Instant;Ljava/lang/String;)V
end local 5 end local 4 end local 3 10: goto 12
11: StackMap locals:
StackMap stack:
aload 0
invokestatic java.time.Instant.now:()Ljava/time/Instant;
aload 2
invokestatic jdk.internal.org.jline.reader.impl.history.DefaultHistory.unescape:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.internalAdd:(Ljava/time/Instant;Ljava/lang/String;)V
12: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 13 1 path Ljava/nio/file/Path;
0 13 2 line Ljava/lang/String;
2 10 3 idx I
8 10 4 time Ljava/time/Instant;
9 10 5 unescaped Ljava/lang/String;
MethodParameters:
Name Flags
path
line
public void purge();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.internalClear:()V
1: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.getPath:()Ljava/nio/file/Path;
astore 1
start local 1 2: aload 1
ifnull 5
iconst_2
anewarray java.lang.Object
dup
iconst_0
3: ldc "Purging history from: "
aastore
dup
iconst_1
aload 1
aastore
invokestatic jdk.internal.org.jline.utils.Log.trace:([Ljava/lang/Object;)V
4: aload 1
invokestatic java.nio.file.Files.deleteIfExists:(Ljava/nio/file/Path;)Z
pop
5: StackMap locals: java.nio.file.Path
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
2 6 1 path Ljava/nio/file/Path;
Exceptions:
throws java.io.IOException
public void save();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.getPath:()Ljava/nio/file/Path;
astore 1
start local 1 1: aload 1
ifnull 23
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: ldc "Saving history to: "
aastore
dup
iconst_1
aload 1
aastore
invokestatic jdk.internal.org.jline.utils.Log.trace:([Ljava/lang/Object;)V
3: aload 1
invokeinterface java.nio.file.Path.toAbsolutePath:()Ljava/nio/file/Path;
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: aconst_null
astore 2
aconst_null
astore 3
5: aload 1
invokeinterface java.nio.file.Path.toAbsolutePath:()Ljava/nio/file/Path;
iconst_3
anewarray java.nio.file.OpenOption
dup
iconst_0
6: getstatic java.nio.file.StandardOpenOption.WRITE:Ljava/nio/file/StandardOpenOption;
aastore
dup
iconst_1
getstatic java.nio.file.StandardOpenOption.APPEND:Ljava/nio/file/StandardOpenOption;
aastore
dup
iconst_2
getstatic java.nio.file.StandardOpenOption.CREATE:Ljava/nio/file/StandardOpenOption;
aastore
7: invokestatic java.nio.file.Files.newBufferedWriter:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/BufferedWriter;
astore 4
start local 4 8: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
invokevirtual java.util.LinkedList.subList:(II)Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 6
goto 12
StackMap locals: jdk.internal.org.jline.reader.impl.history.DefaultHistory java.nio.file.Path java.lang.Throwable java.lang.Throwable java.io.BufferedWriter top java.util.Iterator
StackMap stack:
9: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
astore 5
start local 5 10: aload 0
aload 5
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.isPersistable:(Ljdk/internal/org/jline/reader/History$Entry;)Z
ifeq 12
11: aload 4
aload 0
aload 5
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.format:(Ljdk/internal/org/jline/reader/History$Entry;)Ljava/lang/String;
invokevirtual java.io.BufferedWriter.append:(Ljava/lang/CharSequence;)Ljava/io/Writer;
pop
end local 5 12: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 9
13: aload 4
ifnull 19
aload 4
invokevirtual java.io.BufferedWriter.close:()V
goto 19
StackMap locals: jdk.internal.org.jline.reader.impl.history.DefaultHistory java.nio.file.Path java.lang.Throwable java.lang.Throwable java.io.BufferedWriter
StackMap stack: java.lang.Throwable
14: astore 2
aload 4
ifnull 15
aload 4
invokevirtual java.io.BufferedWriter.close:()V
end local 4 StackMap locals:
StackMap stack:
15: aload 2
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
16: astore 3
aload 2
ifnonnull 17
aload 3
astore 2
goto 18
StackMap locals:
StackMap stack:
17: aload 2
aload 3
if_acmpeq 18
aload 2
aload 3
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
18: aload 2
athrow
19: StackMap locals:
StackMap stack:
aload 0
dup
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.nbEntriesInFile:I
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
isub
iadd
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.nbEntriesInFile:I
20: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
ldc "history-file-size"
sipush 10000
invokestatic jdk.internal.org.jline.reader.impl.ReaderUtils.getInt:(Ljdk/internal/org/jline/reader/LineReader;Ljava/lang/String;I)I
istore 2
start local 2 21: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.nbEntriesInFile:I
iload 2
iload 2
iconst_4
idiv
iadd
if_icmple 23
22: aload 0
aload 1
iload 2
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.trimHistory:(Ljava/nio/file/Path;I)V
end local 2 23: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
24: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
1 25 1 path Ljava/nio/file/Path;
8 15 4 writer Ljava/io/BufferedWriter;
10 12 5 entry Ljdk/internal/org/jline/reader/History$Entry;
21 23 2 max I
Exception table:
from to target type
8 13 14 any
5 16 16 any
Exceptions:
throws java.io.IOException
protected void trimHistory(java.nio.file.Path, int);
descriptor: (Ljava/nio/file/Path;I)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=10, args_size=3
start local 0 start local 1 start local 2 0: iconst_2
anewarray java.lang.Object
dup
iconst_0
1: ldc "Trimming history path: "
aastore
dup
iconst_1
aload 1
aastore
invokestatic jdk.internal.org.jline.utils.Log.trace:([Ljava/lang/Object;)V
2: new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
astore 3
start local 3 3: aconst_null
astore 4
aconst_null
astore 5
4: aload 1
invokestatic java.nio.file.Files.newBufferedReader:(Ljava/nio/file/Path;)Ljava/io/BufferedReader;
astore 6
start local 6 5: aload 6
invokevirtual java.io.BufferedReader.lines:()Ljava/util/stream/Stream;
aload 0
aload 3
invokedynamic accept(Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;Ljava/util/LinkedList;)Ljava/util/function/Consumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
jdk/internal/org/jline/reader/impl/history/DefaultHistory.lambda$1(Ljava/util/LinkedList;Ljava/lang/String;)V (7)
(Ljava/lang/String;)V
invokeinterface java.util.stream.Stream.forEach:(Ljava/util/function/Consumer;)V
6: aload 6
ifnull 12
aload 6
invokevirtual java.io.BufferedReader.close:()V
goto 12
StackMap locals: jdk.internal.org.jline.reader.impl.history.DefaultHistory java.nio.file.Path int java.util.LinkedList java.lang.Throwable java.lang.Throwable java.io.BufferedReader
StackMap stack: java.lang.Throwable
7: astore 4
aload 6
ifnull 8
aload 6
invokevirtual java.io.BufferedReader.close:()V
end local 6 StackMap locals:
StackMap stack:
8: aload 4
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
9: astore 5
aload 4
ifnonnull 10
aload 5
astore 4
goto 11
StackMap locals:
StackMap stack:
10: aload 4
aload 5
if_acmpeq 11
aload 4
aload 5
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
11: aload 4
athrow
12: StackMap locals:
StackMap stack:
aload 3
iload 2
invokestatic jdk.internal.org.jline.reader.impl.history.DefaultHistory.doTrimHistory:(Ljava/util/List;I)V
13: aload 1
invokeinterface java.nio.file.Path.toAbsolutePath:()Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.getParent:()Ljava/nio/file/Path;
aload 1
invokeinterface java.nio.file.Path.getFileName:()Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
ldc ".tmp"
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createTempFile:(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
astore 4
start local 4 14: aconst_null
astore 5
aconst_null
astore 6
15: aload 4
iconst_1
anewarray java.nio.file.OpenOption
dup
iconst_0
getstatic java.nio.file.StandardOpenOption.WRITE:Ljava/nio/file/StandardOpenOption;
aastore
invokestatic java.nio.file.Files.newBufferedWriter:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/BufferedWriter;
astore 7
start local 7 16: aload 3
invokevirtual java.util.LinkedList.iterator:()Ljava/util/Iterator;
astore 9
goto 19
StackMap locals: jdk.internal.org.jline.reader.impl.history.DefaultHistory java.nio.file.Path int java.util.LinkedList java.nio.file.Path java.lang.Throwable java.lang.Throwable java.io.BufferedWriter top java.util.Iterator
StackMap stack:
17: aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
astore 8
start local 8 18: aload 7
aload 0
aload 8
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.format:(Ljdk/internal/org/jline/reader/History$Entry;)Ljava/lang/String;
invokevirtual java.io.BufferedWriter.append:(Ljava/lang/CharSequence;)Ljava/io/Writer;
pop
end local 8 19: StackMap locals:
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifne 17
20: aload 7
ifnull 26
aload 7
invokevirtual java.io.BufferedWriter.close:()V
goto 26
StackMap locals: jdk.internal.org.jline.reader.impl.history.DefaultHistory java.nio.file.Path int java.util.LinkedList java.nio.file.Path java.lang.Throwable java.lang.Throwable java.io.BufferedWriter
StackMap stack: java.lang.Throwable
21: astore 5
aload 7
ifnull 22
aload 7
invokevirtual java.io.BufferedWriter.close:()V
end local 7 StackMap locals:
StackMap stack:
22: aload 5
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
23: astore 6
aload 5
ifnonnull 24
aload 6
astore 5
goto 25
StackMap locals:
StackMap stack:
24: aload 5
aload 6
if_acmpeq 25
aload 5
aload 6
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
25: aload 5
athrow
26: StackMap locals:
StackMap stack:
aload 4
aload 1
iconst_1
anewarray java.nio.file.CopyOption
dup
iconst_0
getstatic java.nio.file.StandardCopyOption.REPLACE_EXISTING:Ljava/nio/file/StandardCopyOption;
aastore
invokestatic java.nio.file.Files.move:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)Ljava/nio/file/Path;
pop
27: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.internalClear:()V
28: aload 0
aload 3
iconst_0
invokevirtual java.util.LinkedList.get:(I)Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
invokeinterface jdk.internal.org.jline.reader.History$Entry.index:()I
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
29: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
aload 3
invokevirtual java.util.LinkedList.addAll:(Ljava/util/Collection;)Z
pop
30: aload 0
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
31: aload 0
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.nbEntriesInFile:I
32: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.maybeResize:()V
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 33 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 33 1 path Ljava/nio/file/Path;
0 33 2 max I
3 33 3 allItems Ljava/util/LinkedList<Ljdk/internal/org/jline/reader/History$Entry;>;
5 8 6 reader Ljava/io/BufferedReader;
14 33 4 temp Ljava/nio/file/Path;
16 22 7 writer Ljava/io/BufferedWriter;
18 19 8 entry Ljdk/internal/org/jline/reader/History$Entry;
Exception table:
from to target type
5 6 7 any
4 9 9 any
16 20 21 any
15 23 23 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
path
max
protected jdk.internal.org.jline.reader.impl.history.DefaultHistory$EntryImpl createEntry(int, java.time.Instant, java.lang.String);
descriptor: (ILjava/time/Instant;Ljava/lang/String;)Ljdk/internal/org/jline/reader/impl/history/DefaultHistory$EntryImpl;
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: new jdk.internal.org.jline.reader.impl.history.DefaultHistory$EntryImpl
dup
iload 1
aload 2
aload 3
invokespecial jdk.internal.org.jline.reader.impl.history.DefaultHistory$EntryImpl.<init>:(ILjava/time/Instant;Ljava/lang/String;)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 1 1 index I
0 1 2 time Ljava/time/Instant;
0 1 3 line Ljava/lang/String;
MethodParameters:
Name Flags
index
time
line
private void internalClear();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
1: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
2: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
3: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.nbEntriesInFile:I
4: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.clear:()V
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
static void doTrimHistory(java.util.List<jdk.internal.org.jline.reader.History$Entry>, );
descriptor: (Ljava/util/List;I)V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=7, args_size=2
start local 0 start local 1 0: iconst_0
istore 2
start local 2 1: goto 11
2: StackMap locals: int
StackMap stack:
aload 0
invokeinterface java.util.List.size:()I
iload 2
isub
iconst_1
isub
istore 3
start local 3 3: aload 0
iload 3
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
invokeinterface jdk.internal.org.jline.reader.History$Entry.line:()Ljava/lang/String;
invokevirtual java.lang.String.trim:()Ljava/lang/String;
astore 4
start local 4 4: aload 0
iload 3
invokeinterface java.util.List.listIterator:(I)Ljava/util/ListIterator;
astore 5
start local 5 5: goto 9
6: StackMap locals: int java.lang.String java.util.ListIterator
StackMap stack:
aload 5
invokeinterface java.util.ListIterator.previous:()Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
invokeinterface jdk.internal.org.jline.reader.History$Entry.line:()Ljava/lang/String;
astore 6
start local 6 7: aload 4
aload 6
invokevirtual java.lang.String.trim:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 9
8: aload 5
invokeinterface java.util.ListIterator.remove:()V
end local 6 9: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.ListIterator.hasPrevious:()Z
ifne 6
10: iinc 2 1
end local 5 end local 4 end local 3 11: StackMap locals:
StackMap stack:
iload 2
aload 0
invokeinterface java.util.List.size:()I
if_icmplt 2
12: goto 14
13: StackMap locals:
StackMap stack:
aload 0
iconst_0
invokeinterface java.util.List.remove:(I)Ljava/lang/Object;
pop
14: StackMap locals:
StackMap stack:
aload 0
invokeinterface java.util.List.size:()I
iload 1
if_icmpgt 13
15: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 allItems Ljava/util/List<Ljdk/internal/org/jline/reader/History$Entry;>;
0 16 1 max I
1 16 2 idx I
3 11 3 ridx I
4 11 4 line Ljava/lang/String;
5 11 5 iterator Ljava/util/ListIterator<Ljdk/internal/org/jline/reader/History$Entry;>;
7 9 6 l Ljava/lang/String;
Signature: (Ljava/util/List<Ljdk/internal/org/jline/reader/History$Entry;>;I)V
MethodParameters:
Name Flags
allItems
max
public int size();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public boolean isEmpty();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.isEmpty:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public int index();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
iadd
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public int first();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public int last();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
iadd
iconst_1
isub
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
private java.lang.String format(jdk.internal.org.jline.reader.History$Entry);
descriptor: (Ljdk/internal/org/jline/reader/History$Entry;)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
getstatic jdk.internal.org.jline.reader.LineReader$Option.HISTORY_TIMESTAMPED:Ljdk/internal/org/jline/reader/LineReader$Option;
invokeinterface jdk.internal.org.jline.reader.LineReader.isSet:(Ljdk/internal/org/jline/reader/LineReader$Option;)Z
ifeq 2
1: new java.lang.StringBuilder
dup
aload 1
invokeinterface jdk.internal.org.jline.reader.History$Entry.time:()Ljava/time/Instant;
invokevirtual java.time.Instant.toEpochMilli:()J
invokestatic java.lang.Long.toString:(J)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 1
invokeinterface jdk.internal.org.jline.reader.History$Entry.line:()Ljava/lang/String;
invokestatic jdk.internal.org.jline.reader.impl.history.DefaultHistory.escape:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
2: StackMap locals:
StackMap stack:
new java.lang.StringBuilder
dup
aload 1
invokeinterface jdk.internal.org.jline.reader.History$Entry.line:()Ljava/lang/String;
invokestatic jdk.internal.org.jline.reader.impl.history.DefaultHistory.escape:(Ljava/lang/String;)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;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 3 1 entry Ljdk/internal/org/jline/reader/History$Entry;
MethodParameters:
Name Flags
entry
public java.lang.String get(int);
descriptor: (I)Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
iload 1
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
isub
invokevirtual java.util.LinkedList.get:(I)Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
invokeinterface jdk.internal.org.jline.reader.History$Entry.line:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 1 1 index I
MethodParameters:
Name Flags
index final
public void add(java.time.Instant, java.lang.String);
descriptor: (Ljava/time/Instant;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 2
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
ldc "disable-history"
iconst_0
invokestatic jdk.internal.org.jline.reader.impl.ReaderUtils.getBoolean:(Ljdk/internal/org/jline/reader/LineReader;Ljava/lang/String;Z)Z
ifeq 4
3: return
4: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
getstatic jdk.internal.org.jline.reader.LineReader$Option.HISTORY_IGNORE_SPACE:Ljdk/internal/org/jline/reader/LineReader$Option;
invokestatic jdk.internal.org.jline.reader.impl.ReaderUtils.isSet:(Ljdk/internal/org/jline/reader/LineReader;Ljdk/internal/org/jline/reader/LineReader$Option;)Z
ifeq 6
aload 2
ldc " "
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 6
5: return
6: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
getstatic jdk.internal.org.jline.reader.LineReader$Option.HISTORY_REDUCE_BLANKS:Ljdk/internal/org/jline/reader/LineReader$Option;
invokestatic jdk.internal.org.jline.reader.impl.ReaderUtils.isSet:(Ljdk/internal/org/jline/reader/LineReader;Ljdk/internal/org/jline/reader/LineReader$Option;)Z
ifeq 8
7: aload 2
invokevirtual java.lang.String.trim:()Ljava/lang/String;
astore 2
8: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
getstatic jdk.internal.org.jline.reader.LineReader$Option.HISTORY_IGNORE_DUPS:Ljdk/internal/org/jline/reader/LineReader$Option;
invokestatic jdk.internal.org.jline.reader.impl.ReaderUtils.isSet:(Ljdk/internal/org/jline/reader/LineReader;Ljdk/internal/org/jline/reader/LineReader$Option;)Z
ifeq 11
9: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.isEmpty:()Z
ifne 11
aload 2
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.getLast:()Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
invokeinterface jdk.internal.org.jline.reader.History$Entry.line:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 11
10: return
11: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
ldc "history-ignore"
ldc ""
invokestatic jdk.internal.org.jline.reader.impl.ReaderUtils.getString:(Ljdk/internal/org/jline/reader/LineReader;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
aload 2
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.matchPatterns:(Ljava/lang/String;Ljava/lang/String;)Z
ifeq 13
12: return
13: StackMap locals:
StackMap stack:
aload 0
aload 1
aload 2
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.internalAdd:(Ljava/time/Instant;Ljava/lang/String;)V
14: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
getstatic jdk.internal.org.jline.reader.LineReader$Option.HISTORY_INCREMENTAL:Ljdk/internal/org/jline/reader/LineReader$Option;
invokestatic jdk.internal.org.jline.reader.impl.ReaderUtils.isSet:(Ljdk/internal/org/jline/reader/LineReader;Ljdk/internal/org/jline/reader/LineReader$Option;)Z
ifeq 20
15: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.save:()V
16: goto 20
17: StackMap locals:
StackMap stack: java.io.IOException
astore 3
start local 3 18: iconst_2
anewarray java.lang.Object
dup
iconst_0
19: ldc "Failed to save history"
aastore
dup
iconst_1
aload 3
aastore
invokestatic jdk.internal.org.jline.utils.Log.warn:([Ljava/lang/Object;)V
end local 3 20: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 21 1 time Ljava/time/Instant;
0 21 2 line Ljava/lang/String;
18 20 3 e Ljava/io/IOException;
Exception table:
from to target type
15 16 17 Class java.io.IOException
MethodParameters:
Name Flags
time
line
protected boolean matchPatterns(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Z
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ifnull 1
aload 1
invokevirtual java.lang.String.isEmpty:()Z
ifeq 2
1: StackMap locals:
StackMap stack:
iconst_0
ireturn
2: StackMap locals:
StackMap stack:
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 3
start local 3 3: iconst_0
istore 4
start local 4 4: goto 16
5: StackMap locals: java.lang.StringBuilder int
StackMap stack:
aload 1
iload 4
invokevirtual java.lang.String.charAt:(I)C
istore 5
start local 5 6: iload 5
bipush 92
if_icmpne 10
7: aload 1
iinc 4 1
iload 4
invokevirtual java.lang.String.charAt:(I)C
istore 5
8: aload 3
iload 5
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
9: goto 15
StackMap locals: int
StackMap stack:
10: iload 5
bipush 58
if_icmpne 13
11: aload 3
bipush 124
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
12: goto 15
StackMap locals:
StackMap stack:
13: iload 5
bipush 42
if_icmpne 15
14: aload 3
bipush 46
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
bipush 42
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
end local 5 15: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
16: iload 4
aload 1
invokevirtual java.lang.String.length:()I
if_icmplt 5
end local 4 17: aload 2
aload 3
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.lang.String.matches:(Ljava/lang/String;)Z
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 18 1 patterns Ljava/lang/String;
0 18 2 line Ljava/lang/String;
3 18 3 sb Ljava/lang/StringBuilder;
4 17 4 i I
6 15 5 ch C
MethodParameters:
Name Flags
patterns
line
protected void internalAdd(java.time.Instant, java.lang.String);
descriptor: (Ljava/time/Instant;Ljava/lang/String;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: new jdk.internal.org.jline.reader.impl.history.DefaultHistory$EntryImpl
dup
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
iadd
aload 1
aload 2
invokespecial jdk.internal.org.jline.reader.impl.history.DefaultHistory$EntryImpl.<init>:(ILjava/time/Instant;Ljava/lang/String;)V
astore 3
start local 3 1: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
aload 3
invokevirtual java.util.LinkedList.add:(Ljava/lang/Object;)Z
pop
2: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.maybeResize:()V
3: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 4 1 time Ljava/time/Instant;
0 4 2 line Ljava/lang/String;
1 4 3 entry Ljdk/internal/org/jline/reader/History$Entry;
MethodParameters:
Name Flags
time
line
private void maybeResize();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=1, args_size=1
start local 0 0: goto 4
1: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.removeFirst:()Ljava/lang/Object;
pop
2: aload 0
dup
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
iconst_1
isub
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.lastLoaded:I
3: aload 0
dup
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
iconst_1
iadd
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.reader:Ljdk/internal/org/jline/reader/LineReader;
ldc "history-size"
sipush 500
invokestatic jdk.internal.org.jline.reader.impl.ReaderUtils.getInt:(Ljdk/internal/org/jline/reader/LineReader;Ljava/lang/String;I)I
if_icmpgt 1
5: aload 0
aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
6: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public java.util.ListIterator<jdk.internal.org.jline.reader.History$Entry> iterator(int);
descriptor: (I)Ljava/util/ListIterator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
iload 1
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
isub
invokevirtual java.util.LinkedList.listIterator:(I)Ljava/util/ListIterator;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 1 1 index I
Signature: (I)Ljava/util/ListIterator<Ljdk/internal/org/jline/reader/History$Entry;>;
MethodParameters:
Name Flags
index
public java.util.Spliterator<jdk.internal.org.jline.reader.History$Entry> spliterator();
descriptor: ()Ljava/util/Spliterator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.spliterator:()Ljava/util/Spliterator;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
Signature: ()Ljava/util/Spliterator<Ljdk/internal/org/jline/reader/History$Entry;>;
public boolean moveToLast();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
iconst_1
isub
istore 1
start local 1 1: iload 1
iflt 4
iload 1
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
if_icmpeq 4
2: aload 0
aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
iconst_1
isub
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
3: iconst_1
ireturn
4: StackMap locals: int
StackMap stack:
iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
1 5 1 lastEntry I
public boolean moveTo(int);
descriptor: (I)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.offset:I
isub
istore 1
1: iload 1
iflt 4
iload 1
aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
if_icmpge 4
2: aload 0
iload 1
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
3: iconst_1
ireturn
4: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 5 1 index I
MethodParameters:
Name Flags
index
public boolean moveToFirst();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
ifle 3
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
ifeq 3
1: aload 0
iconst_0
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
2: iconst_1
ireturn
3: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public void moveToEnd();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public java.lang.String current();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
if_icmplt 2
1: ldc ""
areturn
2: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.items:Ljava/util/LinkedList;
aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
invokevirtual java.util.LinkedList.get:(I)Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
invokeinterface jdk.internal.org.jline.reader.History$Entry.line:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public boolean previous();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
ifgt 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
aload 0
dup
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
iconst_1
isub
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
3: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public boolean next();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.size:()I
if_icmplt 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
aload 0
dup
getfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
iconst_1
iadd
putfield jdk.internal.org.jline.reader.impl.history.DefaultHistory.index:I
3: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 1
start local 1 1: aload 0
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: jdk.internal.org.jline.reader.impl.history.DefaultHistory java.lang.StringBuilder top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.internal.org.jline.reader.History$Entry
astore 2
start local 2 3: aload 1
aload 2
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: aload 1
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
1 6 1 sb Ljava/lang/StringBuilder;
3 4 2 e Ljdk/internal/org/jline/reader/History$Entry;
private static java.lang.String escape(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 1
start local 1 1: iconst_0
istore 2
start local 2 2: goto 16
3: StackMap locals: java.lang.StringBuilder int
StackMap stack:
aload 0
iload 2
invokevirtual java.lang.String.charAt:(I)C
istore 3
start local 3 4: iload 3
lookupswitch { // 3
10: 5
13: 8
92: 11
default: 14
}
5: StackMap locals: int
StackMap stack:
aload 1
bipush 92
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
6: aload 1
bipush 110
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
7: goto 15
8: StackMap locals:
StackMap stack:
aload 1
bipush 92
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
9: aload 1
bipush 114
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
10: goto 15
11: StackMap locals:
StackMap stack:
aload 1
bipush 92
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
12: aload 1
bipush 92
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
13: goto 15
14: StackMap locals:
StackMap stack:
aload 1
iload 3
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
end local 3 15: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
16: iload 2
aload 0
invokevirtual java.lang.String.length:()I
if_icmplt 3
end local 2 17: aload 1
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 s Ljava/lang/String;
1 18 1 sb Ljava/lang/StringBuilder;
2 17 2 i I
4 15 3 ch C
MethodParameters:
Name Flags
s
static java.lang.String unescape(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 1
start local 1 1: iconst_0
istore 2
start local 2 2: goto 16
3: StackMap locals: java.lang.StringBuilder int
StackMap stack:
aload 0
iload 2
invokevirtual java.lang.String.charAt:(I)C
istore 3
start local 3 4: iload 3
tableswitch { // 92 - 92
92: 5
default: 14
}
5: StackMap locals: int
StackMap stack:
aload 0
iinc 2 1
iload 2
invokevirtual java.lang.String.charAt:(I)C
istore 3
6: iload 3
bipush 110
if_icmpne 9
7: aload 1
bipush 10
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
8: goto 15
StackMap locals:
StackMap stack:
9: iload 3
bipush 114
if_icmpne 12
10: aload 1
bipush 13
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
11: goto 15
12: StackMap locals:
StackMap stack:
aload 1
iload 3
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
13: goto 15
14: StackMap locals:
StackMap stack:
aload 1
iload 3
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
end local 3 15: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
16: iload 2
aload 0
invokevirtual java.lang.String.length:()I
if_icmplt 3
end local 2 17: aload 1
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 s Ljava/lang/String;
1 18 1 sb Ljava/lang/StringBuilder;
2 17 2 i I
4 15 3 ch C
MethodParameters:
Name Flags
s
public java.util.Iterator iterator();
descriptor: ()Ljava/util/Iterator;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokeinterface jdk.internal.org.jline.reader.History.iterator:()Ljava/util/ListIterator;
areturn
LocalVariableTable:
Start End Slot Name Signature
private void lambda$0(java.nio.file.Path, java.lang.String);
descriptor: (Ljava/nio/file/Path;Ljava/lang/String;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 2 0: aload 0
aload 1
aload 2
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.addHistoryLine:(Ljava/nio/file/Path;Ljava/lang/String;)V
return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 1 2 line Ljava/lang/String;
private void lambda$1(java.util.LinkedList, java.lang.String);
descriptor: (Ljava/util/LinkedList;Ljava/lang/String;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=5, locals=6, args_size=3
start local 0 start local 2 0: aload 2
bipush 58
invokevirtual java.lang.String.indexOf:(I)I
istore 3
start local 3 1: aload 2
iconst_0
iload 3
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokestatic java.lang.Long.parseLong:(Ljava/lang/String;)J
invokestatic java.time.Instant.ofEpochMilli:(J)Ljava/time/Instant;
astore 4
start local 4 2: aload 2
iload 3
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic jdk.internal.org.jline.reader.impl.history.DefaultHistory.unescape:(Ljava/lang/String;)Ljava/lang/String;
astore 5
start local 5 3: aload 1
aload 0
aload 1
invokevirtual java.util.LinkedList.size:()I
aload 4
aload 5
invokevirtual jdk.internal.org.jline.reader.impl.history.DefaultHistory.createEntry:(ILjava/time/Instant;Ljava/lang/String;)Ljdk/internal/org/jline/reader/impl/history/DefaultHistory$EntryImpl;
invokevirtual java.util.LinkedList.add:(Ljava/lang/Object;)Z
pop
end local 5 end local 4 end local 3 4: return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/org/jline/reader/impl/history/DefaultHistory;
0 5 2 l Ljava/lang/String;
1 4 3 idx I
2 4 4 time Ljava/time/Instant;
3 4 5 line Ljava/lang/String;
}
SourceFile: "DefaultHistory.java"
NestMembers:
jdk.internal.org.jline.reader.impl.history.DefaultHistory$EntryImpl
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract Entry = jdk.internal.org.jline.reader.History$Entry of jdk.internal.org.jline.reader.History
public final Option = jdk.internal.org.jline.reader.LineReader$Option of jdk.internal.org.jline.reader.LineReader
protected EntryImpl = jdk.internal.org.jline.reader.impl.history.DefaultHistory$EntryImpl of jdk.internal.org.jline.reader.impl.history.DefaultHistory