MyFaces Core
  1. MyFaces Core
  2. MYFACES-2928

FacesConfigurator cast for ApplicationImpl directly to load converter configuration, instead use RuntimeConfig object

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.9-SNAPSHOT, 1.2.10-SNAPSHOT, 2.0.3-SNAPSHOT
    • Fix Version/s: 1.1.9, 1.2.10, 2.0.3
    • Component/s: JSR-314
    • Labels:
      None

      Description

      Checking some code on myfaces I notice this lines on FacesConfigurator:

      if(application instanceof ApplicationImpl)
      {
      for (Iterator it = _dispenser.getConverterConfigurationByClassName(); it.hasNext()

      { String converterClassName = (String) it.next(); ((ApplicationImpl) application).addConverterConfiguration(converterClassName, _dispenser.getConverterConfiguration(converterClassName)); }

      }

      We should avoid that, and instead use RuntimeConfig object, because that is the right place to do that.

      The problem with this hack is what happen when Application object is wrapped. It is very rare that someone overrides this class, but on JSF 2.0 this problem become important, because it is valid to wrap Application object.

      The solution is just move the related code to RuntimeConfig object and call from ApplicationImpl doing a lookup to that location.

        Activity

        Leonardo Uribe created issue -
        Leonardo Uribe made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.1.9-SNAPSHOT [ 12315116 ]
        Fix Version/s 1.2.10-SNAPSHOT [ 12315114 ]
        Fix Version/s 2.0.3-SNAPSHOT [ 12315349 ]
        Resolution Fixed [ 1 ]
        Leonardo Uribe made changes -
        Fix Version/s 1.1.10 [ 12315979 ]
        Fix Version/s 1.2.10 [ 12315978 ]
        Fix Version/s 2.0.3 [ 12315976 ]
        Fix Version/s 1.2.10-SNAPSHOT [ 12315114 ]
        Fix Version/s 1.1.9-SNAPSHOT [ 12315116 ]
        Fix Version/s 2.0.3-SNAPSHOT [ 12315349 ]
        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Leonardo Uribe made changes -
        Fix Version/s 1.1.9 [ 12316154 ]
        Fix Version/s 1.1.10 [ 12315979 ]

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Leonardo Uribe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development