Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Encode java-valid names for EFun classes

  • Loading branch information...
commit 1dbc2cade8fa6a7e893fdcfb469c35cafe66bdf5 1 parent e29554c
@krestenkrab krestenkrab authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/main/java/erjang/EFun.java
View
3  src/main/java/erjang/EFun.java
@@ -280,10 +280,11 @@ public static EFun get_fun_with_handler(String module, String function, int arit
get_fun_class(arity);
+ String safe_module = JAVA_ID.matcher(module).matches() ? module : make_valid_java_id(module);
String safe_function = JAVA_ID.matcher(function).matches() ? function : make_valid_java_id(function);
StringBuffer sb = new StringBuffer();
String self_type = sb.append(EFUN_TYPE.getInternalName())
- .append(module).append(safe_function)
+ .append(safe_module).append(safe_function)
.append("Handler").append(arity).toString();
ClassWriter cw = new ClassWriter(true);
Please sign in to comment.
Something went wrong with that request. Please try again.