From 13acee90d3b56b1189dfbc3c682afaaec98d7660 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sat, 14 Sep 2013 23:54:13 +0000 Subject: [PATCH] LUCENE-5207: Simpler without cast git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5207@1523361 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/expressions/js/JavascriptCompiler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java b/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java index cc8d22b2a15..bd85f64d573 100644 --- a/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java +++ b/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptCompiler.java @@ -531,7 +531,7 @@ public class JavascriptCompiler { if (expected == Type.INT_TYPE) { methodVisitor.push(truth); } else if (expected == Type.LONG_TYPE) { - methodVisitor.push((long) (truth ? 1 : 0)); + methodVisitor.push(truth ? 1L : 0L); } else if (expected == Type.DOUBLE_TYPE) { methodVisitor.push(truth ? 1. : 0.); } else {