Enable and fix more Eclipse warnings
Enable and fix warnings: - Missing `hashCode` method on classes that define `equals` - Redundant null check Also enable "possible accidental boolean assignment" warning. There are currently no instances of this but it might be useful to enable. Change-Id: I7659ae66bedb6a17e088c90d2165282b7fe33695
This commit is contained in:
@@ -17,6 +17,7 @@ package com.google.gerrit.client.diff;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/** Helper class to handle calculations involving line gaps. */
|
||||
class LineMapper {
|
||||
@@ -192,6 +193,11 @@ class LineMapper {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return line + " " + aligned;
|
||||
|
||||
Reference in New Issue
Block a user