Skip to content

Commit

Permalink
Revert "[Feature] Update SMBJ."
Browse files Browse the repository at this point in the history
To work around regression in SMB anonymous authentication.

See also hierynomus/smbj#792

This reverts commit d9ce4e6.

Bug: #1181
  • Loading branch information
zhanghai committed Apr 7, 2024
1 parent 11003f3 commit 2d425a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ dependencies {
implementation 'com.drakeet.drawer:drawer:1.0.3'
implementation 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:1.0.0'
implementation 'com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:1.0.0'
implementation ('com.hierynomus:smbj:0.13.0') {
exclude group: 'org.bouncycastle', module: 'bcprov-jdk18on'
implementation ('com.hierynomus:smbj:0.11.5') {
// org.bouncycastle:bcprov-jdk15on uses bytecode version unsupported by Jetifier, so use
// org.bouncycastle:bcprov-jdk15to18 instead.
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
}
// SSHJ 0.36.0 requires Java 8.
//noinspection GradleDependency
Expand All @@ -162,8 +164,6 @@ dependencies {
// SMBJ-RPC depends on the JRE flavor of Guava which targets Java 8.
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
// This comes from the dependency on SMBJ.
exclude group: 'org.bouncycastle', module: 'bcprov-jdk18on'
}
implementation 'com.google.guava:guava:33.0.0-android'
// Guava conflicts with com.google.guava:listenablefuture:1.0 pulled in by AndroidX Core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class FileByteChannel(
override fun onWrite(position: Long, source: ByteBuffer) {
val sourcePosition = source.position()
val bytesWritten = try {
file.write(ByteBufferChunkProvider(source, position)).toInt()
file.write(ByteBufferChunkProvider(source, position))
} catch (e: SMBRuntimeException) {
throw e.toIOException()
}
Expand Down

0 comments on commit 2d425a6

Please sign in to comment.