diff --git a/core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java b/core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java index daed2502e..75f36873b 100644 --- a/core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java +++ b/core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java @@ -2639,7 +2639,7 @@ private void visitThrowsClause(List thrownExceptionTyp for (ExpressionTree thrownExceptionType : thrownExceptionTypes) { if (!first) { token(","); - builder.breakToFill(" "); + builder.breakOp(" "); } scan(thrownExceptionType, null); first = false; diff --git a/core/src/test/resources/com/google/googlejavaformat/java/testdata/M.output b/core/src/test/resources/com/google/googlejavaformat/java/testdata/M.output index dbad1bb67..d28d5dd7c 100644 --- a/core/src/test/resources/com/google/googlejavaformat/java/testdata/M.output +++ b/core/src/test/resources/com/google/googlejavaformat/java/testdata/M.output @@ -36,8 +36,16 @@ class M { /** JavaDoc. */ void methodName3(int x) - throws Exception0, Exception1, Exception2, Exception3, Exception4, Exception5, Exception6, - Exception7, Exception8, Exception9 {} + throws Exception0, + Exception1, + Exception2, + Exception3, + Exception4, + Exception5, + Exception6, + Exception7, + Exception8, + Exception9 {} /** JavaDoc. */ void methodName4( @@ -114,8 +122,16 @@ class M { int t, int u, int v) - throws Exception0, Exception1, Exception2, Exception3, Exception4, Exception5, Exception6, - Exception7, Exception8, Exception9 {} + throws Exception0, + Exception1, + Exception2, + Exception3, + Exception4, + Exception5, + Exception6, + Exception7, + Exception8, + Exception9 {} Pair< Pair, Pair>, Pair, Pair>>, @@ -135,8 +151,16 @@ class M { Pair, Pair>, Pair, Pair>>, Pair, Pair>, Pair, Pair>>> methodName11(int x) - throws Exception0, Exception1, Exception2, Exception3, Exception4, Exception5, Exception6, - Exception7, Exception8, Exception9 { + throws Exception0, + Exception1, + Exception2, + Exception3, + Exception4, + Exception5, + Exception6, + Exception7, + Exception8, + Exception9 { return null; } @@ -225,8 +249,16 @@ class M { int t, int u, int v) - throws Exception0, Exception1, Exception2, Exception3, Exception4, Exception5, Exception6, - Exception7, Exception8, Exception9 { + throws Exception0, + Exception1, + Exception2, + Exception3, + Exception4, + Exception5, + Exception6, + Exception7, + Exception8, + Exception9 { return null; } @@ -338,8 +370,16 @@ class M { T30, T31> T methodName22(int x) - throws Exception0, Exception1, Exception2, Exception3, Exception4, Exception5, Exception6, - Exception7, Exception8, Exception9 { + throws Exception0, + Exception1, + Exception2, + Exception3, + Exception4, + Exception5, + Exception6, + Exception7, + Exception8, + Exception9 { return null; } @@ -518,8 +558,16 @@ class M { int t, int u, int v) - throws Exception0, Exception1, Exception2, Exception3, Exception4, Exception5, Exception6, - Exception7, Exception8, Exception9 { + throws Exception0, + Exception1, + Exception2, + Exception3, + Exception4, + Exception5, + Exception6, + Exception7, + Exception8, + Exception9 { return null; } @@ -640,8 +688,16 @@ class M { Pair, Pair>, Pair, Pair>>, Pair, Pair>, Pair, Pair>>> methodName(int x) - throws Exception0, Exception1, Exception2, Exception3, Exception4, Exception5, - Exception6, Exception7, Exception8, Exception9 { + throws Exception0, + Exception1, + Exception2, + Exception3, + Exception4, + Exception5, + Exception6, + Exception7, + Exception8, + Exception9 { return null; } @@ -829,8 +885,16 @@ class M { int t, int u, int v) - throws Exception0, Exception1, Exception2, Exception3, Exception4, Exception5, - Exception6, Exception7, Exception8, Exception9 { + throws Exception0, + Exception1, + Exception2, + Exception3, + Exception4, + Exception5, + Exception6, + Exception7, + Exception8, + Exception9 { return null; } @@ -1011,6 +1075,14 @@ class M { ZZZZZZZZZZ z, ZZZZZZZZZZ z, ZZZZZZZZZZ z) - throws EEEEEEEEEE, EEEEEEEEEE, EEEEEEEEEE, EEEEEEEEEE, EEEEEEEEEE, EEEEEEEEEE, EEEEEEEEEE, - EEEEEEEEEE, EEEEEEEEEE, EEEEEEEEEE {} + throws EEEEEEEEEE, + EEEEEEEEEE, + EEEEEEEEEE, + EEEEEEEEEE, + EEEEEEEEEE, + EEEEEEEEEE, + EEEEEEEEEE, + EEEEEEEEEE, + EEEEEEEEEE, + EEEEEEEEEE {} }