Why IDEA inserts an extra space after a string constant when reformatting the code

Answered

I wrote some code like this.

public class Test {
public static void main(String[] args) {
System.out.println(Arrays.asList("a", "b", "c"));
}
}

But IDEA always inserts an extra space after the string constant after reformatting which like the following.

public class Test {
public static void main(String[] args) {
System.out.println(Arrays.asList("a" , "b" , "c" ));
}
}

I got a code style file from my team member and import it. But it does not work. 

My IntelliJ version is 2018.1.3(Ultimate Edition Build #IU-181.4892.42)

0
1 comment

Do you use some external formatter plug-in like Eclipse Formatter or have .editorconfig file in the project?

Can you share a sample project with the project level code style that will reproduce this issue?

0

Please sign in to leave a comment.