Possible broken assert in BaseFileKeyProvider.java
- Dominant language
- Java
- Stars
- 2.7k
- Forks
- 620
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 11
Description
The `init` method in `BaseFileKeyProvider.java` looks like it has an invalid `assert` statement on line 62. Here's the current code:
```
@Override
public void init(String privateKey, String publicKey) {
assert privateKey != null;
assert publicKey == null;
resource = new PrivateKeyStringResource(privateKey);
}
```
The second line doesn't make sense since this method is called whenever we are using a `privateKey` and a `publicKey` on the `SSHClient` object. It seems like it should be this code instead:
```
@Override
public void init(String privateKey, String publicKey) {
assert privateKey != null;
assert publicKey != null;
resource = new PrivateKeyStringResource(privateKey);
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.