[gatein-commits] gatein SVN: r1885 - components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Feb 26 09:54:09 EST 2010


Author: chris.laprun at jboss.com
Date: 2010-02-26 09:54:09 -0500 (Fri, 26 Feb 2010)
New Revision: 1885

Modified:
   components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer/PortletState.java
Log:
- More specific error reporting.

Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer/PortletState.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer/PortletState.java	2010-02-26 14:32:31 UTC (rev 1884)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer/PortletState.java	2010-02-26 14:54:09 UTC (rev 1885)
@@ -1,27 +1,28 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
- * contributors as indicated by the @authors tag. See the                     *
- * copyright.txt in the distribution for a full listing of                    *
- * individual contributors.                                                   *
- *                                                                            *
- * This is free software; you can redistribute it and/or modify it            *
- * under the terms of the GNU Lesser General Public License as                *
- * published by the Free Software Foundation; either version 2.1 of           *
- * the License, or (at your option) any later version.                        *
- *                                                                            *
- * This software is distributed in the hope that it will be useful,           *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
- * Lesser General Public License for more details.                            *
- *                                                                            *
- * You should have received a copy of the GNU Lesser General Public           *
- * License along with this software; if not, write to the Free                *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.gatein.pc.portlet.state.producer;
 
+import org.gatein.common.util.ParameterValidation;
 import org.gatein.pc.api.state.PropertyMap;
 import org.gatein.pc.portlet.state.SimplePropertyMap;
 
@@ -52,14 +53,8 @@
 
    public PortletState(String portletId, PropertyMap properties)
    {
-      if (portletId == null)
-      {
-         throw new IllegalArgumentException();
-      }
-      if (properties == null)
-      {
-         throw new IllegalArgumentException();
-      }
+      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(portletId, "portlet id", "PortletState");
+      ParameterValidation.throwIllegalArgExceptionIfNull(properties, "PropertyMap");
       this.portletId = portletId;
       this.properties = properties;
       this.terminationTime = null;



More information about the gatein-commits mailing list