Skip to content

This PR includes all latest changes #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
fadc82b
Introduce FlattenedGeneratedMessageV3
blakeli0 Mar 11, 2025
ea6ffc8
Merge branch 'main' into introduce-flattened-genmessagev3
blakeli0 Mar 20, 2025
3aa1287
Move GeneratedMessageV3 to SDK package.
blakeli0 Mar 20, 2025
0ca49b5
Move implementations of CodedOutputStream to SDK package.
blakeli0 Mar 25, 2025
2e042b3
Use getDeclaredConstructors
blakeli0 Mar 25, 2025
bef8090
Move implementation of CodedInputStream to SDK package.
blakeli0 Mar 28, 2025
be61c92
Move implementation of ByteString to SDK package.
blakeli0 Mar 28, 2025
5ccdde0
Decouple WireFormat from CodedOutputStream
blakeli0 Mar 29, 2025
07f9b95
Make all well known types extend from FlattenedGeneratedMessageV3
blakeli0 Mar 29, 2025
ed32977
Move JavaFeaturesProto back to SDK package.
blakeli0 Mar 31, 2025
6b43b8c
Merge branch 'move-codedoutputstream-implementations' into latest
blakeli0 Apr 1, 2025
7d9f8af
Decouple ExtensionRegistryLite from GeneratedMessageLite.GeneratedExt…
blakeli0 Apr 4, 2025
3a6427d
Decouple CodedOutputStream from AbstractMessageLite.
blakeli0 Apr 4, 2025
a061e40
Merge branch 'move-codedoutputstream-implementations' into latest
blakeli0 Apr 4, 2025
b183cd0
Merge branch 'extensionregistrylite' into latest
blakeli0 Apr 4, 2025
c5bc454
Get GeneratedMessageLite$GeneratedExtension using reflection.
blakeli0 Apr 4, 2025
03e050b
Merge branch 'extensionregistrylite' into latest
blakeli0 Apr 4, 2025
613f7cf
Move GeneratedMessageLite.SerializedForm and AbstractMessageLite.Buil…
blakeli0 Apr 7, 2025
d0d43f2
Merge branch 'introduce-flattened-genmessagev3' into latest
blakeli0 Apr 7, 2025
fa86af5
Decouple MessageReflection from GeneratedMessage
blakeli0 Apr 7, 2025
d665e4c
Merge branch 'messageReflection' into latest
blakeli0 Apr 7, 2025
d785096
Decouple ExtensionRegistry from GeneratedMessage
blakeli0 Apr 7, 2025
35b08dc
Merge branch 'extensionRegistry' into latest
blakeli0 Apr 8, 2025
d4d6a2c
Decouple DescriptorProtos from AbstractMessageLite. Use the util meth…
blakeli0 Apr 8, 2025
6de05fa
Merge branch 'introduce-flattened-genmessagev3' into latest
blakeli0 Apr 8, 2025
abcdf6e
Move GeneratedMessage to SDK package.
blakeli0 Apr 8, 2025
3cd6099
Use FlattenedAbstractMessage instead of AbstractMessage in DynamicMes…
blakeli0 Apr 8, 2025
9ae3a46
Merge branch 'introduce-flattened-genmessagev3' into latest
blakeli0 Apr 8, 2025
a3a9ddd
Move AbstractMessage to SDK package.
blakeli0 Apr 8, 2025
0e58da5
Merge branch 'introduce-flattened-genmessagev3' into latest
blakeli0 Apr 8, 2025
b94dc2c
Merge branch 'main' into latest
blakeli0 Apr 10, 2025
e381ef3
Remove unnecessary cast.
blakeli0 Apr 14, 2025
29d4e3d
Make GeneratedMessageLite and AbstractMessageLite package private. Ex…
blakeli0 Apr 14, 2025
b9cbc12
Merge branch 'make-lite-private' into latest
blakeli0 Apr 14, 2025
5e6e93b
Move TextFormat to SDK package.Introducing a new TextFormatInternal. …
blakeli0 Apr 15, 2025
ea4b11f
Move TextFormatParseInfoTree.java and TextFormatParseLocation.java to…
blakeli0 Apr 15, 2025
8607706
Revert AbstractMessageLite to public since gencode from a different p…
blakeli0 Apr 15, 2025
a21de28
Merge branch 'make-lite-private' into latest
blakeli0 Apr 15, 2025
83f5128
Move classes only used by lite gen code to package private.
blakeli0 Apr 18, 2025
9149809
Merge branch 'make-lite-private' into latest
blakeli0 Apr 18, 2025
9aeeb34
Make LazyField package private.
blakeli0 Apr 18, 2025
081ab2e
Revert "Move implementation of ByteString to SDK package."
blakeli0 Apr 18, 2025
3b35f92
Revert "Move implementation of CodedInputStream to SDK package."
blakeli0 Apr 18, 2025
d174dc5
Revert "Use getDeclaredConstructors"
blakeli0 Apr 18, 2025
b8e6fcd
Revert "Move implementations of CodedOutputStream to SDK package."
blakeli0 Apr 18, 2025
333878c
Make LazyFieldLite public again because it is on the surface of Coded…
blakeli0 Apr 18, 2025
30444df
Merge branch 'make-lite-private' into latest
blakeli0 Apr 18, 2025
5265992
Use TextFormat instead of TextFormatInternal in AbstractMessage.
blakeli0 Apr 28, 2025
057f4cc
Make isSerializationDeterministic public since it used by GeneratedMe…
blakeli0 May 27, 2025
c79e60c
Make TextFormatEscaper and TextFormatInternal public since it used by…
blakeli0 May 27, 2025
9ee5b3b
Make package privates methods in TextFormatEscaper public since it us…
blakeli0 May 27, 2025
129e312
Introduce RepeatedFieldBuilderV3Internal and SingleFieldBuilderV3Inte…
blakeli0 May 28, 2025
2fc4cc6
Merge pull request #16 from blakeli0/introduce-internal-v3builder
blakeli0 May 28, 2025
db446fd
Revert reflection usages for GeneratedMessageLite in ExtensionRegistr…
blakeli0 Jun 6, 2025
018d2ef
Introduce isGenerated flag to Message. This way we can tell if a Mess…
blakeli0 Jun 6, 2025
3e8d30d
Introduce GeneratedMessageV3Internal, GeneratedMessageInternal, Abstr…
blakeli0 Jun 9, 2025
af1cc20
Change the generic type of SingleFieldBuilderV3 and RepeatedFieldBuil…
blakeli0 Jun 9, 2025
722196f
Add BuilderParent back to AbstractMessage, otherwise moving an inner …
blakeli0 Jun 10, 2025
aa016d5
Update the argument type of newBuilderForType from AbstractMessageInt…
blakeli0 Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -248,62 +248,6 @@ public BuilderType mergeFrom(
return (BuilderType) this;
}

