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

Log FileNotFoundException on missing attachment

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.4
    • Fix Version/s: 2.8.5, 2.9
    • Component/s: Core & storage
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: