Prevent from generating functions with NaN identifier
@@ -49,7 +49,11 @@ public class MinifyingAliasProvider implements AliasProvider {
@Override
public String getStaticMethodAlias(MethodReference method) {
- return RenderingUtil.indexToId(lastSuffix++, startLetters);
+ String result;
+ do {
+ result = RenderingUtil.indexToId(lastSuffix++, startLetters);
+ } while (!usedAliases.add(result) || RenderingUtil.KEYWORDS.contains(result));
+ return result;
}
@Override