/**
* An InputStream implementations which reads from some other InputStream but is limited to a
* particular number of bytes. Used by mergeDelimitedFrom(). This is intentionally
* package-private so that UnknownFieldSet can share it.
*/
static final class LimitedInputStream extends FilterInputStream {
private int limit;

LimitedInputStream(InputStream in, int limit) {
super(in);
this.limit = limit;
}

@Override
public int available() throws IOException {
return Math.min(super.available(), limit);
}

@Override
public int read() throws IOException {
if (limit <= 0) {
return -1;
}
final int result = super.read();
if (result >= 0) {
--limit;
}
return result;
}

@Override
public int read(final byte[] b, final int off, int len) throws IOException {
if (limit <= 0) {
return -1;
}
len = Math.min(len, limit);
final int result = super.read(b, off, len);
if (result >= 0) {
limit -= result;
}
return result;
}

@Override
public long skip(final long n) throws IOException {
// because we take the minimum of an int and a long, result is guaranteed to be
// less than or equal to Integer.MAX_INT so this cast is safe
int result = (int) super.skip(Math.min(n, limit));
if (result >= 0) {
// if the superclass adheres to the contract for skip, this condition is always true
limit -= result;
}
return result;
}
}

@Override
public boolean mergeDelimitedFrom(
final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

package com.google.protobuf;

import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading