Skip to content

Commit 08ff979

Browse files
committed
feat: Bump version
1 parent 99020a8 commit 08ff979

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.coley</groupId>
88
<artifactId>lljzip</artifactId>
9-
<version>1.0.0</version>
9+
<version>1.1.0</version>
1010

1111
<properties>
1212
<junit.version>5.8.2</junit.version>

src/main/java/software/coley/llzip/util/BufferData.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* @author xDark
1010
*/
1111
public final class BufferData implements ByteData {
12-
1312
private final ByteBuffer buffer;
1413

1514
private BufferData(ByteBuffer buffer) {
@@ -34,8 +33,10 @@ public byte get(long position) {
3433
@Override
3534
public void get(long position, byte[] b, int off, int len) {
3635
ByteBuffer buffer = this.buffer;
37-
((ByteBuffer) buffer.slice().order(buffer.order()).position(validate(position)))
38-
.get(b, off, len);
36+
buffer.slice()
37+
.order(buffer.order())
38+
.position(validate(position))
39+
.get(b, off, len);
3940
}
4041

4142
@Override
@@ -52,9 +53,7 @@ public long length() {
5253
public boolean equals(Object o) {
5354
if (this == o) return true;
5455
if (!(o instanceof BufferData)) return false;
55-
5656
BufferData that = (BufferData) o;
57-
5857
return buffer.equals(that.buffer);
5958
}
6059

src/main/java/software/coley/llzip/util/UnsafeMappedFile.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
* @author xDark
1111
*/
1212
final class UnsafeMappedFile implements ByteData {
13-
1413
private static final boolean SWAP = ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN;
1514
private static final Unsafe UNSAFE = UnsafeUtil.get();
1615

17-
private final long address, end;
16+
private final long address;
17+
private final long end;
1818
private final Runnable deallocator;
1919
private Object attachment;
2020

@@ -89,12 +89,12 @@ public int hashCode() {
8989
@Override
9090
protected void finalize() throws Throwable {
9191
Runnable deallocator = this.deallocator;
92-
if (deallocator != null)
93-
try {
92+
try {
93+
if (deallocator != null)
9494
deallocator.run();
95-
} finally {
96-
super.finalize();
97-
}
95+
} finally {
96+
super.finalize();
97+
}
9898
}
9999

100100
private long validate(long position) {

src/main/java/software/coley/llzip/util/UnsafeUtil.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
* @author XDark
1111
*/
1212
class UnsafeUtil {
13-
1413
private static final Unsafe UNSAFE;
1514

1615
/**

0 commit comments

Comments
 (0)