Skip to content

Commit

Permalink
Remove vertx.javaCompilerOptions system property that is not document…
Browse files Browse the repository at this point in the history
…ed nor tested
  • Loading branch information
vietj committed Feb 6, 2024
1 parent 0101f33 commit 6719923
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
8 changes: 0 additions & 8 deletions src/main/java/io/vertx/core/impl/SysProps.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ public String get() {
*/
LOGGER_DELEGATE_FACTORY_CLASS_NAME("vertx.logger-delegate-factory-class-name"),

/**
* Pass options to the Java compiler when a .java verticle is compiled by Vert.x when deploying a source code verticle. The
* value should be a comma separated list of options.
*
* Not documented nor tested.
*/
JAVA_COMPILER_OPTIONS_PROP_NAME("vertx.javaCompilerOptions")

;

public final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,6 @@ public class CompilingClassLoader extends ClassLoader {

private static final Logger log = LoggerFactory.getLogger(CompilingClassLoader.class);


private final static List<String> COMPILER_OPTIONS;

static {
String props = SysProps.JAVA_COMPILER_OPTIONS_PROP_NAME.get();
if (props != null) {
String[] array = props.split(",");
List<String> compilerProps = new ArrayList<>(array.length);

for (String prop :array) {
compilerProps.add(prop.trim());
}
COMPILER_OPTIONS = Collections.unmodifiableList(compilerProps);
} else {
COMPILER_OPTIONS = null;
}
}

private final JavaSourceContext javaSourceContext;
private final MemoryFileManager fileManager;
public CompilingClassLoader(ClassLoader loader, String sourceName) {
Expand Down Expand Up @@ -90,7 +72,7 @@ public CompilingClassLoader(ClassLoader loader, String sourceName) {
// other .java resources from other modules

JavaFileObject javaFile = standardFileManager.getJavaFileForInput(StandardLocation.SOURCE_PATH, resolveMainClassName(), Kind.SOURCE);
JavaCompiler.CompilationTask task = javaCompiler.getTask(null, fileManager, diagnostics, COMPILER_OPTIONS, null, Collections.singleton(javaFile));
JavaCompiler.CompilationTask task = javaCompiler.getTask(null, fileManager, diagnostics, null, null, Collections.singleton(javaFile));
boolean valid = task.call();
if (valid) {
for (Diagnostic<?> d : diagnostics.getDiagnostics()) {
Expand Down

0 comments on commit 6719923

Please sign in to comment.