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

Log FileNotFoundException on missing attachment

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.8.4
    • 2.8.5, 2.9
    • Core & storage
    • None

    Description

      We messed with the repository and had an attachment folder without the actual attachment. This results in a FileNotFoundException in
      BasicAttachmentProvider.getAttachmentInfo(WikiPage, String, int)
      and comes up as the infamous
      java.lang.IllegalArgumentException: Attempt to provide a null filter - this should never happen. Please check your configuration (or if you're a developer, check your own code.)
      at com.ecyrd.jspwiki.filters.FilterManager.addPageFilter(FilterManager.java:145)

      A log in the FileNotFoundException catch block would help a lot:

      catch( FileNotFoundException e )

      { log.error("Can't get attachment properties for "+att, e ); return null; }

      Attachments

        Activity

          People

            metskem Harry Metske
            weberjn Jürgen Weber
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: