diff options
author | Yigit Boyar <yboyar@google.com> | 2016-01-22 10:33:20 -0800 |
---|---|---|
committer | Yigit Boyar <yboyar@google.com> | 2016-01-22 13:22:37 -0800 |
commit | af146d6a8c0efcf5682d14047c06866a5548f78f (patch) | |
tree | 43aa8af42d26f3851925686d4afecb7e94319025 /compilerCommon | |
parent | a138270e662e29ee982942a9d963af5c45d0e8c2 (diff) | |
download | data-binding-af146d6a8c0efcf5682d14047c06866a5548f78f.tar.gz |
Update data binding to kotlin beta 4
I've also run some cleanup inspections to keep codebase
more up to date.
Bug: 26738574
Change-Id: I02aa43157cad858c0ea60dd41a22150e3cf2cfa1
Diffstat (limited to 'compilerCommon')
3 files changed, 7 insertions, 19 deletions
diff --git a/compilerCommon/src/main/java/android/databinding/tool/processing/scopes/LocationScopeProvider.java b/compilerCommon/src/main/java/android/databinding/tool/processing/scopes/LocationScopeProvider.java index ee7f8a92..4272cfd4 100644 --- a/compilerCommon/src/main/java/android/databinding/tool/processing/scopes/LocationScopeProvider.java +++ b/compilerCommon/src/main/java/android/databinding/tool/processing/scopes/LocationScopeProvider.java @@ -25,5 +25,5 @@ import java.util.List; * An item that is tight to locations in a source file. */ public interface LocationScopeProvider extends ScopeProvider { - public List<Location> provideScopeLocation(); + List<Location> provideScopeLocation(); } diff --git a/compilerCommon/src/main/java/android/databinding/tool/store/Location.java b/compilerCommon/src/main/java/android/databinding/tool/store/Location.java index 2dd456a6..67ed6a19 100644 --- a/compilerCommon/src/main/java/android/databinding/tool/store/Location.java +++ b/compilerCommon/src/main/java/android/databinding/tool/store/Location.java @@ -131,12 +131,9 @@ public class Location { if (startOffset != location.startOffset) { return false; } - if (parentLocation != null ? !parentLocation.equals(location.parentLocation) - : location.parentLocation != null) { - return false; - } + return !(parentLocation != null ? !parentLocation.equals(location.parentLocation) + : location.parentLocation != null); - return true; } @Override @@ -162,10 +159,7 @@ public class Location { if (endLine < other.endLine) { return false; } - if (endLine == other.endLine && endOffset < other.endOffset) { - return false; - } - return true; + return !(endLine == other.endLine && endOffset < other.endOffset); } private Location getValidParentAbsoluteLocation() { diff --git a/compilerCommon/src/main/java/android/databinding/tool/store/ResourceBundle.java b/compilerCommon/src/main/java/android/databinding/tool/store/ResourceBundle.java index 356698dd..f9d0fe94 100644 --- a/compilerCommon/src/main/java/android/databinding/tool/store/ResourceBundle.java +++ b/compilerCommon/src/main/java/android/databinding/tool/store/ResourceBundle.java @@ -584,12 +584,9 @@ public class ResourceBundle implements Serializable { : bundle.mDirectory != null) { return false; } - if (mFileName != null ? !mFileName.equals(bundle.mFileName) - : bundle.mFileName != null) { - return false; - } + return !(mFileName != null ? !mFileName.equals(bundle.mFileName) + : bundle.mFileName != null); - return true; } @Override @@ -702,11 +699,8 @@ public class ResourceBundle implements Serializable { if (!name.equals(that.name)) { return false; } - if (!type.equals(that.type)) { - return false; - } + return type.equals(that.type); - return true; } @Override |