Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-752

ChatRoomDemo injects dependent-scoped strings into @ApplicationScoped bean

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0, 3.0.1
    • 3.1.0
    • demo portlets
    • None

    Description

      Similar to PLUTO-751, the ChatRoomDemo portlet has a class named HelloWorldImage.java that injects two dependent-scoped strings:

      The first is actually unused and should be removed from the code entirely:

      HelloWorldImage.java
      @Inject
      @Namespace
      private String pid;
      

      The second is used, but it is incorrect to inject a dependent-scoped String (the value for which is the context path, which is associated with the portlet request):

      HelloWorldImage.java
      @Inject
      @ContextPath
      private String ctxPath;
      

      The fix would be to simply call req.getContextPath() since req is already injected as the current portlet request:

      HelloWorldImage.java
      @Inject
      private PortletRequest req;
      

      Attachments

        Activity

          People

            ngriffin7a Neil Griffin (Inactive)
            ngriffin7a Neil Griffin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: