From 5a13db5dc967367b9e3ec85bb5f07e65a1df09b7 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sun, 29 Apr 2012 22:24:59 +0200 Subject: Issue 366: don't call the getter twice, fixed for javac. --- .../resource/after-delombok/GetterLazyEahcToString.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'test/transform/resource/after-delombok/GetterLazyEahcToString.java') diff --git a/test/transform/resource/after-delombok/GetterLazyEahcToString.java b/test/transform/resource/after-delombok/GetterLazyEahcToString.java index a542061d..ce3555fe 100644 --- a/test/transform/resource/after-delombok/GetterLazyEahcToString.java +++ b/test/transform/resource/after-delombok/GetterLazyEahcToString.java @@ -10,8 +10,12 @@ class GetterLazyEahcToString { if (!(o instanceof GetterLazyEahcToString)) return false; final GetterLazyEahcToString other = (GetterLazyEahcToString)o; if (!other.canEqual((java.lang.Object)this)) return false; - if (this.getValue() == null ? other.getValue() != null : !this.getValue().equals((java.lang.Object)other.getValue())) return false; - if (this.value2 == null ? other.value2 != null : !this.value2.equals((java.lang.Object)other.value2)) return false; + final java.lang.Object this$value = this.getValue(); + final java.lang.Object other$value = other.getValue(); + if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false; + final java.lang.Object this$value2 = this.value2; + final java.lang.Object other$value2 = other.value2; + if (this$value2 == null ? other$value2 != null : !this$value2.equals(other$value2)) return false; return true; } @@ -25,8 +29,10 @@ class GetterLazyEahcToString { public int hashCode() { final int PRIME = 31; int result = 1; - result = result * PRIME + (this.getValue() == null ? 0 : this.getValue().hashCode()); - result = result * PRIME + (this.value2 == null ? 0 : this.value2.hashCode()); + final java.lang.Object $value = this.getValue(); + result = result * PRIME + ($value == null ? 0 : $value.hashCode()); + final java.lang.Object $value2 = this.value2; + result = result * PRIME + ($value2 == null ? 0 : $value2.hashCode()); return result; } -- cgit