str.equals("") replaced by str.isEmpty()
This commit is contained in:
@@ -58,7 +58,7 @@ public class ExpressionVisitor extends StatementVisitor {
|
||||
if (tokenType == JavaTokenType.OREQ) secondOp = "or";
|
||||
if (tokenType == JavaTokenType.GTGTGTEQ) secondOp = "cyclicShiftRight";
|
||||
|
||||
if (!secondOp.equals("")) // if not Kotlin operators
|
||||
if (!secondOp.isEmpty()) // if not Kotlin operators
|
||||
myResult = new AssignmentExpression(
|
||||
expressionToExpression(expression.getLExpression()),
|
||||
new BinaryExpression(
|
||||
|
||||
@@ -47,7 +47,7 @@ public class TypeVisitor extends PsiTypeVisitor<Type> {
|
||||
@Override
|
||||
public Type visitClassType(PsiClassType classType) {
|
||||
String classTypeName = createQualifiedName(classType);
|
||||
if (classTypeName.equals(""))
|
||||
if (classTypeName.isEmpty())
|
||||
classTypeName = getClassTypeName(classType);
|
||||
List<Type> resolvedClassTypeParams = createRawTypesForResolvedReference(classType);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class JavaToKotlinConverterTest extends LightDaemonAnalyzerTestCase {
|
||||
else if (javaFile.getParent().endsWith("/class")) actual = fileToKotlin(javaCode);
|
||||
else if (javaFile.getParent().endsWith("/file")) actual = fileToKotlin(javaCode);
|
||||
|
||||
assert !actual.equals("") : "Specify what is it: file, class, method, statement or expression";
|
||||
assert !actual.isEmpty() : "Specify what is it: file, class, method, statement or expression";
|
||||
|
||||
final File tmp = new File(kotlinPath + ".tmp");
|
||||
if (!expected.equals(actual)) writeStringToFile(tmp, actual);
|
||||
|
||||
Reference in New Issue
Block a user