Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20064

Cannot use the DefaultResourceReferenceSerializer component with a TemporaryResourceReference

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 14.7-rc-1
    • 13.10
    • Resource
    • None
    • Unknown
    • N/A

    Description

      The canonical usage is:

      @Inject
      private ResourceReferenceSerializer<ResourceReference, ExtendedURL> serializer;
      ...
      TemporaryResourceReference tmpReference = ...
      serializer.serialize(tmpReference);
      

      This automatically uses the correct URL scheme.

      However it fails since ExtendedURLTemporaryResourceReferenceSerializer has the wrong hint.

      This is forcing code to use the wrong:

      @Inject
      @Named("standard/tmp")
      private ResourceReferenceSerializer<TemporaryResourceReference, ExtendedURL> serializer;
      

      Examples outside of platform:

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: