|
38 | 38 | import javax.annotation.concurrent.Immutable; |
39 | 39 | import javax.annotation.concurrent.ThreadSafe; |
40 | 40 | import javax.tools.JavaCompiler; |
| 41 | +import javax.tools.JavaFileManager.Location; |
41 | 42 | import javax.tools.JavaFileObject; |
42 | 43 | import javax.tools.JavaFileObject.Kind; |
43 | | -import javax.tools.Location; |
44 | 44 | import javax.tools.StandardLocation; |
45 | 45 | import org.apiguardian.api.API; |
46 | 46 | import org.apiguardian.api.API.Status; |
|
58 | 58 | @Immutable |
59 | 59 | @ThreadSafe |
60 | 60 | public final class JctCompilationFactoryImpl implements JctCompilationFactory { |
| 61 | + |
61 | 62 | private static final Logger LOGGER = LoggerFactory.getLogger(JctCompilationFactoryImpl.class); |
62 | 63 |
|
63 | 64 | private final JctCompiler<?, ?> compiler; |
@@ -143,14 +144,14 @@ private JctCompilation createCheckedCompilation( |
143 | 144 | } |
144 | 145 |
|
145 | 146 | private Set<JavaFileObject> findCompilationUnits(JctFileManager fileManager) throws IOException { |
146 | | - var locations = IterableUtils |
| 147 | + Collection<Location> locations = IterableUtils |
147 | 148 | .flatten(fileManager.listLocationsForModules(StandardLocation.MODULE_SOURCE_PATH)); |
148 | 149 |
|
149 | 150 | if (locations.isEmpty()) { |
150 | 151 | LOGGER.info( |
151 | 152 | "No multi-module sources found, will use the source path to find classes to compile" |
152 | 153 | ); |
153 | | - locations = Set.of(StandardLocation.SOURCE_PATH); |
| 154 | + locations = List.of(StandardLocation.SOURCE_PATH); |
154 | 155 | } else { |
155 | 156 | LOGGER.info( |
156 | 157 | "Multi-module sources found, will use the module source path to find classes to compile" |
|
0 commit comments