Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-1124

ResourceNotFoundException too verbose

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • framework-1.6.1, framework-1.8.0, framework-1.8.1
    • framework-2.0.0
    • Framework
    • None

    Description

      ModuleImpl logs stack traces for every resource that cannot be found. Often resources are optional or may be located at different locations.

      public URL getResourceByDelegation(String name)
      {
      try

      { return (URL) findClassOrResourceByDelegation(name, false); }

      catch (ClassNotFoundException ex)

      { // This should never be thrown because we are loading resources. }

      catch (ResourceNotFoundException ex)

      { m_logger.log( Logger.LOG_DEBUG, ex.getMessage(), ex); }

      return null;
      }

      Please consider a log message without stack trace and leave it to the client to be more verbose when appropriate.

      To log no message at all and simply return null would also be consistent with

      http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)

      Attachments

        Activity

          People

            rickhall Richard S. Hall
            tdiesler Thomas Diesler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: