jyt109 / protobuf-java-format

Automatically exported from code.google.com/p/protobuf-java-format
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

FsonFormat Stack overflow on big data #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. in .proto: 

message BigData { required bytes d = 1; }

2. in .java: 

BigData bd = BigData.newBuilder()
    .setD(ByteString.copyFrom(new byte[1024]))
    .build();

JsonFormat.merge(JsonFormat.printToString(bd), BigData.newBuilder());

What is the expected output? What do you see instead?

Saw StackOverflow exception:
Exception in thread "main" java.lang.StackOverflowError
        at java.util.regex.Pattern$CharProperty.match(Unknown Source)
        at java.util.regex.Pattern$Branch.match(Unknown Source)
        at java.util.regex.Pattern$GroupHead.match(Unknown Source)
        at java.util.regex.Pattern$Loop.match(Unknown Source)
        at java.util.regex.Pattern$GroupTail.match(Unknown Source)
        at java.util.regex.Pattern$BranchConn.match(Unknown Source)
        at java.util.regex.Pattern$CharProperty.match(Unknown Source)
        at java.util.regex.Pattern$Branch.match(Unknown Source)
        at java.util.regex.Pattern$GroupHead.match(Unknown Source)
        at java.util.regex.Pattern$Loop.match(Unknown Source)
        at java.util.regex.Pattern$GroupTail.match(Unknown Source)
        at java.util.regex.Pattern$BranchConn.match(Unknown Source)
......

What version of the product are you using? On what operating system?

protobuf-format-java-1.1 on Windows

Please provide any additional information below.

Original issue reported on code.google.com by wang.wei...@gmail.com on 19 Sep 2009 at 3:48

GoogleCodeExporter commented 9 years ago

Original comment by aant...@gmail.com on 18 Feb 2010 at 10:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r26.

Original comment by aant...@gmail.com on 23 Feb 2010 at 5:16