Browse Source

Polish "Use text block where feasible"

See gh-31916
pull/31920/head
Stéphane Nicoll 2 years ago
parent
commit
ed1bfb8177
  1. 30
      spring-messaging/src/test/java/org/springframework/messaging/protobuf/OuterSample.java
  2. 21
      spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java
  3. 30
      spring-web/src/test/java/org/springframework/protobuf/OuterSample.java
  4. 2
      spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java
  5. 30
      spring-webflux/src/test/java/org/springframework/web/reactive/protobuf/OuterSample.java

30
spring-messaging/src/test/java/org/springframework/messaging/protobuf/OuterSample.java

@ -1,3 +1,19 @@ @@ -1,3 +1,19 @@
/*
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: sample.proto
@ -28,16 +44,10 @@ public class OuterSample { @@ -28,16 +44,10 @@ public class OuterSample {
descriptor;
static {
java.lang.String[] descriptorData = {
"""
\014sample.proto",
\003Msg\022\013
\003foo\030\001 \001(\t\022\030
\004blah\030\002 \001(\0132
.SecondMsg"\031
\tSecondMsg\022\014
\004blah\030\001 \001(\005B-
\034org.springframework.protobufB\013OuterSampleP\001"""
"\n\014sample.proto\",\n\003Msg\022\013\n\003foo\030\001 \001(\t\022\030\n\004bl" +
"ah\030\002 \001(\0132\n.SecondMsg\"\031\n\tSecondMsg\022\014\n\004bla" +
"h\030\001 \001(\005B-\n\034org.springframework.protobufB" +
"\013OuterSampleP\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {

21
spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java

@ -66,25 +66,8 @@ class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingTests { @@ -66,25 +66,8 @@ class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingTests {
void readServerSentEvents() {
MockServerHttpRequest request = MockServerHttpRequest.post("/")
.body(Mono.just(stringBuffer(
"""
id:c42
event:foo
retry:123
:bla
:bla bla
:bla bla bla
data:bar
id:c43
event:bar
retry:456
data:baz
data:
data:\s
""")));
"id:c42\nevent:foo\nretry:123\n:bla\n:bla bla\n:bla bla bla\ndata:bar\n\n" +
"id:c43\nevent:bar\nretry:456\ndata:baz\n\ndata:\n\ndata: \n\n")));
Flux<ServerSentEvent> events = this.reader
.read(ResolvableType.forClassWithGenerics(ServerSentEvent.class, String.class),

30
spring-web/src/test/java/org/springframework/protobuf/OuterSample.java

@ -1,3 +1,19 @@ @@ -1,3 +1,19 @@
/*
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: sample.proto
@ -33,16 +49,10 @@ public final class OuterSample { @@ -33,16 +49,10 @@ public final class OuterSample {
descriptor;
static {
String[] descriptorData = {
"""
\014sample.proto",
\003Msg\022\013
\003foo\030\001 \001(\t\022\030
\004blah\030\002 \001(\0132
.SecondMsg"\031
\tSecondMsg\022\014
\004blah\030\001 \001(\005B-
\034org.springframework.protobufB\013OuterSampleP\001"""
"\n\014sample.proto\",\n\003Msg\022\013\n\003foo\030\001 \001(\t\022\030\n\004bl" +
"ah\030\002 \001(\0132\n.SecondMsg\"\031\n\tSecondMsg\022\014\n\004bla" +
"h\030\001 \001(\005B-\n\034org.springframework.protobufB" +
"\013OuterSampleP\001"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

2
spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

30
spring-webflux/src/test/java/org/springframework/web/reactive/protobuf/OuterSample.java

@ -1,3 +1,19 @@ @@ -1,3 +1,19 @@
/*
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: sample.proto
@ -28,16 +44,10 @@ public class OuterSample { @@ -28,16 +44,10 @@ public class OuterSample {
descriptor;
static {
String[] descriptorData = {
"""
\014sample.proto",
\003Msg\022\013
\003foo\030\001 \001(\t\022\030
\004blah\030\002 \001(\0132
.SecondMsg"\031
\tSecondMsg\022\014
\004blah\030\001 \001(\005B-
\034org.springframework.protobufB\013OuterSampleP\001"""
"\n\014sample.proto\",\n\003Msg\022\013\n\003foo\030\001 \001(\t\022\030\n\004bl" +
"ah\030\002 \001(\0132\n.SecondMsg\"\031\n\tSecondMsg\022\014\n\004bla" +
"h\030\001 \001(\005B-\n\034org.springframework.protobufB" +
"\013OuterSampleP\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {

Loading…
Cancel
Save