src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CodeStore.java
Print this page
@@ -187,11 +187,11 @@
* Generate a string representing the function with {@code functionId} and {@code paramTypes}.
* @param functionId function id
* @param paramTypes parameter types
* @return a string representing the function
*/
- public static String getCacheKey(final int functionId, final Type[] paramTypes) {
+ public static String getCacheKey(final Object functionId, final Type[] paramTypes) {
final StringBuilder b = new StringBuilder().append(functionId);
if(paramTypes != null && paramTypes.length > 0) {
b.append('-');
for(final Type t: paramTypes) {
b.append(Type.getShortSignatureDescriptor(t));
@@ -273,11 +273,11 @@
}
}
@Override
public StoredScript load(final Source source, final String functionKey) {
- if (source.getLength() < minSize) {
+ if (belowThreshold(source)) {
return null;
}
final File file = getCacheFile(source, functionKey);