Skip to content

Commit

Permalink
Namespace generated class names
Browse files Browse the repository at this point in the history
Right now the bytecode module generates classnames that look like
com_facebook_presto_$gen_PageProcessor_28 with no package name. It's
annoying when you're trying to profile the code with VisualVM or the
like and you want to filter on package name.
  • Loading branch information
georgewfraser authored and martint committed Apr 27, 2017
1 parent c7a799b commit 0dc9452
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -55,9 +55,9 @@ private CompilerUtils()

public static ParameterizedType makeClassName(String baseName)
{
String className = "com.facebook.presto.$gen." + baseName + "_" + CLASS_ID.incrementAndGet();
String className = baseName + "_" + CLASS_ID.incrementAndGet();
String javaClassName = toJavaIdentifierString(className);
return ParameterizedType.typeFromJavaClassName(javaClassName);
return ParameterizedType.typeFromJavaClassName("com.facebook.presto.$gen." + javaClassName);
}

public static String toJavaIdentifierString(String className)
Expand Down

0 comments on commit 0dc9452

Please sign in to comment.