@@ -103,6 +103,17 @@ behave.
103103
104104All known C++ releases are out of conformance. When a ` proto2 ` file imports an
105105enum defined in a ` proto3 ` file, C++ treats that field as a ** closed** enum.
106+ Under editions, this behavior is represented by the deprecated field feature
107+ [ ` features.(pb.cpp).legacy_closed_enum ` ] ( /editions/features#legacy_closed_enum ) .
108+ There are two options for moving to conformant behavior:
109+
110+ * Remove the field feature. This is the recommended approach, but may cause
111+ runtime behavior changes. Without the feature, unrecognized integers will
112+ end up stored in the field cast to the enum type instead of being put into
113+ the unknown field set.
114+ * Change the enum to closed. This is discouraged, and can cause runtime
115+ behavior if * anybody else* is using the enum. Unrecognized integers will end
116+ up in the unknown field set instead of those fields.
106117
107118### C# ; {#csharp}
108119
@@ -113,6 +124,18 @@ All known C# releases are out of conformance. C# treats all enums as **open**.
113124All known Java releases are out of conformance. When a ` proto2 ` file imports an
114125enum defined in a ` proto3 ` file, Java treats that field as a ** closed** enum.
115126
127+ Under editions, this behavior is represented by the deprecated field feature
128+ [ ` features.(pb.java).legacy_closed_enum ` ] ( /editions/features#legacy_closed_enum ) ).
129+ There are two options for moving to conformant behavior:
130+
131+ * Remove the field feature. This may cause runtime behavior changes. Without
132+ the feature, unrecognized integers will end up stored in the field and the
133+ ` UNRECOGNIZED ` value will be returned by the enum getter. Before, these
134+ values would be put into the unknown field set.
135+ * Change the enum to closed. If * anybody else* is using it they may see
136+ runtime behavior changes. Unrecognized integers will end up in the unknown
137+ field set instead of those fields.
138+
116139> ** NOTE:** Java's handling of ** open** enums has surprising edge cases. Given
117140> the following definitions:
118141>
0 commit comments