Removed unnecessary final on local variables.

This commit is contained in:
Evgeny Gerashchenko
2013-03-13 14:11:44 +04:00
parent c24f1605f3
commit ec5331057a
284 changed files with 1135 additions and 1132 deletions
@@ -78,7 +78,7 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments> {
return INTERNAL_ERROR;
}
final List<String> argumentsSourceDirs = arguments.getSourceDirs();
List<String> argumentsSourceDirs = arguments.getSourceDirs();
if (!arguments.script &&
arguments.module == null &&
arguments.src == null &&
@@ -141,7 +141,7 @@ public class CompileEnvironmentUtil {
}
try {
Class namespaceClass = loader.loadClass(PackageClassUtils.getPackageClassName(FqName.ROOT));
final Method method = namespaceClass.getDeclaredMethod("project");
Method method = namespaceClass.getDeclaredMethod("project");
if (method == null) {
throw new CompileEnvironmentException("Module script " + moduleFile + " must define project() function");
}
@@ -162,10 +162,10 @@ public class CompileEnvironmentUtil {
}
// TODO: includeRuntime should be not a flag but a path to runtime
public static void writeToJar(ClassFileFactory factory, final OutputStream fos, @Nullable FqName mainClass, boolean includeRuntime) {
public static void writeToJar(ClassFileFactory factory, OutputStream fos, @Nullable FqName mainClass, boolean includeRuntime) {
try {
Manifest manifest = new Manifest();
final Attributes mainAttributes = manifest.getMainAttributes();
Attributes mainAttributes = manifest.getMainAttributes();
mainAttributes.putValue("Manifest-Version", "1.0");
mainAttributes.putValue("Created-By", "JetBrains Kotlin");
if (mainClass != null) {
@@ -193,7 +193,7 @@ public class CompileEnvironmentUtil {
@Override
public boolean process(File file) {
if (file.isDirectory()) return true;
final String relativePath = FileUtil.getRelativePath(unpackedRuntimePath, file);
String relativePath = FileUtil.getRelativePath(unpackedRuntimePath, file);
try {
stream.putNextEntry(new JarEntry(FileUtil.toSystemIndependentName(relativePath)));
FileInputStream fis = new FileInputStream(file);
@@ -198,7 +198,7 @@ public class JetCoreEnvironment {
projectEnvironment.addJarToClassPath(path);
}
else {
final VirtualFile root = applicationEnvironment.getLocalFileSystem().findFileByPath(path.getAbsolutePath());
VirtualFile root = applicationEnvironment.getLocalFileSystem().findFileByPath(path.getAbsolutePath());
if (root == null) {
report(WARNING, "Classpath entry points to a non-existent location: " + path);
return;
@@ -332,7 +332,7 @@ public class KotlinToJVMBytecodeCompiler {
@NotNull
private static GenerationState generate(
final JetCoreEnvironment environment,
JetCoreEnvironment environment,
AnalyzeExhaust exhaust,
boolean stubs) {
Project project = environment.getProject();
@@ -373,7 +373,7 @@ public class KotlinToJVMBytecodeCompiler {
@NotNull String scriptPath,
@Nullable List<AnalyzerScriptParameter> scriptParameters,
@Nullable List<JetScriptDefinition> scriptDefinitions) {
final MessageRenderer messageRenderer = MessageRenderer.PLAIN;
MessageRenderer messageRenderer = MessageRenderer.PLAIN;
GroupingMessageCollector messageCollector = new GroupingMessageCollector(new PrintingMessageCollector(System.err, messageRenderer, false));
Disposable rootDisposable = CompileEnvironmentUtil.createMockDisposable();
try {
@@ -269,7 +269,7 @@ public class ReplInterpreter {
@Nullable
private ScriptDescriptor doAnalyze(@NotNull JetFile psiFile, @NotNull MessageCollector messageCollector) {
final WritableScope scope = new WritableScopeImpl(
WritableScope scope = new WritableScopeImpl(
JetScope.EMPTY, module,
new TraceBasedRedeclarationHandler(trace), "Root scope in analyzeNamespace");