| Index: third_party/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java
|
| diff --git a/third_party/protobuf/python/google/protobuf/internal/more_extensions.proto b/third_party/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java
|
| similarity index 71%
|
| copy from third_party/protobuf/python/google/protobuf/internal/more_extensions.proto
|
| copy to third_party/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java
|
| index e2d97010450d32f2d1dd7b3ec0d2d05bf93435cb..8b78893dd365c509f0810aed32dc481b5db3e0a7 100644
|
| --- a/third_party/protobuf/python/google/protobuf/internal/more_extensions.proto
|
| +++ b/third_party/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java
|
| @@ -28,31 +28,21 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Author: robinson@google.com (Will Robinson)
|
| -
|
| -
|
| -package google.protobuf.internal;
|
| -
|
| -
|
| -message TopLevelMessage {
|
| - optional ExtendedMessage submessage = 1;
|
| -}
|
| -
|
| -
|
| -message ExtendedMessage {
|
| - extensions 1 to max;
|
| -}
|
| -
|
| -
|
| -message ForeignMessage {
|
| - optional int32 foreign_message_int = 1;
|
| -}
|
| -
|
| -
|
| -extend ExtendedMessage {
|
| - optional int32 optional_int_extension = 1;
|
| - optional ForeignMessage optional_message_extension = 2;
|
| -
|
| - repeated int32 repeated_int_extension = 3;
|
| - repeated ForeignMessage repeated_message_extension = 4;
|
| +package com.google.protobuf;
|
| +
|
| +/**
|
| + * A prerun for a test suite that allows running the full protocol buffer
|
| + * tests in a mode that disables the optimization for not using
|
| + * {@link RepeatedFieldBuilder} and {@link SingleFieldBuilder} until they are
|
| + * requested. This allows us to run all the tests through both code paths
|
| + * and ensures that both code paths produce identical results.
|
| + *
|
| + * @author jonp@google.com (Jon Perlow)
|
| + */
|
| +public class ForceFieldBuildersPreRun implements Runnable {
|
| +
|
| + //@Override (Java 1.6 override semantics, but we must support 1.5)
|
| + public void run() {
|
| + GeneratedMessage.enableAlwaysUseFieldBuildersForTesting();
|
| + }
|
| }
|
|
|