else on the next line
as requested by http://confluence.jetbrains.net/display/JET/Code+Conventions+for+Java (sed is your friend)
This commit is contained in:
@@ -277,7 +277,8 @@ public class JetTestUtils {
|
||||
|
||||
if ("//".equals(document.getCharsSequence().subSequence(lineStart, lineStart + 2).toString())) {
|
||||
resultLines.add(document.getCharsSequence().subSequence(lineStart + 2, lineEnd));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,8 @@ public class JetDiagnosticsTest extends JetLiteFixture {
|
||||
// TODO: check there's not syntax errors
|
||||
this.jetFile = null;
|
||||
this.expectedText = this.clearText = textWithMarkers;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
expectedText = textWithMarkers;
|
||||
clearText = CheckerTestUtil.parseDiagnosedRanges(expectedText, diagnosedRanges);
|
||||
this.javaFile = null;
|
||||
|
||||
@@ -53,7 +53,8 @@ public class JetDiagnosticsTestForever {
|
||||
long avg100 = avg(last100) / 1000 / 1000;
|
||||
long minMs = min / 1000 / 1000;
|
||||
System.out.println(dMs + "ms; avg=" + avg + "ms; avg10=" + avg10 + "ms; avg100=" + avg100 + "ms; min=" + minMs + "ms; iteration=" + i);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
System.out.println(dMs + "ms; iteration=" + i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,8 @@ public class ForTestCompileRuntime {
|
||||
File file = stack.pop();
|
||||
if (file.isDirectory()) {
|
||||
stack.addAll(Arrays.asList(file.listFiles()));
|
||||
} else if (file.getName().endsWith(".java")) {
|
||||
}
|
||||
else if (file.getName().endsWith(".java")) {
|
||||
r.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -81,12 +81,14 @@ abstract class ForTestCompileSomething {
|
||||
if (file.isFile()) {
|
||||
os.putNextEntry(new JarEntry(pop.getFirst()));
|
||||
Files.copy(file, os);
|
||||
} else if (file.isDirectory()) {
|
||||
}
|
||||
else if (file.isDirectory()) {
|
||||
for (File child : file.listFiles()) {
|
||||
String path = pop.getFirst().isEmpty() ? child.getName() : pop.getFirst() + "/" + child.getName();
|
||||
toCopy.add(new Pair<String, File>(path, child));
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,11 +86,14 @@ class NamespaceComparator {
|
||||
for (DeclarationDescriptor ad : nsa.getMemberScope().getAllDescriptors()) {
|
||||
if (ad instanceof ClassifierDescriptor) {
|
||||
classifierNames.add(ad.getName());
|
||||
} else if (ad instanceof PropertyDescriptor) {
|
||||
}
|
||||
else if (ad instanceof PropertyDescriptor) {
|
||||
propertyNames.add(ad.getName());
|
||||
} else if (ad instanceof FunctionDescriptor) {
|
||||
}
|
||||
else if (ad instanceof FunctionDescriptor) {
|
||||
functionNames.add(ad.getName());
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
throw new AssertionError("unknown member: " + ad);
|
||||
}
|
||||
}
|
||||
@@ -269,7 +272,8 @@ class NamespaceComparator {
|
||||
|
||||
if (prop.isVar()) {
|
||||
sb.append("var ");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
sb.append("val ");
|
||||
}
|
||||
if (!prop.getTypeParameters().isEmpty()) {
|
||||
@@ -297,7 +301,8 @@ class NamespaceComparator {
|
||||
sb.append(": ");
|
||||
if (valueParameter.getVarargElementType() != null) {
|
||||
new TypeSerializer(sb).serialize(valueParameter.getVarargElementType());
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
new TypeSerializer(sb).serialize(valueParameter.getType());
|
||||
}
|
||||
if (valueParameter.hasDefaultValue()) {
|
||||
@@ -308,7 +313,8 @@ class NamespaceComparator {
|
||||
public void serialize(Variance variance) {
|
||||
if (variance == Variance.INVARIANT) {
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
sb.append(variance);
|
||||
sb.append(' ');
|
||||
}
|
||||
|
||||
@@ -141,7 +141,8 @@ public class WriteSignatureTest extends TestCaseWithTmpdir {
|
||||
public void visit(String name, Object value) {
|
||||
if (name.equals(JvmStdlibNames.JET_METHOD_TYPE_PARAMETERS_FIELD)) {
|
||||
typeParameters = (String) value;
|
||||
} else if (name.equals(JvmStdlibNames.JET_METHOD_RETURN_TYPE_FIELD)) {
|
||||
}
|
||||
else if (name.equals(JvmStdlibNames.JET_METHOD_RETURN_TYPE_FIELD)) {
|
||||
returnType = (String) value;
|
||||
}
|
||||
}
|
||||
@@ -156,7 +157,8 @@ public class WriteSignatureTest extends TestCaseWithTmpdir {
|
||||
return new EmptyVisitor();
|
||||
}
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return new EmptyVisitor();
|
||||
}
|
||||
}
|
||||
@@ -182,7 +184,8 @@ public class WriteSignatureTest extends TestCaseWithTmpdir {
|
||||
return new EmptyVisitor();
|
||||
}
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return new EmptyVisitor();
|
||||
}
|
||||
}
|
||||
@@ -215,7 +218,8 @@ public class WriteSignatureTest extends TestCaseWithTmpdir {
|
||||
}
|
||||
if (allNulls) {
|
||||
return null;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,7 +718,8 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
public void visitProperty(JetProperty property) {
|
||||
if (property.getPropertyTypeRef() != null) {
|
||||
memberDeclarations.addPropertyDescriptor(descriptorResolver.resolvePropertyDescriptor(classDescriptor, parameterScope, property, JetTestUtils.DUMMY_TRACE));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// TODO : Caution: a cyclic dependency possible
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
@@ -728,7 +729,8 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
public void visitNamedFunction(JetNamedFunction function) {
|
||||
if (function.getReturnTypeRef() != null) {
|
||||
memberDeclarations.addFunctionDescriptor(descriptorResolver.resolveFunctionDescriptor(classDescriptor, parameterScope, function, JetTestUtils.DUMMY_TRACE));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// TODO : Caution: a cyclic dependency possible
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user