changeset 7262:5e7640e45127

RT-37529: [Android] Boolean.hashCode(boolean) reference to JDK8 causes compile failure on Android Reviewed-by: snorthov Contributed-by: Johan Vos <johan@lodgon.com>
author kcr
date Thu, 12 Jun 2014 10:43:40 -0700
parents 169d6b8b6386
children e6fc9e16cece
files modules/graphics/src/main/java/com/sun/scenario/effect/impl/prism/PrFilterContext.java
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/scenario/effect/impl/prism/PrFilterContext.java	Thu Jun 12 09:52:47 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/scenario/effect/impl/prism/PrFilterContext.java	Thu Jun 12 10:43:40 2014 -0700
@@ -91,9 +91,17 @@
         return forceSW;
     }
 
+    /*
+     * Method copied from Boolean.hashCode(boolean) to remove dependency on
+     * 1.8 method in existing class
+     */
+    private static int hashCode(boolean value) {
+        return value ? 1231 : 1237;
+    }
+
     @Override
     public int hashCode() {
-        return getReferent().hashCode() ^ Boolean.hashCode(forceSW);
+        return getReferent().hashCode() ^ hashCode(forceSW);
     }
 
     @Override