Solr
  1. Solr
  2. SOLR-3012

SimplePostTool: move getProperty(type) out of postData()

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      Now applications that use SimplePostTool can set Content-type, but it has to use type system property.

      public void postData(InputStream data, Integer length, OutputStream output) {
              
        final String type = System.getProperty("type", DEFAULT_DATA_TYPE);
                :
      }
      

      If the getProperty() is moved to main() and type can be set via an argument of the method, the client applications can be flexible.

      1. SOLR-3012.patch
        7 kB
        Koji Sekiguchi
      2. SOLR-3012.patch
        5 kB
        Koji Sekiguchi

        Activity

        Hide
        Koji Sekiguchi added a comment -

        I also changed doGet methods to static in this patch.

        Show
        Koji Sekiguchi added a comment - I also changed doGet methods to static in this patch.
        Hide
        Koji Sekiguchi added a comment -

        New patch. As the clients of SimplePostTool will be needed recompile due to this change, I added change note in this patch.

        I'll commit tonight if nobody objects.

        Show
        Koji Sekiguchi added a comment - New patch. As the clients of SimplePostTool will be needed recompile due to this change, I added change note in this patch. I'll commit tonight if nobody objects.
        Hide
        Koji Sekiguchi added a comment -

        trunk: Committed revision 1229602.
        3x: Committed revision 1229608.

        Show
        Koji Sekiguchi added a comment - trunk: Committed revision 1229602. 3x: Committed revision 1229608.

          People

          • Assignee:
            Koji Sekiguchi
            Reporter:
            Koji Sekiguchi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development