You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/09/05 11:10:02 UTC

[jira] [Commented] (FLINK-7583) Create singleton isntance for the content type header

    [ https://issues.apache.org/jira/browse/FLINK-7583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16153482#comment-16153482 ] 

ASF GitHub Bot commented on FLINK-7583:
---------------------------------------

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/4646

    [FLINK-7583] [REST] Use static constant for CONTENT_TYPE header

    ## What is the purpose of the change
    
    This PR introduces a static constant to be used as the HTTP CONTENT_TYPE header value. This ensures that we only allocate the string once, and that the client/server always use the same value.
    
    ## Brief change log
    
    * Add `RestConstants` class
    * Add `REST_CONTENT_TYPE` constants
    *  modify `RestClient` and `AbstractRestHandler` accordingly
    
    ## Verifying this change
    
    This change is a trivial rework / code cleanup without any test coverage.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 7583

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4646.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4646
    
----
commit 80896ab158d4aa6e18a889e2cd67b3d527d7a1f0
Author: zentol <ch...@apache.org>
Date:   2017-09-05T11:07:16Z

    [FLINK-7583] [REST] Use static constant for CONTENT_TYPE header

----


> Create singleton isntance for the content type header
> -----------------------------------------------------
>
>                 Key: FLINK-7583
>                 URL: https://issues.apache.org/jira/browse/FLINK-7583
>             Project: Flink
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 1.4.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>             Fix For: 1.4.0
>
>
> The content type header for all rest requests/responses is always the same, but we currently allocate a separate string for each request/response. We should instead use a static constant.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)