Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1634

ClassName needs conversion from Path to dotted notation in AutoLinkResolver

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4-M1
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: None
    • Labels:
      None

      Description

      Current svn snapshot contains the following code in AutoLinkResolver.newAutoComponent:

      if (clazz != null)
      {
      // Href is relative. Resolve the url given relative to
      // the current page
      className = Packages.absolutePath(clazz, pathInfo.path);

      try

      { clazz = defaultClassResolver.resolveClass(className); return new AutolinkBookmarkablePageLink(autoId, clazz, pathInfo.getPageParameters(), pathInfo.anchor); }

      catch (ClassNotFoundException ex)

      { log.warn("Did not find corresponding java class: " + className); // fall through }

      }

      This obviously fails since Packages.absolutePath() return a path whereas the class resolver expects a classname. Simply add the conversion as in the beginning of this method (or even better, extrract this conversion into an utility method)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ivaynberg Igor Vaynberg
                Reporter:
                roland.huss Roland Huss
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: