1818import de .uka .ilkd .key .gui .PositionedIssueString ;
1919import de .uka .ilkd .key .java .Position ;
2020import de .uka .ilkd .key .parser .Location ;
21- import de .uka .ilkd .key .proof .init .ProblemInitializer ;
2221import de .uka .ilkd .key .settings .Configuration ;
2322
2423import org .key_project .util .Streams ;
3534 * <p>
3635 * For setting up <code>javac</code> it uses the KeY project information about the bootpath and
3736 * classpath.
38- * Any issues found in the compilation are reported to a provided listener of type
39- * {@link ProblemInitializer.ProblemInitializerListener}.
4037 * <p>
4138 * Checking the target Java code can be enabled / disabled by providing the property
4239 * <code>-PKEY_JAVAC_DISABLE=true</code> / <code>-PKEY_JAVAC_DISABLE=false</code> on startup of KeY.
@@ -61,7 +58,7 @@ public static void main(String[] args) {
6158 var settings = new JavacSettings ();
6259 settings .readSettings (params );
6360
64- List <PositionedIssueString > result = check (null ,
61+ List <PositionedIssueString > result = check (
6562 Paths .get (params .getString ("bootClassPath" )),
6663 params .getStringList ("classPath" ).stream ().map (Paths ::get ).toList (),
6764 Paths .get (params .getString ("javaPath" )), settings ).get ();
@@ -93,11 +90,8 @@ public static void main(String[] args) {
9390
9491 /**
9592 * initiates the compilation check on the target Java source (the Java program to be verified)
96- * in a separate process (with another java runtime) and
97- * reports any issues to the provided <code>listener</code>
93+ * in a separate process (with another java runtime)
9894 *
99- * @param listener the {@link ProblemInitializer.ProblemInitializerListener} to be informed
100- * about any issues found in the target Java program
10195 * @param bootClassPath the {@link Path} referring to the path containing the core Java classes
10296 * @param classPath the {@link List} of {@link Path}s referring to the directory that make up
10397 * the target Java programs classpath
@@ -107,7 +101,6 @@ public static void main(String[] args) {
107101 * @return future providing the list of diagnostics
108102 */
109103 public static @ NonNull CompletableFuture <List <PositionedIssueString >> checkExternally (
110- ProblemInitializer .ProblemInitializerListener listener ,
111104 Path bootClassPath , List <Path > classPath , Path javaPath ,
112105 JavacSettings settings ) {
113106 if (Boolean .getBoolean ("KEY_JAVAC_DISABLE" )) {
@@ -177,11 +170,7 @@ public static void main(String[] args) {
177170
178171 /**
179172 * initiates the compilation check on the target Java source (the Java program to be verified)
180- * and
181- * reports any issues to the provided <code>listener</code>
182173 *
183- * @param listener the {@link ProblemInitializer.ProblemInitializerListener} to be informed
184- * about any issues found in the target Java program
185174 * @param bootClassPath the {@link Path} referring to the path containing the core Java classes
186175 * @param classPath the {@link List} of {@link Path}s referring to the directory that make up
187176 * the target Java programs classpath
@@ -191,7 +180,6 @@ public static void main(String[] args) {
191180 * @return future providing the list of diagnostics
192181 */
193182 public static @ NonNull CompletableFuture <List <PositionedIssueString >> check (
194- ProblemInitializer .ProblemInitializerListener listener ,
195183 Path bootClassPath , List <Path > classPath , Path javaPath ,
196184 JavacSettings settings ) {
197185 if (Boolean .getBoolean ("KEY_JAVAC_DISABLE" )) {
@@ -205,9 +193,6 @@ public static void main(String[] args) {
205193
206194 if (compiler == null ) {
207195 LOGGER .info ("Javac is not available in current java runtime. Javac check skipped" );
208- if (listener != null ) {
209- listener .reportStatus (null , "No javac compiler found. Java check disabled." );
210- }
211196 return CompletableFuture .completedFuture (Collections .emptyList ());
212197 }
213198
@@ -249,8 +234,9 @@ public static void main(String[] args) {
249234 }
250235
251236 if (bootClassPath != null ) {
252- options .add ("-bootclasspath" );
253- options .add (bootClassPath .toAbsolutePath ().toString ());
237+ // options.add("-bootclasspath");
238+ // options.add(bootClassPath.toAbsolutePath().toString());
239+ LOGGER .info ("The \" bootclasspath\" Option is set but not supported." );
254240 }
255241
256242 if (classPath != null && !classPath .isEmpty ()) {
@@ -277,6 +263,10 @@ public static void main(String[] args) {
277263 Iterable <? extends JavaFileObject > compilationUnits =
278264 fileManager .getJavaFileObjects (files .toArray (new Path [0 ]));
279265
266+ LOGGER .info (
267+ "running Javac check with following\n \t options: {},\n \t classes: {},\n \t compilation units: {}," ,
268+ options , classes , compilationUnits );
269+
280270 JavaCompiler .CompilationTask task = compiler .getTask (output , fileManager , diagnostics ,
281271 options , classes , compilationUnits );
282272
0 commit comments