Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-317

ExternalDiffProvider

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.3
    • 2.7.x
    • Plugins
    • None
    • Solaris 10 Update 4, Sun Webserver 7.0u1, sun4v

    Description

      Setting diff provider to ExternaDiff provider in properties file:

      jspwiki.diffProvider = ExternalDiffProvider
      jspwiki.diffCommand = /usr/bin/diff -u %s1 %s2

      will not return the diff but "Invalid diff - probably something wrong with server setup." instead. The problem is in src/com/ecyrd/jspwiki/diff/ExternalDiffProvider.java file in makeDiffHtml() method.

      if (m_traditionalColorization) //FIXME, see comment near declaration...
      diff = colorizeDiff(diff);
      else
      diff = htmlWikiDiff;

      diff is initialized to null, then we call 'diff = colorizeDiff(diff)'. At this point diff was never changed and is still null. colorizeDiff() will return above mentioned message. The fix is simple,
      instead of passing diff to colorizeDiff we should pass htmlWikiDiff. As that variable contains the actuall diff.

      Attachments

        1. JSPWiki-317.patch
          0.7 kB
          Harry Metske

        Activity

          People

            metskem Harry Metske
            spity Jan Spitalnik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: