Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-888

DateFormatTransformer cannot convert non-string type

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3
    • 1.4
    • None
    • any

    Description

      When using the DateFormatTransformer, if the source column is of type java.sql.TimeStamp, an exception is thrown converting this to a String. Solution is to not typecast to a String but rather invoke the .toString() method of the object to retrieve the string representation of the object.

      (About line 68)
      } else

      { String value = (String) o; aRow.put(column, process(value, fmt)); }

      should be
      } else

      { String value = o.toString(); aRow.put(column, process(value, fmt)); }

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shalin Shalin Shekhar Mangar
            anithian Amit Nithian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1m
              1m
              Remaining:
              Remaining Estimate - 1m
              1m
              Logged:
              Time Spent - Not Specified
              Not Specified

              Slack

                Issue deployment