Skip to content

Commit 31728c1

Browse files
committed
revert rhino upgrade to 1.7.7 fix #624
1 parent cd8af55 commit 31728c1

4 files changed

Lines changed: 3 additions & 47 deletions

File tree

handlebars/src/main/java/com/github/jknack/handlebars/internal/js/RhinoHandlebars.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.util.Map;
2626
import java.util.Map.Entry;
2727

28-
import static org.mozilla.javascript.Context.FEATURE_INTEGER_WITHOUT_DECIMAL_PLACE;
2928
import org.mozilla.javascript.ContextFactory;
3029
import org.mozilla.javascript.NativeArray;
3130
import org.mozilla.javascript.NativeObject;
@@ -338,16 +337,7 @@ private org.mozilla.javascript.Context newContext() {
338337
* @return Context factory.
339338
*/
340339
private static ContextFactory newFactory() {
341-
return new ContextFactory() {
342-
@Override
343-
protected boolean hasFeature(final org.mozilla.javascript.Context cx,
344-
final int featureIndex) {
345-
if (featureIndex == FEATURE_INTEGER_WITHOUT_DECIMAL_PLACE) {
346-
return true;
347-
}
348-
return super.hasFeature(cx, featureIndex);
349-
}
350-
};
340+
return new ContextFactory();
351341
}
352342

353343
/**

handlebars/src/test/java/com/github/jknack/handlebars/i243/Issue243.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected Handlebars newHandlebars() {
2828
@Test
2929
public void zeroValueForJavaScriptHelper() throws IOException {
3030
shouldCompileTo("{{#each item}}{{getIndex @index}} {{/each}}",
31-
$("item", new Object[]{10, 20, 30 }), "0 1 2 ");
31+
$("item", new Object[]{10, 20, 30 }), "0.0 1.0 2.0 ");
3232
}
3333

3434
@Test

handlebars/src/test/java/com/github/jknack/handlebars/issues/Issue619.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<dependency>
9494
<groupId>org.mozilla</groupId>
9595
<artifactId>rhino</artifactId>
96-
<version>1.7.10</version>
96+
<version>1.7.7</version>
9797
</dependency>
9898

9999
<!-- Logging System -->

0 commit comments

Comments
 (0)