Use Java 7+ diamond operator in compiler modules

This commit is contained in:
Alexander Udalov
2017-04-01 02:28:36 +03:00
parent 37f435da93
commit d440f07111
187 changed files with 512 additions and 533 deletions
@@ -261,7 +261,7 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
);
}
Map<LanguageFeature, LanguageFeature.State> extraLanguageFeatures = new HashMap<LanguageFeature, LanguageFeature.State>(0);
Map<LanguageFeature, LanguageFeature.State> extraLanguageFeatures = new HashMap<>(0);
if (arguments.multiPlatform) {
extraLanguageFeatures.put(LanguageFeature.MultiPlatformProjects, LanguageFeature.State.ENABLED);
}
@@ -69,7 +69,7 @@ import static org.jetbrains.kotlin.cli.common.UtilsKt.checkKotlinPackageUsage;
import static org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation.NO_LOCATION;
public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
private static final Map<String, ModuleKind> moduleKindMap = new HashMap<String, ModuleKind>();
private static final Map<String, ModuleKind> moduleKindMap = new HashMap<>();
static {
moduleKindMap.put(K2JsArgumentConstants.MODULE_PLAIN, ModuleKind.PLAIN);
@@ -273,7 +273,7 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
configuration.put(JSConfigurationKeys.META_INFO, true);
}
List<String> libraries = new SmartList<String>();
List<String> libraries = new SmartList<>();
if (!arguments.noStdlib) {
libraries.add(0, PathUtil.getKotlinPathsForCompiler().getJsStdLibJarPath().getAbsolutePath());
}