Skip to content

Commit 799383e

Browse files
Fixed null pointer issue on StreamZip.getEntry().
1 parent 603c142 commit 799383e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

AndroidZip/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies {
3131
implementation 'androidx.appcompat:appcompat:1.5.1'
3232
implementation 'com.google.android.material:material:1.6.1'
3333

34-
implementation 'com.github.buggysofts-com:StreamZip:v1.0.4'
34+
implementation 'com.github.buggysofts-com:StreamZip:v1.0.6'
3535

3636
testImplementation 'junit:junit:4.13.2'
3737
androidTestImplementation 'androidx.test.ext:junit:1.1.3'

AndroidZip/src/main/java/com/buggysofts/androidzip/AndroidZip.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
import android.content.Context;
44

55
import androidx.annotation.NonNull;
6+
import androidx.annotation.Nullable;
67
import androidx.documentfile.provider.DocumentFile;
78

89
import com.buggysofts.streamzip.StreamZip;
910
import com.buggysofts.streamzip.ZipEntry;
1011

11-
import org.jetbrains.annotations.Nullable;
12-
1312
import java.io.FileInputStream;
1413
import java.io.IOException;
1514
import java.io.InputStream;
@@ -24,8 +23,9 @@ public AndroidZip(@NonNull Context context, @NonNull DocumentFile documentFile)
2423
}
2524

2625
/**
27-
* Get a particular entry.
26+
* Get a particular entry with the specified name, or null if not present.
2827
*/
28+
@Nullable
2929
public ZipEntry getEntry(@NonNull String name) {
3030
return super.getEntry(name);
3131
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Finally, add these two dependencies to your app/module level build.gradle file
3333
3434
dependencies {
3535
...
36-
implementation 'com.github.buggysofts-com:StreamZip:v1.0.4'
37-
implementation 'com.github.buggysofts-com:AndroidZip:v1.0.4'
36+
implementation 'com.github.buggysofts-com:StreamZip:v1.0.6'
37+
implementation 'com.github.buggysofts-com:AndroidZip:v1.0.6'
3838
}
3939
```
4040
And you are done importing the library.

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies {
3535
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
3636

3737
implementation project(':AndroidZip')
38-
implementation 'com.github.buggysofts-com:StreamZip:v1.0.4'
38+
implementation 'com.github.buggysofts-com:StreamZip:v1.0.6'
3939

4040
testImplementation 'junit:junit:4.13.2'
4141
androidTestImplementation 'androidx.test.ext:junit:1.1.3'

0 commit comments

Comments
 (0)