Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.0, 3.0.1
-
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;