Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2636

Non-unique advice IDs silently override each other in random order on application startup

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.0
    • Fix Version/s: 5.6.2, 5.7.0
    • Component/s: None
    • Labels:
      None

      Description

      Looks like Tapestry5 has had this behaviour for a long time if not always, not sure what were the reasons behind it, but it doesn't sound right and may lead to undefined behaviour.

      Maybe this is simply a misuse of the `new Orderer` constructor in the `RegistryImpl.java`: 

      @Override
      public List<ServiceAdvisor> findAdvisorsForService(ServiceDef3 serviceDef)
      {
          lock.check();
      
          assert serviceDef != null;
      
          Logger logger = getServiceLogger(serviceDef.getServiceId());
      
          Orderer<ServiceAdvisor> orderer = new Orderer<ServiceAdvisor>(logger); // <<<<<<<<<<<< Here
      
          for (Module module : moduleToServiceDefs.keySet())
      

      This is not the case with decorators, their IDs are forced to be unique, the implementation passes `true` as the second argument here.

      I believe it needs fixing, but because we've had it working like this for a long time, maybe with a symbol that preserves original behaviour that should not allow duplicate IDs by default?

       

        Attachments

          Activity

            People

            • Assignee:
              thiagohp Thiago Henrique De Paula Figueiredo
              Reporter:
              dmitrygusev Dmitry Gusev
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: