Neil Griffin created PLUTO-752:
----------------------------------
Summary: ChatRoomDemo injects dependent-scoped strings into
@ApplicationScoped bean
Key: PLUTO-752
URL: https://issues.apache.org/jira/browse/PLUTO-752
Project: Pluto
Issue Type: Bug
Components: demo portlets
Affects Versions: 3.0.1, 3.0.0
Reporter: Neil Griffin
Assignee: Neil Griffin
Fix For: 3.0.2
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:
{code:java|title=HelloWorldImage.java}
@Inject
@Namespace
private String pid;
{code}
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):
{code:java|title=HelloWorldImage.java}
@Inject
@ContextPath
private String ctxPath;
{code}
The fix would be to simply call {{req.getContextPath()}} since {{req}} is
already injected as the current portlet request:
{code:java|title=HelloWorldImage.java}
@Inject
private PortletRequest req;
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)