variable 'pendingScaleType' always be null
- Dominant language
- Java
- Stars
- 18.8k
- Forks
- 3.9k
- PR merge metrics
- No merged PRs in 30d
Description
In class PhotoView, variable 'pendingScaleType' is always null.
There isn't any assigment in source code. Thus in method 'init()'
```java
if (pendingScaleType != null) {
setScaleType(pendingScaleType);
pendingScaleType = null;
}
```
called in constructor method, the snippet cannot be executed in.
Similarly, overrided method 'setScaleType()' has if branch.
```java
@Override
public void setScaleType(ScaleType scaleType) {
if (attacher == null) {
pendingScaleType = scaleType;
} else {
attacher.setScaleType(scaleType);
}
}
```
'attacher' is initialized in 'init()' method called by whichever constructor method. So 'attcher' is impossible null, and 'pendingScaleType' assignment branch cannot be executed.
Am I wrong??!
Contributor guide
Assessment
This issue has not been assessed yet.