--- old/src/jdk/nashorn/internal/objects/NativeString.java 2016-01-20 14:14:46.183064389 +0100 +++ new/src/jdk/nashorn/internal/objects/NativeString.java 2016-01-20 14:14:46.099064390 +0100 @@ -221,14 +221,6 @@ } @Override - public Object get(final long key) { - if (key >= 0 && key < value.length()) { - return String.valueOf(value.charAt((int)key)); - } - return super.get(key); - } - - @Override public Object get(final int key) { if (key >= 0 && key < value.length()) { return String.valueOf(value.charAt(key)); @@ -247,36 +239,11 @@ } @Override - public int getInt(final long key, final int programPoint) { - return JSType.toInt32MaybeOptimistic(get(key), programPoint); - } - - @Override public int getInt(final int key, final int programPoint) { return JSType.toInt32MaybeOptimistic(get(key), programPoint); } @Override - public long getLong(final Object key, final int programPoint) { - return JSType.toLongMaybeOptimistic(get(key), programPoint); - } - - @Override - public long getLong(final double key, final int programPoint) { - return JSType.toLongMaybeOptimistic(get(key), programPoint); - } - - @Override - public long getLong(final long key, final int programPoint) { - return JSType.toLongMaybeOptimistic(get(key), programPoint); - } - - @Override - public long getLong(final int key, final int programPoint) { - return JSType.toLongMaybeOptimistic(get(key), programPoint); - } - - @Override public double getDouble(final Object key, final int programPoint) { return JSType.toNumberMaybeOptimistic(get(key), programPoint); } @@ -287,11 +254,6 @@ } @Override - public double getDouble(final long key, final int programPoint) { - return JSType.toNumberMaybeOptimistic(get(key), programPoint); - } - - @Override public double getDouble(final int key, final int programPoint) { return JSType.toNumberMaybeOptimistic(get(key), programPoint); } @@ -309,12 +271,6 @@ } @Override - public boolean has(final long key) { - final int index = ArrayIndex.getArrayIndex(key); - return isValidStringIndex(index) || super.has(key); - } - - @Override public boolean has(final double key) { final int index = ArrayIndex.getArrayIndex(key); return isValidStringIndex(index) || super.has(key); @@ -333,12 +289,6 @@ } @Override - public boolean hasOwnProperty(final long key) { - final int index = ArrayIndex.getArrayIndex(key); - return isValidStringIndex(index) || super.hasOwnProperty(key); - } - - @Override public boolean hasOwnProperty(final double key) { final int index = ArrayIndex.getArrayIndex(key); return isValidStringIndex(index) || super.hasOwnProperty(key); @@ -350,12 +300,6 @@ } @Override - public boolean delete(final long key, final boolean strict) { - final int index = ArrayIndex.getArrayIndex(key); - return checkDeleteIndex(index, strict)? false : super.delete(key, strict); - } - - @Override public boolean delete(final double key, final boolean strict) { final int index = ArrayIndex.getArrayIndex(key); return checkDeleteIndex(index, strict)? false : super.delete(key, strict);