Skip to content
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

[7.x] Fix split package org.elasticsearch.common.xcontent #79061

Merged
merged 3 commits into from
Oct 13, 2021

Conversation

ChrisHegarty
Copy link
Contributor

Backports the following commits to 7.x:

@ChrisHegarty
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample

@ChrisHegarty
Copy link
Contributor Author

ChrisHegarty commented Oct 13, 2021

Much of the changes are related to the shimmer in package and import statements. To more easily see changes not related to the aforementioned shimmer, one can run a cross branch diff, see below.

$ git diff -w 7.x..xcontent_split | egrep -v '^(\s|diff|rename|similarity|index\s[a-z0-9]{11}\.\.[a-z0-9]{11}|@@|---|\+\+\+)' | egrep -v '^[\+|-]{1}[import|package]{1}'
-     * {@link org.elasticsearch.common.xcontent.ContextParser#parse(XContentParser, Object)}
+     * {@link org.elasticsearch.xcontent.ContextParser#parse(XContentParser, Object)}
-     * Use {@link org.elasticsearch.common.xcontent.ObjectPath} to navigate through the data
+     * Use {@link org.elasticsearch.xcontent.ObjectPath} to navigate through the data
-    static void ensureNameNotNull(String name) {
+    public static void ensureNameNotNull(String name) {
-    static void ensureNotNull(Object value, String message) {
+    public static void ensureNotNull(Object value, String message) {
- * A one stop to use {@link org.elasticsearch.common.xcontent.XContent} and {@link XContentBuilder}.
+ * A one stop to use {@link org.elasticsearch.xcontent.XContent} and {@link XContentBuilder}.
-    static final int GUESS_HEADER_LENGTH = 20;
+    public static final int GUESS_HEADER_LENGTH = 20;
-     * Returns a content builder using JSON format ({@link org.elasticsearch.common.xcontent.XContentType#JSON}.
+     * Returns a content builder using JSON format ({@link org.elasticsearch.xcontent.XContentType#JSON}.
-     * Returns a content builder using SMILE format ({@link org.elasticsearch.common.xcontent.XContentType#SMILE}.
+     * Returns a content builder using SMILE format ({@link org.elasticsearch.xcontent.XContentType#SMILE}.
-     * Returns a content builder using YAML format ({@link org.elasticsearch.common.xcontent.XContentType#YAML}.
+     * Returns a content builder using YAML format ({@link org.elasticsearch.xcontent.XContentType#YAML}.
-     * Returns a content builder using CBOR format ({@link org.elasticsearch.common.xcontent.XContentType#CBOR}.
+     * Returns a content builder using CBOR format ({@link org.elasticsearch.xcontent.XContentType#CBOR}.
-     * Returns the {@link org.elasticsearch.common.xcontent.XContent} for the provided content type.
+     * Returns the {@link org.elasticsearch.xcontent.XContent} for the provided content type.
- * The content type of {@link org.elasticsearch.common.xcontent.XContent}.
+ * The content type of {@link org.elasticsearch.xcontent.XContent}.
-    static final FilterPath EMPTY = new FilterPath();
+    public static final FilterPath EMPTY = new FilterPath();
-    boolean isDoubleWildcard() {
+    public boolean isDoubleWildcard() {
-    boolean isSimpleWildcard() {
+    public boolean isSimpleWildcard() {
-    String getSegment() {
+    public String getSegment() {
-    FilterPath getNext() {
+    public FilterPath getNext() {
-                            hasEntry("component", "o.e.d.c.x.ParseField"),
+                            hasEntry("component", "o.e.d.x.ParseField"),
-                            hasEntry("component", "o.e.d.c.x.ParseField"),
+                            hasEntry("component", "o.e.d.x.ParseField"),
-    // xcontent should not have common, all it's common packages should be renamed to xcontent
-    'org.elasticsearch.common.xcontent.*',
-    'org.elasticsearch.common.xcontent.support.XContentMapValues',
-
- * its string form ({@link #source(String, XContentType)}) or using a {@link org.elasticsearch.common.xcontent.XContentBuilder}
- * ({@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}).
+ * its string form ({@link #source(String, XContentType)}) or using a {@link org.elasticsearch.xcontent.XContentBuilder}
+ * ({@link #source(org.elasticsearch.xcontent.XContentBuilder)}).
+
-     * the alias filter via {@link org.elasticsearch.common.xcontent.XContentParser},
+     * the alias filter via {@link org.elasticsearch.xcontent.XContentParser},
-     * {@link org.elasticsearch.common.xcontent.XContentParser.Token#START_OBJECT}.
+     * {@link org.elasticsearch.xcontent.XContentParser.Token#START_OBJECT}.
- * Defines a query parser that is able to parse {@link QueryBuilder}s from {@link org.elasticsearch.common.xcontent.XContent}.
+ * Defines a query parser that is able to parse {@link QueryBuilder}s from {@link org.elasticsearch.xcontent.XContent}.
-     * Parses a retention lease from {@link org.elasticsearch.common.xcontent.XContent}. This method assumes that the retention lease was
-     * converted to {@link org.elasticsearch.common.xcontent.XContent} via {@link #toXContent(XContentBuilder, Params)}.
+     * Parses a retention lease from {@link org.elasticsearch.xcontent.XContent}. This method assumes that the retention lease was
+     * converted to {@link org.elasticsearch.xcontent.XContent} via {@link #toXContent(XContentBuilder, Params)}.
-     * Converts the retention lease stats to {@link org.elasticsearch.common.xcontent.XContent} using the specified builder and pararms.
+     * Converts the retention lease stats to {@link org.elasticsearch.xcontent.XContent} using the specified builder and pararms.
-     * @return the builder that this retention lease collection was converted to {@link org.elasticsearch.common.xcontent.XContent} into
+     * @return the builder that this retention lease collection was converted to {@link org.elasticsearch.xcontent.XContent} into
-     * Parses a retention leases collection from {@link org.elasticsearch.common.xcontent.XContent}. This method assumes that the retention
-     * leases were converted to {@link org.elasticsearch.common.xcontent.XContent} via {@link #toXContent(XContentBuilder, Params)}.
+     * Parses a retention leases collection from {@link org.elasticsearch.xcontent.XContent}. This method assumes that the retention
+     * leases were converted to {@link org.elasticsearch.xcontent.XContent} via {@link #toXContent(XContentBuilder, Params)}.
-     * {@link #toInnerXContent(XContentBuilder, org.elasticsearch.common.xcontent.ToXContent.Params)}
+     * {@link #toInnerXContent(XContentBuilder, org.elasticsearch.xcontent.ToXContent.Params)}
-            org.elasticsearch.common.xcontent.ObjectParser.ValueType.INT
+            org.elasticsearch.xcontent.ObjectParser.ValueType.INT
-            org.elasticsearch.common.xcontent.ObjectParser.ValueType.OBJECT
+            org.elasticsearch.xcontent.ObjectParser.ValueType.OBJECT
-     * {@link org.elasticsearch.common.xcontent.XContent} format.
+     * {@link org.elasticsearch.xcontent.XContent} format.
-     * {@link org.elasticsearch.common.xcontent.XContent} format.
+     * {@link org.elasticsearch.xcontent.XContent} format.
-     * {@link org.elasticsearch.common.xcontent.XContent} format.
+     * {@link org.elasticsearch.xcontent.XContent} format.
-     * {@link org.elasticsearch.common.xcontent.XContent} format.
+     * {@link org.elasticsearch.xcontent.XContent} format.
-     * Whether or not to assert equivalence of the {@link org.elasticsearch.common.xcontent.XContent} of the test instance and the instance
-     * parsed from the {@link org.elasticsearch.common.xcontent.XContent} of the test instance.
+     * Whether or not to assert equivalence of the {@link org.elasticsearch.xcontent.XContent} of the test instance and the instance
+     * parsed from the {@link org.elasticsearch.xcontent.XContent} of the test instance.
-     * via {@link org.elasticsearch.common.xcontent.ToXContent#toXContent(XContentBuilder, ToXContent.Params)} and parsed back via
-     * {@link org.elasticsearch.common.xcontent.XContentParser#objectText()}.
+     * via {@link ToXContent#toXContent(XContentBuilder, ToXContent.Params)} and parsed back via
+     * {@link org.elasticsearch.xcontent.XContentParser#objectText()}.
-     * via {@link org.elasticsearch.common.xcontent.ToXContent#toXContent(XContentBuilder, ToXContent.Params)} and parsed back via
-     * {@link org.elasticsearch.common.xcontent.XContentParser#objectText()}.
+     * via {@link ToXContent#toXContent(XContentBuilder, ToXContent.Params)} and parsed back via
+     * {@link org.elasticsearch.xcontent.XContentParser#objectText()}.
-     * {@link org.elasticsearch.common.xcontent.ToXContent#toXContent(XContentBuilder, ToXContent.Params)} hold the same content.
+     * {@link ToXContent#toXContent(XContentBuilder, ToXContent.Params)} hold the same content.
- * It allows to transfer the allocation information to {@link org.elasticsearch.common.xcontent.XContent} using
+ * It allows to transfer the allocation information to {@link org.elasticsearch.xcontent.XContent} using
-     * {@link org.elasticsearch.common.xcontent.ContextParser#parse(XContentParser, Object)}
+     * {@link ContextParser#parse(XContentParser, Object)}
-     * This is needed because {@link SqlQueryRequest#toXContent(XContentBuilder, org.elasticsearch.common.xcontent.ToXContent.Params)}
+     * This is needed because {@link SqlQueryRequest#toXContent(XContentBuilder, org.elasticsearch.xcontent.ToXContent.Params)}

@ChrisHegarty ChrisHegarty merged commit 964180b into elastic:7.x Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants