Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-47523

Replace Deprecated `JsonParser#getCurrentName` with `JsonParser#currentName`

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      https://github.com/FasterXML/jackson-core/blob/8fba680579885bf9cdae72e93f16de557056d6e3/src/main/java/com/fasterxml/jackson/core/JsonParser.java#L1521-L1551

       

          /**
           * Deprecated alias of {@link #currentName()}.
           *
           * @return Name of the current field in the parsing context
           *
           * @throws IOException for low-level read issues, or
           *   {@link JsonParseException} for decoding problems
           *
           * @deprecated Since 2.17 use {@link #currentName} instead.
           */
          @Deprecated
          public abstract String getCurrentName() throws IOException;    /**
           * Method that can be called to get the name associated with
           * the current token: for {@link JsonToken#FIELD_NAME}s it will
           * be the same as what {@link #getText} returns;
           * for field values it will be preceding field name;
           * and for others (array values, root-level values) null.
           *
           * @return Name of the current field in the parsing context
           *
           * @throws IOException for low-level read issues, or
           *   {@link JsonParseException} for decoding problems
           *
           * @since 2.10
           */
          public String currentName() throws IOException {
              // !!! TODO: switch direction in 2.18 or later
              return getCurrentName();
          } 

      Attachments

        Issue Links

          Activity

            People

              LuciferYang Yang Jie
              LuciferYang Yang Jie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: