diff --git a/java/codeserver/highlighting/resources/messages/JavaCompilationErrorBundle.properties b/java/codeserver/highlighting/resources/messages/JavaCompilationErrorBundle.properties index c38045263836..812f21da5f90 100644 --- a/java/codeserver/highlighting/resources/messages/JavaCompilationErrorBundle.properties +++ b/java/codeserver/highlighting/resources/messages/JavaCompilationErrorBundle.properties @@ -10,10 +10,10 @@ annotation.not.allowed.var='var' type may not be annotated annotation.not.allowed.class=Class literal type may not be annotated annotation.not.allowed.ref=Annotation is not applicable to this kind of reference annotation.not.allowed.static=Static member qualifying type may not be annotated -annotation.not.allowed.on.package=Package annotations should be in file package-info.java +annotation.not.allowed.on.package=Package annotations should be in the package-info.java file annotation.not.allowed.in.permit.list=Annotations not allowed in 'permits' list annotation.type.expected=Annotation type expected -annotation.missing.attribute={0} missing though required +annotation.missing.attribute={0} missing but required annotation.repeated.target=Repeated annotation target annotation.attribute.name.missing=Annotation attribute of the form 'name=value' expected annotation.attribute.unknown.method=Cannot find @interface method ''{0}()'' @@ -29,7 +29,7 @@ annotation.member.invalid.type=Invalid type ''{0}'' for annotation member annotation.member.clash=@interface member clashes with ''{0}'' in {1} annotation.may.not.have.extends.list='extends' not allowed on @interface annotation.cyclic.element.type=Cyclic annotation element type -annotation.container.wrong.place=Container annotation ''{0}'' must not be present at the same time as the element it contains +annotation.container.wrong.place=Container annotation ''{0}'' must not be present together with the element it contains annotation.container.not.applicable=Container annotation ''@{0}'' is not applicable to {1} annotation.duplicate=Duplicate annotation annotation.duplicate.explained=Duplicate annotation. {0} @@ -42,15 +42,15 @@ annotation.container.missed.annotation=Container annotation ''{0}'' does not hav annotation.container.no.value=Invalid container annotation ''{0}'': no ''value'' method declared annotation.container.bad.type=Invalid container annotation ''{0}'': ''value'' method should have type ''{1}'' annotation.container.low.retention=Container annotation ''{0}'' has shorter retention (''{1}'') than the contained annotation -annotation.container.wide.target=Target of container annotation ''{0}'' is not a subset of target of this annotation +annotation.container.wide.target=Target of container annotation ''{0}'' is not a subset of this annotation\u2019s target annotation.container.abstract=Container annotation ''{0}'' does not have a default value for ''{1}'' lambda.not.a.functional.interface={0} is not a functional interface lambda.no.target.method.found=No target method found lambda.multiple.sam.candidates=Multiple non-overriding abstract methods found in {0} lambda.sam.generic=Target method is generic -lambda.sealed.functional.interface=Functional interface can't be declared as 'sealed' -lambda.not.expected=Lambda expression not expected here +lambda.sealed.functional.interface=Functional interface cannot be declared as 'sealed' +lambda.not.expected=Unexpected lambda expression lambda.parameters.inconsistent.var=Cannot mix 'var' and explicitly typed parameters in lambda expression lambda.sealed=Lambda cannot implement a sealed interface lambda.type.inference.failure=Cannot infer functional interface type @@ -80,7 +80,7 @@ safe.varargs.on.record.component=@SafeVarargs is not allowed on a record compone safe.varargs.on.fixed.arity=@SafeVarargs is not allowed on methods with fixed arity safe.varargs.on.non.final.method=@SafeVarargs is not allowed on non-final instance methods -receiver.wrong.context=Receivers are not allowed outside of method parameter list +receiver.wrong.context=Receivers are not allowed outside of method\u2019s parameter list receiver.static.context=The receiver cannot be used in a static context receiver.wrong.position=The receiver should be the first parameter receiver.type.mismatch=The receiver type does not match the enclosing class type @@ -105,7 +105,7 @@ class.sealed.no.inheritors=Sealed class must have subclasses class.sealed.incomplete.permits=Sealed class permits clause must contain all subclasses class.sealed.inheritor.expected.modifiers.can.be.final=Modifier 'sealed', 'non-sealed' or 'final' expected class.sealed.inheritor.expected.modifiers=Modifier 'sealed' or 'non-sealed' expected -class.sealed.permits.on.non.sealed=Invalid permits clause: ''{0}'' must be sealed +class.sealed.permits.on.non.sealed=Invalid ''permits'' clause: ''{0}'' must be sealed class.cannot.extend.multiple.classes=Class cannot extend multiple classes class.implements.class=Interface expected here class.extends.interface=No interface expected here @@ -126,7 +126,7 @@ class.inheritance.method.clash=Methods {0} from {1} and {2} from {3} are inherit class.not.accessible=Cannot access {0} class.generic.extends.exception=Generic class may not extend 'java.lang.Throwable' class.initializer.must.complete.normally=Initializer must be able to complete normally -class.permitted.not.direct.subclass=Invalid permits clause: ''{0}'' must directly {1, choice, 1#extend|2#implement} ''{2}'' +class.permitted.not.direct.subclass=Invalid ''permits'' clause: ''{0}'' must directly {1, choice, 1#extend|2#implement} ''{2}'' class.permitted.must.have.modifier=All sealed class subclasses must either be final, sealed or non-sealed class.or.package.expected=Expected class or package @@ -144,12 +144,12 @@ interface.class.initializer=Class initializer is not allowed in interface interface.implements='implements' not allowed on interface interface.extends.class=Interface expected here -record.instance.initializer=Instance initializer is not allowed in record -record.instance.field=Instance field is not allowed in record +record.instance.initializer=Instance initializer is not allowed in records +record.instance.field=Instance field is not allowed in records record.no.header=Record has no header declared record.header.regular.class=Record header declared for non-record -record.extends='extends' not allowed on record -record.permits='permits' not allowed on record +record.extends='extends' not allowed on records +record.permits='permits' not allowed on records record.component.vararg.not.last=Vararg record component must be the last in the list record.component.cstyle.declaration=C-style array declaration not allowed in record component record.component.restricted.name=Illegal record component name ''{0}'' @@ -158,7 +158,7 @@ record.accessor.wrong.return.type=Incorrect component accessor return type. Expe record.accessor.non.public=Record component accessor must be 'public' record.constructor.stronger.access={0} access level cannot be more restrictive than the record access level (''{1}'') record.special.method.type.parameters={0} cannot have type parameters -record.special.method.throws={0} should not declare ''throws'' clause +record.special.method.throws={0} should not declare a ''throws'' clause record.canonical.constructor.wrong.parameter.type=Incorrect parameter type for record component ''{0}''. Expected: ''{1}'', found: ''{2}'' record.canonical.constructor.wrong.parameter.name=Canonical constructor parameter names must match record component names. Expected: ''{0}'', found: ''{1}'' record.no.constructor.call.in.non.canonical=Non-canonical record constructor must delegate to another constructor @@ -198,7 +198,7 @@ type.parameter.actual.inferred.mismatch=Actual type argument and inferred type c method.duplicate=''{0}'' is already defined in ''{1}'' method.throws.class.name.expected=Class name expected -method.interface.body=Interface abstract methods cannot have body +method.interface.body=Interface abstract methods cannot have a body method.abstract.body=Abstract methods cannot have a body method.abstract.in.non.abstract.class=Abstract method in non-abstract class method.native.body=Native methods cannot have a body @@ -214,7 +214,7 @@ method.static.overrides.instance=Static method ''{0}'' in ''{1}'' cannot overrid method.overrides.final=''{0}'' cannot override ''{1}'' in ''{2}''; overridden method is final method.inheritance.weaker.privileges={0}; attempting to assign weaker access privileges (''{1}''); was ''{2}'' method.inheritance.clash.unrelated.return.types={0}; methods have unrelated return types -method.inheritance.clash.incompatible.return.types={0}; attempting to use incompatible return type +method.inheritance.clash.incompatible.return.types={0}; incompatible return type method.inheritance.clash.does.not.throw={0}; overridden method does not throw ''{1}'' method.no.parameter.list=Parameter list expected method.missing.return.type=Invalid method declaration; return type required @@ -225,7 +225,7 @@ clash.methods.message=''{0}'' clashes with ''{1}'' clash.methods.message.show.classes=''{0}'' in ''{2}'' clashes with ''{1}'' in ''{3}'' constructor.ambiguous.implicit.call=Ambiguous implicit constructor call: both ''{0}'' and ''{1}'' match -constructor.no.default=There is no parameterless constructor available in ''{0}'' +constructor.no.default=There is no no-arg constructor available in ''{0}'' constructor.in.implicit.class=Explicit constructor in implicitly declared class is not allowed type.incompatible=Incompatible types. Found: ''{1}'', required: ''{0}'' @@ -235,7 +235,7 @@ type.incompatible.reason.ambiguous.method.reference=reason: method reference is type.incompatible.reason.inference=reason: {0} type.void.not.allowed='void' type is not allowed here type.void.illegal=Illegal type: 'void' -type.inaccessible=''{0}'' is inaccessible here +type.inaccessible=''{0}'' is inaccessible from here type.restricted.identifier=Illegal reference to restricted type ''{0}'' type.unknown.class=Unknown class: ''{0}'' type.argument.primitive=Type argument cannot be of a primitive type @@ -245,9 +245,9 @@ type.argument.on.raw.method=Type arguments given on a raw method type.argument.in.permits.list=Generics are not allowed in permits list type.wildcard.cannot.be.instantiated=Wildcard type ''{0}'' cannot be instantiated directly type.wildcard.not.expected=No wildcard expected -type.wildcard.may.be.used.only.as.reference.parameters=Wildcards may be used only as reference parameters +type.wildcard.may.be.used.only.as.reference.parameters=Wildcards may only be used as reference parameters -lvti.no.initializer=Cannot infer type: 'var' on variable without initializer +lvti.no.initializer=Cannot infer type: 'var' on variable without an initializer lvti.lambda=Cannot infer type: lambda expression requires an explicit target type lvti.method.reference=Cannot infer type: method reference requires an explicit target type lvti.array='var' is not allowed as an element type of an array @@ -273,12 +273,12 @@ foreach.not.applicable=Foreach not applicable to type ''{0}'' new.expression.qualified.malformed=Invalid qualified new new.expression.qualified.static.class=Qualified new of static class -new.expression.qualified.anonymous.implements.interface=Anonymous class implements interface; cannot have qualifier for new +new.expression.qualified.anonymous.implements.interface=Unexpected qualifier for anonymous class implementing interface new.expression.qualified.qualified.class.reference=Qualified class reference is not allowed in qualified new new.expression.diamond.not.allowed=Diamond operator is not allowed here -new.expression.diamond.not.applicable=Diamond operator is not applicable for non-parameterized types +new.expression.diamond.not.applicable=Diamond operator is not applicable to non-parameterized types new.expression.diamond.inference.failure={0} -new.expression.diamond.anonymous.inner.non.private=Cannot use '<>' due to non-private method which doesn't override or implement a method from a supertype +new.expression.diamond.anonymous.inner.non.private=Cannot use '<>' due to a non-private method which doesn't override or implement a method from a supertype new.expression.anonymous.implements.interface.with.type.arguments=Anonymous class implements interface; cannot have type arguments new.expression.arguments.to.default.constructor.call=Default constructor is invoked with arguments new.expression.unresolved.constructor=Cannot resolve constructor ''{0}'' @@ -309,14 +309,14 @@ statement.bad.expression=Not a statement statement.unreachable=Unreachable statement statement.unreachable.loop.body=Loop condition is always false making the loop body unreachable -switch.rule.should.produce.result=Switch expression rule should produce result in all execution paths +switch.rule.should.produce.result=Switch expression rule should produce a result in all execution paths switch.expression.no.result=Switch expression does not have any result expressions -switch.expression.should.produce.result=Switch expression should produce result in all execution paths +switch.expression.should.produce.result=Switch expression should produce a result in all execution paths switch.expression.incompatible.type=Bad type in switch expression: {0} cannot be converted to {1} switch.expression.cannot.be.void=Target type for switch expression cannot be void guard.misplaced=Guard is allowed after patterns only -guard.evaluated.to.false=This case label has a guard that is a constant expression with value 'false' +guard.evaluated.to.false=Case label has a guard that is a constant expression with value 'false' comment.shebang.java.file=Shebang mechanism in .java files is not permitted comment.unclosed=Unclosed comment @@ -338,20 +338,20 @@ literal.string.illegal.escape=Illegal escape character in string literal literal.text.block.unclosed=Unclosed text block literal.text.block.no.new.line=Illegal text block start: missing new line after opening quotes -#{0} - exceptions list (comma separated), {1} - exceptions count in the list +#{0} - exception list (comma separated), {1} - exceptions count in the list exception.unhandled=Unhandled {1, choice, 0#exception|2#exceptions}: {0} -#{0} - exceptions list (comma separated), {1} - exceptions count in the list +#{0} - exception list (comma separated), {1} - exceptions count in the list exception.unhandled.close=Unhandled {1, choice, 0#exception|2#exceptions} from auto-closeable resource: {0} exception.must.be.disjoint=Types in multi-catch must be disjoint: ''{0}'' is a subclass of ''{1}'' exception.already.caught=Exception ''{0}'' has already been caught exception.never.thrown.try=Exception ''{0}'' is never thrown in the corresponding try block exception.never.thrown.try.multi=Exception ''{0}'' is never thrown in the corresponding try block -call.super.enum.constructor=Call to super is not allowed in enum constructor +call.super.enum.constructor=Call to 'super' is not allowed in enum constructor call.super.qualifier.not.inner.class=Qualifier is not allowed because superclass ''{0}'' is not a non-static inner class call.expected=Method call expected call.static.interface.method.qualifier=Static method may only be called on its containing interface -call.formal.varargs.element.type.inaccessible.here=Formal varargs element type {0} is inaccessible here +call.formal.varargs.element.type.inaccessible.here=Formal varargs element type {0} is inaccessible from here call.type.inference.error={0} call.wrong.arguments=''{0}'' in ''{1}'' cannot be applied to ''{2}'' call.wrong.arguments.count.mismatch=Expected {0, choice, 0#no arguments|1#1 argument|1<{0} arguments} but found {1} @@ -407,7 +407,7 @@ variable.already.assigned=Variable ''{0}'' might already have been assigned to variable.already.assigned.constructor=Cannot assign final field ''{0}'' after chained constructor call variable.already.assigned.field=Final field ''{0}'' is already initialized in another field initializer variable.already.assigned.initializer=Final field ''{0}'' is already initialized in a class initializer -variable.assigned.in.loop=Variable ''{0}'' might be assigned in loop +variable.assigned.in.loop=Variable ''{0}'' might be assigned in a loop variable.already.defined=Variable ''{0}'' is already defined in the scope field.not.initialized=Field ''{0}'' might not have been initialized field.initialized.before.constructor.call=Cannot assign initialized field ''{0}'' before superclass constructor is called @@ -431,9 +431,9 @@ expression.super.no.enclosing.instance=No enclosing instance of type ''{0}'' is expression.super.unqualified.default.method=Unqualified super reference is not allowed in extension method expression.qualified.class.expected=Class name expected here expression.class.type.parameter=Cannot access class object of a type parameter -expression.class.parameterized.type=Cannot access class object of parameterized type +expression.class.parameterized.type=Cannot access class object of a parameterized type -resource.declaration.or.variable.expected=Declaration, final or effectively final variable expected +resource.declaration.or.variable.expected=Declaration, final, or effectively final variable expected assignment.declared.outside.guard=Cannot assign a value to variable ''{0}'', because it is declared outside the guard assignment.to.final.variable=Cannot assign a value to final variable ''{0}'' @@ -468,7 +468,7 @@ import.static.on.demand.resolves.to.class=Class {0} not found import.list.extra.semicolon=Extra semicolons between import statements are not allowed import.module.not.allowed=Import module is not allowed -underscore.identifier=Since Java 9, '_' is a keyword, and may not be used as an identifier +underscore.identifier=Since Java 9, '_' is a keyword and may not be used as an identifier underscore.identifier.unnamed=Using '_' as a reference is not allowed underscore.identifier.lambda=Use of '_' as a lambda parameter name is not allowed @@ -489,7 +489,7 @@ return.missing=Missing return statement catch.type.parameter=Cannot catch type parameters -module.no.package=A module file should not have 'package' statement +module.no.package=A module file should not have a 'package' statement module.conflicting.packages=Package ''{0}'' exists in another module: {1} module.conflicting.reads=Module ''{0}'' reads package ''{1}'' from both ''{2}'' and ''{3}'' module.file.wrong.name=Module declaration should be in a file named 'module-info.java' @@ -510,7 +510,7 @@ module.service.inner=The service implementation is an inner class: {0} module.service.no.constructor=The service implementation does not have a public default constructor: {0} module.not.found=Module not found: {0} module.not.on.path=Module is not in dependencies: {0} -module.cyclic.dependence=Cyclic dependence: {0} +module.cyclic.dependence=Cyclic dependency: {0} module.duplicate.exports.target=Duplicate ''exports'' target: {0} module.duplicate.opens.target=Duplicate ''opens'' target: {0} module.duplicate.implementation=Duplicate implementation: {0} diff --git a/java/java-analysis-api/resources/messages/JavaAnalysisBundle.properties b/java/java-analysis-api/resources/messages/JavaAnalysisBundle.properties index 549489015d13..5202acd2f18f 100644 --- a/java/java-analysis-api/resources/messages/JavaAnalysisBundle.properties +++ b/java/java-analysis-api/resources/messages/JavaAnalysisBundle.properties @@ -412,12 +412,12 @@ inspection.contract.checker.contract.violated=Contract clause ''{0}'' is violate inspection.contract.checker.no.exception.thrown=Contract clause ''{0}'' is violated: no exception is thrown inspection.contract.checker.method.always.fails.trivial=Return value of clause ''{0}'' could be replaced with ''fail'' as method always fails inspection.contract.checker.method.always.fails.nontrivial=Return value of clause ''{0}'' could be replaced with ''fail'' as method always fails in this case -contract.return.validator.not.applicable.for.constructor=not applicable for constructor -contract.return.validator.not.applicable.static=not applicable for static method -contract.return.validator.not.applicable.primitive=not applicable for primitive return type ''{0}'' +contract.return.validator.not.applicable.for.constructor=not applicable to constructor +contract.return.validator.not.applicable.static=not applicable to static method +contract.return.validator.not.applicable.primitive=not applicable to primitive return type ''{0}'' contract.return.validator.return.type.must.be.boolean=method return type must be 'boolean' contract.return.validator.method.return.incompatible.with.method.containing.class=method return type should be compatible with method containing class -contract.return.validator.too.few.parameters=not applicable for method that has {0, choice, 0#no parameters|1#one parameter|2#{0} parameters} +contract.return.validator.too.few.parameters=not applicable to method that has {0, choice, 0#no parameters|1#one parameter|2#{0} parameters} contract.return.validator.incompatible.return.parameter.type=return type ''{0}'' must be convertible from parameter type ''{1}'' contract.return.value.validation.prefix=Contract return value ''{0}'': suspicious.invocation.handler.implementation.display.name=Suspicious 'InvocationHandler' implementation diff --git a/java/java-frontback-psi-api/resources/messages/JavaPsiBundle.properties b/java/java-frontback-psi-api/resources/messages/JavaPsiBundle.properties index e0153089fc57..6d69410a7165 100644 --- a/java/java-frontback-psi-api/resources/messages/JavaPsiBundle.properties +++ b/java/java-frontback-psi-api/resources/messages/JavaPsiBundle.properties @@ -263,7 +263,7 @@ diamond.error.explicit.type.parameters.for.constructor=Cannot use diamonds with diamond.error.cannot.infer.arguments=Cannot infer arguments diamond.error.cannot.infer.arguments.unable.to.resolve.constructor=Cannot infer arguments (unable to resolve constructor) diamond.error.anonymous.inner.classes=Cannot use '<>' with anonymous inner classes -diamond.error.anonymous.inner.classes.non.private=Cannot use '<>' due to non-private method which doesn't override or implement a method from a supertype +diamond.error.anonymous.inner.classes.non.private=Cannot use '<>' due to a non-private method which doesn't override or implement a method from a supertype diamond.error.cannot.infer.type.arguments=Cannot infer type arguments for {0} error.incompatible.type.no.type.variable=no instance(s) of type variable(s) exist so that {0} error.incompatible.type.no.type.variable.0=no instance(s) of type variable(s) {0} exist so that {1} diff --git a/java/java-psi-impl/resources/messages/JavaErrorBundle.properties b/java/java-psi-impl/resources/messages/JavaErrorBundle.properties index 691c355e2eb2..8b80e368d376 100644 --- a/java/java-psi-impl/resources/messages/JavaErrorBundle.properties +++ b/java/java-psi-impl/resources/messages/JavaErrorBundle.properties @@ -53,7 +53,7 @@ switch.pattern.expected=Pattern expected for switch selector type ''{0}'' unexpected.type=Unexpected type. Found: ''{1}'', required: ''{0}'' incompatible.types.reason.ambiguous.method.reference=
reason: method reference is ambiguous: both ''{0}'' and ''{1}'' match incompatible.switch.null.type=''{0}'' cannot be converted to ''{1}'' -inaccessible.type=''{0}'' is inaccessible here +inaccessible.type=''{0}'' is inaccessible from here valid.switch.selector.types=byte, char, short or int valid.switch.1_7.selector.types=char, byte, short, int, Character, Byte, Short, Integer, String, or an enum switch.illegal.fall.through.to=Illegal fall-through to a pattern diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advFixture/ProtectedInnerClass.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advFixture/ProtectedInnerClass.java index f4691531e36d..aefe713fe10a 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advFixture/ProtectedInnerClass.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advFixture/ProtectedInnerClass.java @@ -3,8 +3,8 @@ import a.*; public class Foo { private T f() { return null;} void m(Outer o){ - o.get(f()); + o.get(f()); o.get1(); - o.f = f(); + o.f = f(); } } \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AccessLevelClash.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AccessLevelClash.java index 26e9273d0b8a..077b6873bcc6 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AccessLevelClash.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AccessLevelClash.java @@ -7,7 +7,7 @@ public class a implements i { void ff() {} } class ai implements i { - public int ff() { return 0;} + public int ff() { return 0;} } class c2 implements i { @@ -29,7 +29,7 @@ class c4 extends c3 { private String fff(String s) throws java.io.IOException { return null; } } class c4i extends c3 { - protected Object g() {return null;} + protected Object g() {return null;} } // sibling inheritance @@ -39,7 +39,7 @@ interface i5 { void ff(); } } class c7 { public String ff() { return null;} } -class c8 extends c7 implements i5 { +class c8 extends c7 implements i5 { } // interface should not clash with Object @@ -47,9 +47,9 @@ interface A { Object clone() throws CloneNotSupportedException; void finalize(); - void hashCode(); - void equals(Object o); - void toString(); + void hashCode(); + void equals(Object o); + void toString(); } interface ConflictWithObject { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AssignToFinal.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AssignToFinal.java index bafb320ab464..59ead95c3b7f 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AssignToFinal.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AssignToFinal.java @@ -126,7 +126,7 @@ class T29a { private final int j; T29a (int b) { do { - j = 34; // not guaranteed by JLS to only be executed once + j = 34; // not guaranteed by JLS to only be executed once if (j > 0) break; } while (b == 1); } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/CanHaveBody.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/CanHaveBody.java index f5fb7db7e802..b1195c2d67db 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/CanHaveBody.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/CanHaveBody.java @@ -12,5 +12,5 @@ abstract public class a1 { } interface ii { - int iif(int i) throws Exception { return 2; } + int iif(int i) throws Exception { return 2; } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/QualifiedNew.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/QualifiedNew.java index 293092b389e9..1a0cc4cb4b29 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/QualifiedNew.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/QualifiedNew.java @@ -29,7 +29,7 @@ class WithAnonym { class WithAnonymInheritor extends WithAnonym { { - this.new I() {}; + this.new I() {}; this.new Inner() {}; } } \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/StaticOverride.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/StaticOverride.java index 1ae5808438fc..3db96fb51612 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/StaticOverride.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/StaticOverride.java @@ -22,7 +22,7 @@ interface ii { int f(); } -abstract class c_a1_ii extends a1 implements ii { +abstract class c_a1_ii extends a1 implements ii { } interface i2 { @@ -94,7 +94,7 @@ class StA { } } class StB extends StA { - public static String createInstance() { + public static String createInstance() { return null; } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/UnhandledExceptionsInSuperclass.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/UnhandledExceptionsInSuperclass.java index a126736a5d0f..65732f8a5ff0 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/UnhandledExceptionsInSuperclass.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/UnhandledExceptionsInSuperclass.java @@ -7,11 +7,11 @@ class a { // super ctr -class b extends a { +class b extends a { } class c extends a { - c() { + c() { } c(String s) { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/Unreachable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/Unreachable.java index dc9f5ea118a2..e9a4a2156609 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/Unreachable.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/Unreachable.java @@ -475,7 +475,7 @@ class ManyExitsFromTry { outer: { while (true) { - i = 1; + i = 1; try { if (i > 1) continue; if (i > 2) break; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/VarDoubleInitialization.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/VarDoubleInitialization.java index 1db2c766cb6a..abfc1ac6bd65 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/VarDoubleInitialization.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/VarDoubleInitialization.java @@ -35,7 +35,7 @@ public class a21 { void f7(int i) { final int j; while (i < 4) { - j = 2; + j = 2; final int ii = 4; i+=ii; } @@ -130,7 +130,7 @@ class A { final int k; A() { for (;;) { - k=0; + k=0; } } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEADEV11877.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEADEV11877.java index 2d44f189d2e0..1f6501c117c9 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEADEV11877.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEADEV11877.java @@ -3,7 +3,7 @@ interface MyCloneable { //protected method from java.lang.Object is not implicitly declared in interface with no base interfaces int clone(); - int toString(); + int toString(); } interface MyCloneable1 { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/InaccessibleInferredTypeForVarargsArgument.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/InaccessibleInferredTypeForVarargsArgument.java index dfca5d808ce2..97e6a288364c 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/InaccessibleInferredTypeForVarargsArgument.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/InaccessibleInferredTypeForVarargsArgument.java @@ -2,7 +2,7 @@ import java.util.Arrays; class Test { { - Arrays.asList(new Outer.B(), new Outer.C()); + Arrays.asList(new Outer.B(), new Outer.C()); } } @@ -19,6 +19,6 @@ class An { class C { { - An.foo(); + An.foo(); } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/SwitchByInaccessibleEnum.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/SwitchByInaccessibleEnum.java index 70f2fa1656c1..afffaa1cc99b 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/SwitchByInaccessibleEnum.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/SwitchByInaccessibleEnum.java @@ -13,7 +13,7 @@ interface A { class D { public static void f(A a) { A.B b = a.getB(); - switch (b.c) { + switch (b.c) { case SOME: break; } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/DiamondsWithAnonymousDiamond.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/DiamondsWithAnonymousDiamond.java index f1583ad926d7..47aca216b40b 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/DiamondsWithAnonymousDiamond.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/DiamondsWithAnonymousDiamond.java @@ -18,7 +18,7 @@ class Outer { @Override public void m() {} }; - I i2 = new I<>() { + I i2 = new I<>() { @Override public void m() {} public void m1() {} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/TryWithResources.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/TryWithResources.java index 6b925b6f2e8f..6642929fc622 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/TryWithResources.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/TryWithResources.java @@ -52,7 +52,7 @@ class TryWithResources { } void testMoreUsefulParseForIncorrectExpression() { - try (new Resource()) {} - try (Resource.create()) {} + try (new Resource()) {} + try (Resource.create()) {} } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/Underscore.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/Underscore.java index ee761aaae5c3..81e17be592fa 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/Underscore.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting9/Underscore.java @@ -1,3 +1,3 @@ class Undescore { - void _() { } + void _() { } } \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatterns/UnnamedPatternsUnavailable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatterns/UnnamedPatternsUnavailable.java index 495c82e6c5a1..489d91139efa 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatterns/UnnamedPatternsUnavailable.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatterns/UnnamedPatternsUnavailable.java @@ -2,7 +2,7 @@ public class UnnamedPatterns { record R(int a, int b) {} void test(Object obj) { - if (obj instanceof _) {} + if (obj instanceof _) {} if (obj instanceof R(_, _)) {} if (obj instanceof R(int a, _)) { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatternsInSwitch/SwitchExprHasResult.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatternsInSwitch/SwitchExprHasResult.java index 98d42921a745..293a8e1f2735 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatternsInSwitch/SwitchExprHasResult.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatternsInSwitch/SwitchExprHasResult.java @@ -39,7 +39,7 @@ class Test { String nestedPattern(Object o) { return switch (o) { - default -> { + default -> { switch (o) { case Integer i -> { System.out.println(); // completes normally diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatternsInSwitch/WhenExpressionIsFalse.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatternsInSwitch/WhenExpressionIsFalse.java index 52c7af4c2acc..2889fea66361 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatternsInSwitch/WhenExpressionIsFalse.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingPatternsInSwitch/WhenExpressionIsFalse.java @@ -2,9 +2,9 @@ public class Main { void foo(Object obj) { final boolean flag = false; switch (obj) { - case String s when false -> {} + case String s when false -> {} case String s when s.length() < 0 -> {} - case String s when ((flag || flag)) && 1 < 0 -> {} + case String s when ((flag || flag)) && 1 < 0 -> {} default -> {} } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordAccessors.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordAccessors.java index 6ba7787a13d7..6532eec2a3ef 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordAccessors.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordAccessors.java @@ -15,7 +15,7 @@ record RecNonPublic(int x, int y, int z) { private int z() {return z;} } record RecThrows(int x) { - public int x() throws Exception {return x;} + public int x() throws Exception {return x;} public int y() throws Exception {return x;} } record CheckOverride(int x) { @@ -29,4 +29,4 @@ record VarArg(int... x) { interface I { String bar(); } -record Impl(int bar) implements I {} \ No newline at end of file +record Impl(int bar) implements I {} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordBasics.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordBasics.java index 995d599a89cf..126436499249 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordBasics.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordBasics.java @@ -8,8 +8,8 @@ record NoComponents() {} class ClassWithComponents(int x) {} class ClassWithComponents2(int x, int y) {} abstract record AbstractRecord() {} -record ExtendsObject() extends Object {} -record PermitsObject() permits Object {} +record ExtendsObject() extends Object {} +record PermitsObject() permits Object {} class ExtendsRecord extends NoComponents {} abstract class ExtendsJLR extends Record {} class AnonymousExtendsJLR { @@ -61,9 +61,9 @@ class Outer { } record ProhibitedMembers() { - int x = 5; + int x = 5; - { + { System.out.println("initializer"); } native void test(); @@ -76,7 +76,7 @@ record CStyle(int a[] [] ) {} record JavaStyle(int[] [] a) {} record SafeVarargComponent(@SafeVarargs int... component) {} -record ExtendsRecordExplicitly() extends java.lang.Record {} +record ExtendsRecordExplicitly() extends java.lang.Record {} record AbstractMethod() { abstract void f(); diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordCompactConstructors.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordCompactConstructors.java index 33700598aaf5..7c7c10211868 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordCompactConstructors.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordCompactConstructors.java @@ -9,7 +9,7 @@ record NonPublic(int x) { } } record Throws(int x) { - public Throws throws Throwable {} + public Throws throws Throwable {} } record Generic() { public Generic {} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordConstructors.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordConstructors.java index 089ea3b65e8e..05fd67ebf8e9 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordConstructors.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingRecords/RecordConstructors.java @@ -7,7 +7,7 @@ record Generic(String x) { public Generic() {this("");} } record Throws() { - public Throws() throws Throwable {} + public Throws() throws Throwable {} public Throws(int x) throws Throwable { this(); } } record TypeMismatch(T t) { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/PermitsList.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/PermitsList.java index 3d5445df2e1e..a042ea27c11e 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/PermitsList.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/PermitsList.java @@ -2,7 +2,7 @@ package p; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -interface I0 permits I {} +interface I0 permits I {} sealed interface I extends I0 permits Unresolved, I1, I1{} non-sealed interface I1 extends I {} @@ -16,7 +16,7 @@ class Usage { } -sealed interface Indirect permits IndirectInheritor, MiddleMan {} +sealed interface Indirect permits IndirectInheritor, MiddleMan {} non-sealed interface MiddleMan extends Indirect {} final class IndirectInheritor implements MiddleMan {} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/SealedClassCast.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/SealedClassCast.java index 5de087784b1c..c2d1b894536c 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/SealedClassCast.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/SealedClassCast.java @@ -32,8 +32,8 @@ interface Foo { sealed interface W permits X {} final class X implements W {} - sealed class Recursive1 permits Recursive2 {} - sealed class Recursive2 permits Recursive1 {} + sealed class Recursive1 permits Recursive2 {} + sealed class Recursive2 permits Recursive1 {} interface I1 {} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/SealedFunctionalInterface.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/SealedFunctionalInterface.java index 474984c91b12..36f01ad3f7bc 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/SealedFunctionalInterface.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingSealedTypes/SealedFunctionalInterface.java @@ -1,4 +1,4 @@ -@FunctionalInterface +@FunctionalInterface sealed interface I { void m(); } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingUnnamed/UnnamedVariablesJava9.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingUnnamed/UnnamedVariablesJava9.java index a6739554e556..b87937d45d92 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingUnnamed/UnnamedVariablesJava9.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlightingUnnamed/UnnamedVariablesJava9.java @@ -2,18 +2,18 @@ import java.util.function.*; public class UnnamedVariables { void testParameter(int _, String _) { - System.out.println(_); + System.out.println(_); } int _ = 123; - String s = _; + String s = _; void testLambda() { Consumer consumer = _ -> System.out.println("Hello"); - Consumer consumer2 = _ -> System.out.println(_); - Consumer consumer3 = _ -> System.out.println(_.trim()); + Consumer consumer2 = _ -> System.out.println(_); + Consumer consumer3 = _ -> System.out.println(_.trim()); Consumer consumer4 = _ -> { - var v = _; + var v = _; System.out.println(v.trim()); }; BiConsumer consumer5 = (_,_) -> {}; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advLVTI/SimpleAvailability.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advLVTI/SimpleAvailability.java index d3681fec2981..24ada1d0773e 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advLVTI/SimpleAvailability.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advLVTI/SimpleAvailability.java @@ -7,7 +7,7 @@ class Main { var d[] = new int[4]; var d1 = new int[] {4}; var d2 = new int[4]; - var e; + var e; var f = { 6 }; var g = (g = 7); var x = (x = 1) + 1; @@ -41,7 +41,7 @@ class Main { var fp = (() -> "hello"); var m = Main::localVariableDeclaration; var g = null; - var runnable = true ? () -> {} : () -> {}; + var runnable = true ? () -> {} : () -> {}; Function f1 = (var var) -> var; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/missingAttribute.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/missingAttribute.java index 83807501f2ea..a200db0f1fec 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/missingAttribute.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/missingAttribute.java @@ -2,5 +2,5 @@ int i (); } -@Ann() class D { +@Ann() class D { } \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/packageAnnotationNotInPackageInfo.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/packageAnnotationNotInPackageInfo.java index d3f9a871be7f..c7d992a0a919 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/packageAnnotationNotInPackageInfo.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/packageAnnotationNotInPackageInfo.java @@ -1 +1 @@ -@Deprecated package annotations.packageAnnotationNotInPackageInfo; \ No newline at end of file +@Deprecated package annotations.packageAnnotationNotInPackageInfo; \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/receiverParameters.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/receiverParameters.java index c7ca6777c213..2b3d1d065fa3 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/receiverParameters.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/receiverParameters.java @@ -15,7 +15,7 @@ class C { @interface Anno { String f(Anno this); } void m0() { - Runnable r = (C C.this) -> { }; + Runnable r = (C C.this) -> { }; } void m1a(final C this) { } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/repeatable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/repeatable.java index 974000b1229c..73812772dce3 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/repeatable.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/annotations/repeatable.java @@ -25,7 +25,7 @@ class C5 { } @interface AA6 { A6[] value() default { }; } @Repeatable(AA6.class) @interface A6 { } -@A6 @A6 @AA6 class C6 { } +@A6 @A6 @AA6 class C6 { } @A6 @A6 class C6bis1 { } @A6 @AA6 class C6bis2 { } @A6 @@ -48,7 +48,7 @@ class DupTypeAnno { } @interface AA7 { A7[] value() default { }; } -@Target({METHOD}) @Repeatable(AA7.class) @interface A7 { } +@Target({METHOD}) @Repeatable(AA7.class) @interface A7 { } @Target({METHOD}) @interface AA8 { A8[] value() default { }; } @Target({METHOD, FIELD}) @Repeatable(AA8.class) @interface A8 { } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/DeepConflictingReturnTypes.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/DeepConflictingReturnTypes.java index 0477aeefdd3e..57fa0523d314 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/DeepConflictingReturnTypes.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/DeepConflictingReturnTypes.java @@ -15,7 +15,7 @@ interface IQ { } -class WWW extends WW implements IQ { +class WWW extends WW implements IQ { } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/Enum.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/Enum.java index de512baa3976..21a50ff3bced 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/Enum.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/Enum.java @@ -105,7 +105,7 @@ enum TestEnum { A(B), B(A); TestEnum(TestEnum other) { - super(null, 0); + super(null, 0); } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57274.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57274.java index 8eee6edddf3e..2fbebc776c5a 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57274.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57274.java @@ -4,5 +4,5 @@ interface I{ abstract class A { abstract int foo(); - abstract <T extends A & I> void bar(T x); + abstract <T extends A & I> void bar(T x); } \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/OverridingMethods.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/OverridingMethods.java index 996850194282..115d75c6f4a3 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/OverridingMethods.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/OverridingMethods.java @@ -9,16 +9,16 @@ abstract class C { A get() { return null; } } abstract class D extends C> { - abstract U f(int t); + abstract U f(int t); // overloaded, not overrridden int ff(int u) { return 0; } - int ff(C u) { + int ff(C u) { return 0; } - Object covariant1() { return null; } + Object covariant1() { return null; } D covariant2() { return null; } A get() { return null; } @@ -43,15 +43,15 @@ class CC { int fPrimitive() { return 0; } } class DD extends CC { - DD f() { return null; } + DD f() { return null; } DD f2() { return null; } CC f3() { return null; } - O f(O o) { return null; } + O f(O o) { return null; } // incompatible although assignable - double fPrimitive() { return 0; } + double fPrimitive() { return 0; } } interface Gen { @@ -500,7 +500,7 @@ interface C extends A,B { } class s implements C { - public A f() { + public A f() { return null; } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/RawOverridingMethods.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/RawOverridingMethods.java index 19340121a4c7..8d700c7f4c7d 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/RawOverridingMethods.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/RawOverridingMethods.java @@ -94,7 +94,7 @@ interface I2 { //IDEA-9321 abstract class MyMap implements java.util.Map { - public Object put(K key, V value) { + public Object put(K key, V value) { return null; } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/ReferenceTypeParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/ReferenceTypeParams.java index 9f9bbf6404c3..67d8b724ebb2 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/ReferenceTypeParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/ReferenceTypeParams.java @@ -133,8 +133,8 @@ class ClassLiteral { Object c1 = T.class; Object c2 = T[].class; - Object c3 = List.class; - Object c4 = List[].class; + Object c3 = List.class; + Object c4 = List[].class; Object c5 = List[].class; Object c6 = List.class; } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/ReturnTypeSubstitutableForSameOverrideEquivalentMethods.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/ReturnTypeSubstitutableForSameOverrideEquivalentMethods.java index e5bb658da886..d647abdd5a1e 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/ReturnTypeSubstitutableForSameOverrideEquivalentMethods.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/ReturnTypeSubstitutableForSameOverrideEquivalentMethods.java @@ -4,5 +4,5 @@ interface I { } class A implements I{ - public void foo(Throwable x) { } + public void foo(Throwable x) { } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/DeepConflictingReturnTypes.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/DeepConflictingReturnTypes.java index 0477aeefdd3e..57fa0523d314 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/DeepConflictingReturnTypes.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/DeepConflictingReturnTypes.java @@ -15,7 +15,7 @@ interface IQ { } -class WWW extends WW implements IQ { +class WWW extends WW implements IQ { } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Enum.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Enum.java index 180c7bc01077..35dd38702c78 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Enum.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Enum.java @@ -93,7 +93,7 @@ enum TestEnum { A(B), B(A); TestEnum(TestEnum other) { - super(null, 0); + super(null, 0); } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/RawOverridingMethods.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/RawOverridingMethods.java index 19340121a4c7..8d700c7f4c7d 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/RawOverridingMethods.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/RawOverridingMethods.java @@ -94,7 +94,7 @@ interface I2 { //IDEA-9321 abstract class MyMap implements java.util.Map { - public Object put(K key, V value) { + public Object put(K key, V value) { return null; } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/ReferenceTypeParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/ReferenceTypeParams.java index 60897536b74d..2803e1c634e2 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/ReferenceTypeParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/ReferenceTypeParams.java @@ -133,8 +133,8 @@ class ClassLiteral { Object c1 = T.class; Object c2 = T[].class; - Object c3 = List.class; - Object c4 = List[].class; + Object c3 = List.class; + Object c4 = List[].class; Object c5 = List[].class; Object c6 = List.class; } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/NotInferredVarShouldNotBeUsedForInferenceJava10.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/NotInferredVarShouldNotBeUsedForInferenceJava10.java index 0697331ecc74..88fe9bdb97b1 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/NotInferredVarShouldNotBeUsedForInferenceJava10.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/NotInferredVarShouldNotBeUsedForInferenceJava10.java @@ -7,7 +7,7 @@ import java.util.stream.Collectors; class MyTest { public List someMethod() { - var listOfInteger; + var listOfInteger; Integer[] arrayOfInteger = {2, 4, 8}; listOfInteger = Arrays.stream(arrayOfInteger) .filter(number -> number >= 4) diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/LambdaContext.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/LambdaContext.java index 88a98a93ea9d..ae7590f80407 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/LambdaContext.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/LambdaContext.java @@ -6,8 +6,8 @@ class Test { void foo(Object x) {} void bar() { - foo(!(int x)-> {}); - foo((int x)-> { } instanceof Object ); + foo(!(int x)-> {}); + foo((int x)-> { } instanceof Object ); } I bazz() { @@ -23,9 +23,9 @@ interface II { class Test1 { void bar(boolean b){ II ik = b ? (s)-> true : (s)->false; - II ik1 = (II)((b ? (s)-> true : (s)->false)); + II ik1 = (II)((b ? (s)-> true : (s)->false)); II ik2 = (II)(ik1 = (b ? (s)-> true : (s)->false)); - (b ? (s) -> true : ik).m(""); + (b ? (s) -> true : ik).m(""); } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/switchExpressions/SwitchExpressionHasResult.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/switchExpressions/SwitchExpressionHasResult.java index d5798faad5b1..ccba788d9e6f 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/switchExpressions/SwitchExpressionHasResult.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/switchExpressions/SwitchExpressionHasResult.java @@ -19,19 +19,19 @@ class C { } void defaultBranchHasNoResult(int n) { - String s = switch (n) { + String s = switch (n) { default: }; } void defaultRuleHasNoResult(int n) { String s = switch (n) { - default -> {} + default -> {} }; } void defaultBranchSometimesHasNoResult(int n, boolean b) { - String s = switch (n) { + String s = switch (n) { default: { if (b) yield ""; } @@ -40,7 +40,7 @@ class C { void defaultRuleSometimesHasNoResult(int n, boolean b) { String s = switch (n) { - default -> { + default -> { if (b) yield ""; } }; @@ -96,7 +96,7 @@ class C { } void oneOfBranchesHasNoResult(int n) { - String s = switch (n) { + String s = switch (n) { case 0: yield ""; default: }; @@ -105,13 +105,13 @@ class C { void oneOfRulesHasNoResult(int n) { String s = switch (n) { case 0 -> ""; - default -> { + default -> { } }; } void allBranchesHaveNoResult(int n) { - String s = switch (n) { + String s = switch (n) { case 0: default: }; @@ -119,9 +119,9 @@ class C { void allRulesHaveNoResult(int n) { String s = switch (n) { - case 0 -> { + case 0 -> { } - default -> { + default -> { } }; } @@ -168,7 +168,7 @@ class C { void systemExit(int x) { int result = switch(x) { - case 1 -> { + case 1 -> { System.exit(0); } default -> 0; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/switchExpressions/SwitchExpressionsNoResult.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/switchExpressions/SwitchExpressionsNoResult.java index a29e7c9e048d..dd7731f975f5 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/switchExpressions/SwitchExpressionsNoResult.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/switchExpressions/SwitchExpressionsNoResult.java @@ -31,7 +31,7 @@ class Test { Object invalidLambdaContext(int x) { return (Runnable) switch (x) { - default -> x > 0 ? () -> {} : () -> {}; + default -> x > 0 ? () -> {} : () -> {}; }; } } \ No newline at end of file diff --git a/java/java-tests/testData/ig/com/siyeh/igtest/controlflow/condition_covered_by_further_condition/ConditionCoveredByFurtherCondition.java b/java/java-tests/testData/ig/com/siyeh/igtest/controlflow/condition_covered_by_further_condition/ConditionCoveredByFurtherCondition.java index 3e1f3453c343..7e456e2b85b8 100644 --- a/java/java-tests/testData/ig/com/siyeh/igtest/controlflow/condition_covered_by_further_condition/ConditionCoveredByFurtherCondition.java +++ b/java/java-tests/testData/ig/com/siyeh/igtest/controlflow/condition_covered_by_further_condition/ConditionCoveredByFurtherCondition.java @@ -163,11 +163,11 @@ public class ConditionCoveredByFurtherCondition { } void testIncompleteLambda(Object x) { - if (x != null && () -> x + if (x != null && () -> x } void testIncompleteLambda2(Object x) { - if (x != null && () -> x instanceof + if (x != null && () -> x instanceof } void testBooleanChain(boolean b1, boolean b2) { diff --git a/java/java-tests/testData/ig/com/siyeh/igtest/style/simplifiable_annotation/SimplifiableAnnotation.java b/java/java-tests/testData/ig/com/siyeh/igtest/style/simplifiable_annotation/SimplifiableAnnotation.java index 4c26303ab92d..11c0910b74e3 100644 --- a/java/java-tests/testData/ig/com/siyeh/igtest/style/simplifiable_annotation/SimplifiableAnnotation.java +++ b/java/java-tests/testData/ig/com/siyeh/igtest/style/simplifiable_annotation/SimplifiableAnnotation.java @@ -18,7 +18,7 @@ public class SimplifiableAnnotation { @ArrayAnnotation(array = {"first"}) class MyClass { - @ ValueAnnotation + @ ValueAnnotation int foo(@ArrayAnnotation(array="") String s) { return -1; } diff --git a/java/java-tests/testData/inspection/dataFlow/contractCheck/CheckConstructorContracts.java b/java/java-tests/testData/inspection/dataFlow/contractCheck/CheckConstructorContracts.java index ddf77301d851..ae3715e8a861 100644 --- a/java/java-tests/testData/inspection/dataFlow/contractCheck/CheckConstructorContracts.java +++ b/java/java-tests/testData/inspection/dataFlow/contractCheck/CheckConstructorContracts.java @@ -1,7 +1,7 @@ import org.jetbrains.annotations.Contract; class Zoo { - @Contract("null->null" ) + @Contract("null->null" ) Zoo(Object o) {} @Contract("_->fail" ) diff --git a/java/java-tests/testData/inspection/dataFlow/contractCheck/SignatureIssues.java b/java/java-tests/testData/inspection/dataFlow/contractCheck/SignatureIssues.java index 647d8931cccc..c21a0654c552 100644 --- a/java/java-tests/testData/inspection/dataFlow/contractCheck/SignatureIssues.java +++ b/java/java-tests/testData/inspection/dataFlow/contractCheck/SignatureIssues.java @@ -11,22 +11,22 @@ class Foo { @Contract(pure=true) void voidPureMethod() {} - @Contract("->null") + @Contract("->null") public native void throwMe(); - @Contract("->null") + @Contract("->null") public native boolean wrongReturnType(); @Contract("->true") public native String wrongReturnType2(); - @Contract("->param1") + @Contract("->param1") public native String absentParameter(); - @Contract("_->param2") + @Contract("_->param2") public native String absentParameter2(String x); - @Contract("_,_->param3") + @Contract("_,_->param3") public native String absentParameter3(String x, int y); @Contract("_->param1") @@ -35,10 +35,10 @@ class Foo { @Contract("_->param1") public native Object okParameterType(Integer x); - @Contract("->new") + @Contract("->new") public native boolean wrongReturnTypeNew(); - @Contract("->this") + @Contract("->this") public native boolean wrongReturnTypeThis(); @Contract("->this") @@ -46,7 +46,7 @@ class Foo { public native Foo okReturnTypeThis(); - @Contract("->this") + @Contract("->this") public native static Foo staticThis(); @Contract("->foo") diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/ModuleHighlightingTest.kt b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/ModuleHighlightingTest.kt index 9ee9982b2407..298c23e85811 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/ModuleHighlightingTest.kt +++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/ModuleHighlightingTest.kt @@ -118,7 +118,7 @@ class ModuleHighlightingTest : LightJava9ModulesCodeInsightFixtureTestCase() { fun testPackageStatement() { highlight("package pkg;") highlight(""" - package pkg; + package pkg; module M { }""".trimIndent()) fixes("package pkg;\nmodule M { }", arrayOf("DeleteElementFix", "FixAllHighlightingProblems")) } @@ -221,8 +221,8 @@ class ModuleHighlightingTest : LightJava9ModulesCodeInsightFixtureTestCase() { highlight(""" module M1 { requires M.missing; - requires M1; - requires M2; + requires M1; + requires M2; requires M3; requires lib.auto; requires lib.multi.release; diff --git a/java/openapi/resources/messages/JavaBundle.properties b/java/openapi/resources/messages/JavaBundle.properties index 47751efdc92d..3b772175e698 100644 --- a/java/openapi/resources/messages/JavaBundle.properties +++ b/java/openapi/resources/messages/JavaBundle.properties @@ -1433,8 +1433,8 @@ inspection.slow.list.contains.all.fix.family.name=Wrap in 'HashSet' constructor inspection.slow.list.contains.all.fix.name=Wrap ''{0}'' in ''HashSet'' constructor inspection.static.import.can.be.used.display.name=Static import can be used inspection.static.import.can.be.used.fix.name=Add static import -slice.filter.parse.error.null.filter.not.applicable.for.primitive.type=''null'' filter is not applicable for primitive type {0} -slice.filter.parse.error.not.null.filter.not.applicable.for.primitive.type=''!null'' filter is not applicable for primitive type {0} +slice.filter.parse.error.null.filter.not.applicable.for.primitive.type=''null'' filter is not applicable to primitive type {0} +slice.filter.parse.error.not.null.filter.not.applicable.for.primitive.type=''!null'' filter is not applicable to primitive type {0} slice.filter.parse.error.enum.constant.not.found=Enum constant not found: {0} slice.filter.parse.error.incorrect.expression=Incorrect expression: {0} slice.filter.parse.error.incorrect.constant.type=Incorrect constant type (required: {0}) diff --git a/plugins/devkit/devkit-java-tests/testData/inspections/missingAccessibleContext/MissingAccessibleContext.java b/plugins/devkit/devkit-java-tests/testData/inspections/missingAccessibleContext/MissingAccessibleContext.java index 38ad386851f2..d52669a5bd61 100644 --- a/plugins/devkit/devkit-java-tests/testData/inspections/missingAccessibleContext/MissingAccessibleContext.java +++ b/plugins/devkit/devkit-java-tests/testData/inspections/missingAccessibleContext/MissingAccessibleContext.java @@ -93,7 +93,7 @@ class X implements ListCellRenderer { void lambdaOk() { ListCellRenderer renderer = (list, val, index, sel, cell) -> { JPanel panel = new JPanel() { - public AccessibleContext getAccessibleContext() { + public AccessibleContext getAccessibleContext() { return null; } }; @@ -106,7 +106,7 @@ class X implements ListCellRenderer { } private class MyJPanel extends JPanel { - public AccessibleContext getAccessibleContext() { + public AccessibleContext getAccessibleContext() { return null; } } diff --git a/plugins/kotlin/idea/tests/testData/kotlinAndJavaChecker/javaAgainstKotlin/KotlinAnnotations.java b/plugins/kotlin/idea/tests/testData/kotlinAndJavaChecker/javaAgainstKotlin/KotlinAnnotations.java index 5bc93ff65836..025db585f005 100644 --- a/plugins/kotlin/idea/tests/testData/kotlinAndJavaChecker/javaAgainstKotlin/KotlinAnnotations.java +++ b/plugins/kotlin/idea/tests/testData/kotlinAndJavaChecker/javaAgainstKotlin/KotlinAnnotations.java @@ -1,17 +1,17 @@ class KotlinAnnotations { - @k.Anno1() - @k.Anno2() + @k.Anno1() + @k.Anno2() public static void m1() { } - @k.Anno1(c = 3) - @k.Anno2(c = 3) + @k.Anno1(c = 3) + @k.Anno2(c = 3) public static void m2() { } @k.Anno1(d = 5) - @k.Anno2(g = "asdas") + @k.Anno2(g = "asdas") public static void m3() { }