Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-800

Resouce matching in jra seems incorrect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0.1
    • Core
    • None
    • Windows XP, Java 1.5

    Description

      For me, this resource

      @Get
      @HttpResource(location = "/player/most/comments/

      {maxCount}

      ")
      @WebResult(name = "PlayerList")
      public List<Integer> getMostCommented(@WebParam(name = "maxCount") int maxCount);

      Is matching this resource

      @Get
      @HttpResource(location = "/player/

      {ID}

      ")
      @WebResult(name = "Player")
      public Player getPlayer(@WebParam(name = "ID") int ID) throws PlayerNotFoundFault;

      The reason is that in ResourceUtil.java on line 38

      if (i == resource.length())

      { // if }

      is the last part of the resource, assume the
      // rest of the request uri matches
      return reqUri.length();
      }

      This seems incorrect to me ( could easily be wrong here ) seem like since you are assuming '}' to be the end, then you should return resource.length() and not the request lenght.

      Later when the correct resource ( the one that matches reqUri) is sent in, we already have a bestMatch = reqUri.lenth and the the check in URIMapper.java at line 46 does a > test so does not use the correct match.

      Attachments

        Activity

          People

            dandiep Daniel Diephouse
            derekshaw Derek Shaw
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: