Author: julien_viet
Date: 2010-07-19 11:01:31 -0400 (Mon, 19 Jul 2010)
New Revision: 3653
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
Log:
UIPortalKey is a key in a map, therefore it's better to be immutable
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-07-19
09:12:49 UTC (rev 3652)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-07-19
15:01:31 UTC (rev 3653)
@@ -748,12 +748,23 @@
private class UIPortalKey
{
- private String ownerType;
- private String ownerId;
+ /** . */
+ private final String ownerType;
+ /** . */
+ private final String ownerId;
+
UIPortalKey(String _ownerType, String _ownerId)
{
+ if (_ownerType == null)
+ {
+ throw new NullPointerException();
+ }
+ if (_ownerId == null)
+ {
+ throw new NullPointerException();
+ }
this.ownerType = _ownerType;
this.ownerId = _ownerId;
}
Show replies by date