Author: chris.laprun(a)jboss.com
Date: 2007-12-17 20:32:23 -0500 (Mon, 17 Dec 2007)
New Revision: 9360
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/BehaviorRegistry.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/MarkupBehavior.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/ServiceObjectFactory.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/ResponseDebugFactory.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/UserContextConverter.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPExceptionFactory.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPUtils.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ConsumerRegistryService.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerSessionInformation.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/SessionHandler.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/servlet/RequestDumperFilter.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java
Log:
- Started migrating to Java 5: replaced for loops with new style syntax, started adding
types to collections.
- Allowed me to find a bug in SessionHandler.releaseSessions: was not properly adding the
session ids (was adding a List instead of adding the list elements).
- Add private constructor to utility objects accessed only via static methods.
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/BehaviorRegistry.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/BehaviorRegistry.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/BehaviorRegistry.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -27,7 +27,6 @@
import org.jboss.portal.wsrp.core.InvalidHandleFault;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
/**
@@ -37,7 +36,7 @@
*/
public class BehaviorRegistry
{
- private final Map behaviors = new HashMap();
+ private final Map<String, MarkupBehavior> behaviors = new HashMap<String,
MarkupBehavior>();
private PortletManagementBehavior portletManagementBehavior;
private ServiceDescriptionBehavior serviceDescriptionBehavior;
private RegistrationBehavior registrationBehavior;
@@ -63,7 +62,7 @@
{
if (behaviors.containsKey(handle))
{
- return (MarkupBehavior)behaviors.get(handle);
+ return behaviors.get(handle);
}
throw
WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
"There is no registered MarkupBehavior for handle '" + handle +
"'", null);
@@ -71,10 +70,9 @@
public void registerMarkupBehavior(MarkupBehavior behavior)
{
- for (Iterator handles = behavior.getSupportedHandles().iterator();
handles.hasNext();)
+ for (String handle : behavior.getSupportedHandles())
{
- String handle = (String)handles.next();
- MarkupBehavior existing = (MarkupBehavior)behaviors.get(handle);
+ MarkupBehavior existing = behaviors.get(handle);
if (existing != null)
{
throw new IllegalArgumentException("Cannot register behavior " +
behavior.getClass().getName()
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/MarkupBehavior.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/MarkupBehavior.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/MarkupBehavior.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -67,7 +67,7 @@
*/
public abstract class MarkupBehavior extends TestProducerBehavior implements
WSRP_v1_Markup_PortType
{
- private List handles = new ArrayList(3);
+ private List<String> handles = new ArrayList<String>(3);
private BehaviorRegistry registry;
@@ -152,7 +152,7 @@
// default implementation does not nothing
}
- public List getSupportedHandles()
+ public List<String> getSupportedHandles()
{
return handles;
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/ServiceObjectFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/ServiceObjectFactory.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/ServiceObjectFactory.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -43,6 +43,10 @@
public static final String SAMPLE_DISPLAYNAME = "SampleDisplayName";
public static final String SAMPLE_KEYWORD = "keyword";
+ private ServiceObjectFactory()
+ {
+ }
+
/**
* Create the dummiest form of LocalizedString
*
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/ResponseDebugFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/ResponseDebugFactory.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/ResponseDebugFactory.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -34,6 +34,10 @@
*/
public class ResponseDebugFactory
{
+ private ResponseDebugFactory()
+ {
+ }
+
/**
* Extracts information from ServiceDescription and puts into StringBuffer object
*
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/UserContextConverter.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/UserContextConverter.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/UserContextConverter.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -50,6 +50,10 @@
*/
public class UserContextConverter
{
+ private UserContextConverter()
+ {
+ }
+
public static UserContext
createPortalUserContextFrom(org.jboss.portal.wsrp.core.UserContext userContext,
String[] desiredLocales, String
preferredLocale)
{
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPExceptionFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPExceptionFactory.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPExceptionFactory.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -60,6 +60,10 @@
public static final String UNSUPPORTED_WINDOW_STATE =
"UnsupportedWindowState";
private static final String NS_PREFIX = "wsrp";
+ private WSRPExceptionFactory()
+ {
+ }
+
public static void throwMissingParametersFaultIfValueIsMissing(Object valueToCheck,
String valueName, String context)
throws SOAPFaultException
{
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -88,6 +88,10 @@
*/
public class WSRPTypeFactory
{
+ private WSRPTypeFactory()
+ {
+ }
+
/** ====== WSRP request objects ====== **/
/**
* registrationContext(RegistrationContext)?, desiredLocales(xsd:string)*
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPUtils.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPUtils.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPUtils.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -85,6 +85,10 @@
WSRP_JSR168_MODES.put(WSRPConstants.VIEW_MODE, Mode.VIEW);
}
+ private WSRPUtils()
+ {
+ }
+
public static WindowState getJSR168WindowStateFromWSRPName(String
wsrpWindowStateName)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(wsrpWindowStateName,
WSRP_WINDOW_STATE_NAME, null);
@@ -267,9 +271,9 @@
int size = registrationInfo.size();
PropertyDescription[] propertyDescriptions = new PropertyDescription[size];
int i = 0;
- for (Iterator props = registrationInfo.values().iterator(); props.hasNext();)
+ for (Object o : registrationInfo.values())
{
- RegistrationPropertyDescription property =
(RegistrationPropertyDescription)props.next();
+ RegistrationPropertyDescription property = (RegistrationPropertyDescription)o;
propertyDescriptions[i++] = convertToPropertyDescription(property);
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ActionHandler.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -59,7 +59,6 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -75,6 +74,7 @@
super(consumer);
}
+ @SuppressWarnings({"CastToConcreteClass"})
protected Object prepareRequest(RequestPrecursor requestPrecursor, PortletInvocation
invocation)
{
PortletContext portletContext = requestPrecursor.getPortletContext();
@@ -172,14 +172,13 @@
{
int capacity = params.size();
List formParameters = new ArrayList(capacity);
- for (Iterator paramEntries = params.entrySet().iterator();
paramEntries.hasNext();)
+ for (Map.Entry param : params.entrySet())
{
- Map.Entry param = (Map.Entry)paramEntries.next();
String name = (String)param.getKey();
String[] values = (String[])param.getValue();
- for (int i = 0; i < values.length; i++)
+ for (String value : values)
{
- formParameters.add(new NamedString(name, values[i]));
+ formParameters.add(new NamedString(name, value));
}
}
interactionParams.setFormParameters((NamedString[])formParameters.toArray(new
NamedString[capacity]));
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ConsumerRegistryService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ConsumerRegistryService.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ConsumerRegistryService.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -52,7 +52,7 @@
/** Gives access to the Portal's portlet invokers */
private FederatingPortletInvoker federatingPortletInvoker;
- private SortedMap consumers;
+ private SortedMap<String, WSRPConsumer> consumers;
private SessionFactory sessionFactory;
@@ -247,7 +247,7 @@
sessionFactory = (SessionFactory)initialContext.lookup(sessionFactoryJNDIName);
// load the configured consumers
- consumers = new TreeMap();
+ consumers = new TreeMap<String, WSRPConsumer>();
Session session = sessionFactory.getCurrentSession();
@@ -285,10 +285,8 @@
{
sessionFactory = null;
- for (Iterator consumersIt = consumers.values().iterator(); consumersIt.hasNext();)
+ for (WSRPConsumer consumer : consumers.values())
{
- WSRPConsumer consumer = (WSRPConsumer)consumersIt.next();
-
// if producer is not active, it shouldn't be registered with the federating
portlet invoker, hence do not
// unregister it.
if (consumer.getProducerInfo().isActive())
@@ -318,7 +316,7 @@
public WSRPConsumer getConsumer(String id)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "consumer
id", null);
- return (WSRPConsumer)consumers.get(id);
+ return consumers.get(id);
}
public void registerOrDeregisterConsumerWith(String id, boolean register)
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -93,13 +93,13 @@
private CookieProtocol requiresInitCookie;
/** The Producer-Offered Portlets (handle -> WSRPPortlet) */
- private Map popsMap;
+ private Map<String, Portlet> popsMap;
/** A cache for Consumer-Configured Portlets (handle -> WSRPPortlet) */
- private Map ccpsMap;
+ private Map<String, Portlet> ccpsMap;
/** Portlet groups. */
- private Map portletGroups;
+ private Map<String, Set<Portlet>> portletGroups;
/** Time at which the cache expires */
private long expirationTimeMillis;
@@ -177,7 +177,7 @@
}
else
{
- return valid.booleanValue();
+ return valid;
}
}
@@ -404,8 +404,8 @@
{
int length = portletDescriptions.length;
log.debug("Extracting " + length + " portlets.");
- popsMap = new LinkedHashMap(length);
- portletGroups = new HashMap();
+ popsMap = new LinkedHashMap<String, Portlet>(length);
+ portletGroups = new HashMap<String, Set<Portlet>>();
for (int i = 0; i < length; i++)
{
@@ -420,8 +420,8 @@
}
else
{
- popsMap = Collections.EMPTY_MAP;
- portletGroups = Collections.EMPTY_MAP;
+ popsMap = Collections.emptyMap();
+ portletGroups = Collections.emptyMap();
}
//todo: could extract more information here... and rename method more
appropriately
@@ -461,10 +461,10 @@
String portletGroupId = portletDescription.getGroupID();
if (portletGroupId != null)
{
- Set groupedPortlets = (Set)portletGroups.get(portletGroupId);
+ Set<Portlet> groupedPortlets = portletGroups.get(portletGroupId);
if (groupedPortlets == null)
{
- groupedPortlets = new HashSet();
+ groupedPortlets = new HashSet<Portlet>();
portletGroups.put(portletGroupId, groupedPortlets);
}
groupedPortlets.add(wsrpPortlet);
@@ -506,7 +506,7 @@
// add the portlet to the CCP cache
if (ccpsMap == null)
{
- ccpsMap = new HashMap();
+ ccpsMap = new HashMap<String, Portlet>();
}
ccpsMap.put(portletHandle, portlet);
@@ -544,24 +544,24 @@
{
log.debug("Trying cached POPs");
- portlet = (Portlet)popsMap.get(portletHandle);
+ portlet = popsMap.get(portletHandle);
if (portlet == null && ccpsMap != null)
{
log.debug("Trying cached CCPs");
- portlet = (Portlet)ccpsMap.get(portletHandle);
+ portlet = ccpsMap.get(portletHandle);
}
}
return portlet;
}
- public Map getPortletGroupMap() throws PortletInvokerException
+ public Map<String, Set<Portlet>> getPortletGroupMap() throws
PortletInvokerException
{
refresh(false);
return portletGroups;
}
- public Map getPortletMap() throws PortletInvokerException
+ public Map<String, Portlet> getPortletMap() throws PortletInvokerException
{
refresh(false);
return popsMap;
@@ -571,7 +571,7 @@
private boolean useCache()
{
- return persistentExpirationCacheSeconds != null &&
persistentExpirationCacheSeconds.intValue() > 0;
+ return persistentExpirationCacheSeconds != null &&
persistentExpirationCacheSeconds > 0;
}
private void resetCacheTimerIfNeeded()
@@ -579,7 +579,7 @@
if (useCache())
{
// reset expiration time
- expirationTimeMillis = System.currentTimeMillis() +
(persistentExpirationCacheSeconds.intValue() * 1000);
+ expirationTimeMillis = System.currentTimeMillis() +
(persistentExpirationCacheSeconds * 1000);
}
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerSessionInformation.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerSessionInformation.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerSessionInformation.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -33,7 +33,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -52,13 +51,13 @@
private boolean perGroupCookies = false;
/** group id -> Cookie[] */
- private Map groupCookies;
+ private Map<String, Cookie[]> groupCookies;
/** portlet handle -> SessionInfo */
- private Map portletSessions;
+ private Map<String, SessionInfo> portletSessions;
/** session id -> portlet handle */
- private Map sessionId2PortletHandle;
+ private Map<String, String> sessionId2PortletHandle;
/** Cookies sent by the remote producer */
private Cookie[] userCookie;
@@ -156,7 +155,7 @@
if (groupCookies == null)
{
- groupCookies = new HashMap();
+ groupCookies = new HashMap<String, Cookie[]>();
}
if (groupCookies.containsKey(groupId))
@@ -175,7 +174,7 @@
}
// purge expired cookies
- Cookie[] cookies = (Cookie[])groupCookies.get(groupId);
+ Cookie[] cookies = groupCookies.get(groupId);
cookies = purgeExpiredCookies(cookies);
// if there are no non-expired cookies left, we will need to re-init them
@@ -202,8 +201,8 @@
if (portletSessions == null)
{
- portletSessions = new HashMap();
- sessionId2PortletHandle = new HashMap();
+ portletSessions = new HashMap<String, SessionInfo>();
+ sessionId2PortletHandle = new HashMap<String, String>();
}
portletSessions.put(portletHandle, info);
@@ -254,7 +253,7 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(sessionId, "session
id");
- String portletHandle = (String)sessionId2PortletHandle.get(sessionId);
+ String portletHandle = sessionId2PortletHandle.get(sessionId);
if (portletHandle == null)
{
throw new IllegalArgumentException("No such session id: '" +
sessionId + "'");
@@ -267,16 +266,15 @@
* @return a list containing the session ids that were still valid when they were
removed and would need to be
* released
*/
- public List removeSessions()
+ public List<String> removeSessions()
{
- List idsToRelease = new ArrayList(getNumberOfSessions());
+ List<String> idsToRelease = new
ArrayList<String>(getNumberOfSessions());
// copy to avoid ConcurrentModificationException
- List handlesCopy = new ArrayList(portletSessions.keySet());
+ List<String> handlesCopy = new
ArrayList<String>(portletSessions.keySet());
- for (Iterator handles = handlesCopy.iterator(); handles.hasNext();)
+ for (String handle : handlesCopy)
{
- String handle = (String)handles.next();
SessionIdResult result = removeSessionIdForPortlet(handle);
// only release sessions that are still valid
@@ -364,17 +362,16 @@
*/
private Cookie[] purgeExpiredCookies(Cookie[] cookies)
{
- List cleanCookies = Tools.toList(cookies);
+ List<Cookie> cleanCookies = Tools.toList(cookies);
- for (int i = 0; i < cookies.length; i++)
+ for (Cookie cookie : cookies)
{
- Cookie cookie = cookies[i];
if (cookie.isExpired())
{
cleanCookies.remove(cookie);
}
}
- return (Cookie[])cleanCookies.toArray(new Cookie[0]);
+ return cleanCookies.toArray(new Cookie[cleanCookies.size()]);
}
private SessionIdResult internalGetSessionIdForPortlet(String portletHandle)
@@ -410,14 +407,14 @@
return null;
}
- return (SessionInfo)portletSessions.get(portletHandle);
+ return portletSessions.get(portletHandle);
}
/**
- * @return
+ * @return the known session id
* @since 2.6
*/
- Collection getSessionIds()
+ Collection<String> getSessionIds()
{
return sessionId2PortletHandle.keySet();
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -41,7 +41,6 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -209,7 +208,7 @@
throw new IllegalStateException("Registration status not yet known: call
refresh first!");
}
- return requiresRegistration.booleanValue();
+ return requiresRegistration;
}
/**
@@ -227,7 +226,7 @@
throw new IllegalStateException("Registration status not yet known: call
refresh first!");
}
- return !requiresRegistration.booleanValue();
+ return !requiresRegistration;
}
public boolean hasLocalInfo()
@@ -241,13 +240,13 @@
{
registrationData = WSRPTypeFactory.createDefaultRegistrationData();
registrationData.setConsumerName(persistentConsumerName);
- List properties = new ArrayList();
+ List<Property> properties = new ArrayList<Property>();
Map regProps = getRegistrationProperties();
if (!regProps.isEmpty())
{
- for (Iterator entries = regProps.values().iterator(); entries.hasNext();)
+ for (Object o : regProps.values())
{
- RegistrationProperty prop = (RegistrationProperty)entries.next();
+ RegistrationProperty prop = (RegistrationProperty)o;
String value = prop.getValue();
if (value != null && !prop.isDeterminedInvalid())
{
@@ -255,7 +254,7 @@
}
}
- registrationData.setRegistrationProperties((Property[])properties.toArray(new
Property[regProps.size()]));
+ registrationData.setRegistrationProperties(properties.toArray(new
Property[regProps.size()]));
}
}
@@ -416,9 +415,9 @@
checkForExtraProperties(producerId, result, expectedNames,
persistentRegistrationProperties, !mergeWithLocalInfo);
// Merge existing properties
- for (Iterator props = descriptionsMap.values().iterator();
props.hasNext();)
+ for (Object o : descriptionsMap.values())
{
- RegistrationProperty prop = (RegistrationProperty)props.next();
+ RegistrationProperty prop = (RegistrationProperty)o;
String name = prop.getName();
RegistrationProperty existing = getRegistrationProperty(name);
if (existing != null)
@@ -473,7 +472,7 @@
}
// if issues have been detected, mark the registration as invalid (but do not
reset the data)
- consistentWithProducerExpectations = Boolean.valueOf(!result.hasIssues());
+ consistentWithProducerExpectations = !result.hasIssues();
String msg = "Registration configuration is " + (result.hasIssues() ?
"NOT " : "") + "valid";
result.appendToStatus(msg);
@@ -519,7 +518,6 @@
* @param result
* @param expectedNames
* @param properties
- * @return a set of the property names expected by the producer
*/
private void checkForExtraProperties(String producerId, RegistrationRefreshResult
result, Set expectedNames, Map properties, boolean keepExtra)
{
@@ -569,10 +567,9 @@
{
if (descriptions != null)
{
- Map result = new HashMap(descriptions.length);
- for (int i = 0; i < descriptions.length; i++)
+ Map<String, RegistrationProperty> result = new HashMap<String,
RegistrationProperty>(descriptions.length);
+ for (PropertyDescription description : descriptions)
{
- PropertyDescription description = descriptions[i];
String name = description.getName();
RegistrationPropertyDescription desc =
WSRPUtils.convertToRegistrationPropertyDescription(description);
RegistrationProperty prop = new RegistrationProperty(name, null,
WSRPUtils.toString(desc.getLang()));
@@ -614,9 +611,9 @@
// mark the registration properties as valid
if (persistentRegistrationProperties != null)
{
- for (Iterator props = persistentRegistrationProperties.values().iterator();
props.hasNext();)
+ for (Object o : persistentRegistrationProperties.values())
{
- RegistrationProperty prop = (RegistrationProperty)props.next();
+ RegistrationProperty prop = (RegistrationProperty)o;
prop.setInvalid(Boolean.FALSE, null);
}
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/SessionHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/SessionHandler.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/SessionHandler.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -30,6 +30,7 @@
import org.jboss.portal.api.session.event.PortalSessionEvent;
import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.portlet.InvokerUnavailableException;
+import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.wsrp.WSRPTypeFactory;
@@ -46,7 +47,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -70,7 +70,7 @@
private static final String SESSION_ID_PREFIX =
"org.jboss.portal.wsrp.session.";
/** session id -> ProducerSessionInformation */
- private Map sessionInfos = new HashMap(); // todo: thread-safe?
+ private Map<String, ProducerSessionInformation> sessionInfos = new
HashMap<String, ProducerSessionInformation>(); // todo: thread-safe?
/**
* Constructs a new SessionHandler.
@@ -158,14 +158,12 @@
{
log.debug("Cookie initialization per group requested.");
sessionInformation.setPerGroupCookies(true);
- Map groups = consumer.getPortletGroupMap();
+ Map<String, Set<Portlet>> groups = consumer.getPortletGroupMap();
try
{
- String groupId;
- for (Iterator groupIds = groups.keySet().iterator(); groupIds.hasNext();)
+ for (String groupId : groups.keySet())
{
- groupId = (String)groupIds.next();
RequestHeaderClientHandler.setCurrentGroupId(groupId);
log.debug("Initializing cookie for group '" + groupId +
"'.");
initCookie(initCookie, invocation, retryIfFails);
@@ -310,14 +308,13 @@
/** @since 2.6 */
void releaseSessions() throws PortletInvokerException
{
- List idsToRelease = new ArrayList(sessionInfos.size());
+ List<String> idsToRelease = new ArrayList<String>();
- Set uniqueInfos = new HashSet(sessionInfos.values());
+ Set<ProducerSessionInformation> uniqueInfos = new
HashSet<ProducerSessionInformation>(sessionInfos.values());
- for (Iterator infos = uniqueInfos.iterator(); infos.hasNext();)
+ for (ProducerSessionInformation info : uniqueInfos)
{
- ProducerSessionInformation info = (ProducerSessionInformation)infos.next();
- idsToRelease.add(info.removeSessions());
+ idsToRelease.addAll(info.removeSessions());
}
internalReleaseSessions(idsToRelease);
@@ -332,12 +329,11 @@
{
if (sessionIds != null)
{
- List idsToRelease = new ArrayList();
+ List<String> idsToRelease = new ArrayList<String>();
- for (int i = 0; i < sessionIds.length; i++)
+ for (String sessionId : sessionIds)
{
- String sessionId = sessionIds[i];
- ProducerSessionInformation info =
(ProducerSessionInformation)sessionInfos.get(sessionId);
+ ProducerSessionInformation info = sessionInfos.get(sessionId);
sessionId = info.removeSession(sessionId);
if (sessionId != null)
{
@@ -349,12 +345,12 @@
}
}
- private void internalReleaseSessions(List idsToRelease) throws
PortletInvokerException
+ private void internalReleaseSessions(List<String> idsToRelease) throws
PortletInvokerException
{
if (idsToRelease != null && !idsToRelease.isEmpty())
{
ReleaseSessions releaseSessions =
WSRPTypeFactory.createReleaseSessions(consumer.getRegistrationContext(),
- (String[])idsToRelease.toArray(new String[0]));
+ idsToRelease.toArray(new String[idsToRelease.size()]));
try
{
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -74,7 +74,6 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Locale;
@@ -106,7 +105,7 @@
}
/** The default user scopes as per the specification (6.1.4) */
- private static final Set WSRP_DEFAULT_USER_SCOPE = new HashSet(2);
+ private static final Set<String> WSRP_DEFAULT_USER_SCOPE = new
HashSet<String>(2);
static
{
@@ -208,8 +207,7 @@
WSRPUtils.convertToWSRPPortletContext(portletContext),
UserAccess.getUserContext());
try
{
- PortletContext newPortletContext =
WSRPUtils.convertToPortalPortletContext(getPortletManagementService().clonePortlet(clonePortlet));
- return newPortletContext;
+ return
WSRPUtils.convertToPortalPortletContext(getPortletManagementService().clonePortlet(clonePortlet));
}
catch (Exception e)
{
@@ -227,27 +225,27 @@
return Collections.EMPTY_LIST;
}
- List handles = new ArrayList(numberOfClones);
- for (Iterator contexts = portletContexts.iterator(); contexts.hasNext();)
+ List<String> handles = new ArrayList<String>(numberOfClones);
+ for (Object portletContext : portletContexts)
{
- PortletContext context = (PortletContext)contexts.next();
+ PortletContext context = (PortletContext)portletContext;
String id = context.getId();
handles.add(id);
}
log.debug("Attempting to destroy clones: " + handles);
DestroyPortlets destroyPortlets =
WSRPTypeFactory.createDestroyPortlets(getRegistrationContext(),
- (String[])handles.toArray(new String[0]));
+ handles.toArray(new String[handles.size()]));
try
{
DestroyPortletsResponse response =
getPortletManagementService().destroyPortlets(destroyPortlets);
DestroyFailed[] failures = response.getDestroyFailed();
- List result = Collections.EMPTY_LIST;
+ List<DestroyCloneFailure> result = Collections.emptyList();
if (failures != null)
{
int failureNumbers = failures.length;
- result = new ArrayList(failureNumbers);
+ result = new ArrayList<DestroyCloneFailure>(failureNumbers);
// list all the failures and successes
for (int i = 0; i < failureNumbers; i++)
{
@@ -262,9 +260,9 @@
// update ProducerInfo's caches by removing all the successfully destroyed
clones
if (!handles.isEmpty())
{
- for (Iterator destroyed = handles.iterator(); destroyed.hasNext();)
+ for (String handle : handles)
{
- producerInfo.removeHandleFromCaches((String)destroyed.next());
+ producerInfo.removeHandleFromCaches(handle);
}
}
@@ -280,7 +278,7 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(keys, "Portlet ids");
- return getProperties(portletContext, (String[])keys.toArray(new String[0]));
+ return getProperties(portletContext, (String[])keys.toArray(new
String[keys.size()]));
}
private PropertyMap getProperties(PortletContext portletContext, String[] keys) throws
PortletInvokerException
@@ -344,8 +342,8 @@
PropertyList propertyList = WSRPTypeFactory.createPropertyList();
int changesNumber = changes.length;
- List updates = new ArrayList(changesNumber);
- List resets = new ArrayList(changesNumber);
+ List<Property> updates = new ArrayList<Property>(changesNumber);
+ List<ResetProperty> resets = new
ArrayList<ResetProperty>(changesNumber);
for (int i = 0; i < changesNumber; i++)
{
PropertyChange change = changes[i];
@@ -365,8 +363,8 @@
throw new IllegalArgumentException("Unexpected property change type:
" + change.getType());
}
}
- propertyList.setProperties((Property[])updates.toArray(new Property[0]));
- propertyList.setResetProperties((ResetProperty[])resets.toArray(new
ResetProperty[0]));
+ propertyList.setProperties(updates.toArray(new Property[updates.size()]));
+ propertyList.setResetProperties(resets.toArray(new ResetProperty[resets.size()]));
SetPortletProperties setPortletProperties =
WSRPTypeFactory.createSetPortletProperties(getRegistrationContext(),
WSRPUtils.convertToWSRPPortletContext(portletContext), propertyList);
@@ -396,7 +394,7 @@
// Portlet-related methods
******************************************************************************************
- public Map getPortletGroupMap() throws PortletInvokerException
+ public Map<String, Set<Portlet>> getPortletGroupMap() throws
PortletInvokerException
{
return producerInfo.getPortletGroupMap();
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -35,7 +35,6 @@
import org.xml.sax.EntityResolver;
import java.net.URL;
-import java.util.Iterator;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -117,9 +116,9 @@
{
super.start(di);
WSRPDeployment deployment = (WSRPDeployment)di.metaData;
- for (Iterator i = deployment.getConsumers().iterator(); i.hasNext();)
+ for (Object o : deployment.getConsumers())
{
- WSRPConsumer consumer = (WSRPConsumer)i.next();
+ WSRPConsumer consumer = (WSRPConsumer)o;
try
{
consumerRegistry.activateConsumerWith(consumer.getProducerId());
@@ -134,11 +133,11 @@
public void stop(DeploymentInfo di) throws DeploymentException
{
WSRPDeployment deployment = (WSRPDeployment)di.metaData;
- for (Iterator i = deployment.getConsumers().iterator(); i.hasNext();)
+ for (Object o : deployment.getConsumers())
{
try
{
- WSRPConsumer consumer = (WSRPConsumer)i.next();
+ WSRPConsumer consumer = (WSRPConsumer)o;
consumer.stop();
}
catch (Exception e)
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -138,12 +138,14 @@
Set keySet = prefsInfo.getKeys();
descs = new PropertyDescription[keySet.size()];
int index = 0;
- for (Iterator keys = keySet.iterator(); keys.hasNext();)
+ for (Object key : keySet)
{
- PreferenceInfo prefInfo = prefsInfo.getPreference((String)keys.next());
+ PreferenceInfo prefInfo = prefsInfo.getPreference((String)key);
// WSRP Spec 8.7: return only the portion of the Portlet's persistent
state the user is allowed to modify
- if (!prefInfo.isReadOnly().booleanValue())
+ // if read only status is not determined, we consider it as being read-only
to be safe
+ Boolean readOnly = prefInfo.isReadOnly();
+ if (readOnly != null && !readOnly)
{
//todo: check what we should use key
//todo: right now we only support String properties
@@ -226,9 +228,9 @@
{
destroyFailed = new DestroyFailed[failuresNumber];
int i = 0;
- for (Iterator failures = failuresList.iterator(); failures.hasNext();)
+ for (Object aFailuresList : failuresList)
{
- DestroyCloneFailure failure = (DestroyCloneFailure)failures.next();
+ DestroyCloneFailure failure = (DestroyCloneFailure)aFailuresList;
destroyFailed[i++] =
WSRPTypeFactory.createDestroyFailed(failure.getPortletId(), failure.getMessage());
}
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -126,9 +126,9 @@
}
- public Set getOfferedPortletDescriptions(String[] desiredLocales)
+ public Set<PortletDescription> getOfferedPortletDescriptions(String[]
desiredLocales)
{
- Set portlets;
+ Set<Portlet> portlets;
try
{
portlets = producer.getRemotablePortlets();
@@ -136,14 +136,13 @@
catch (PortletInvokerException e)
{
log.warn("Could not retrieve portlets. Reason:\n\t" +
e.getLocalizedMessage());
- return Collections.EMPTY_SET;
+ return Collections.emptySet();
}
- Set offeredPortletDescriptions = new HashSet(portlets.size());
+ Set<PortletDescription> offeredPortletDescriptions = new
HashSet<PortletDescription>(portlets.size());
- for (Iterator iterator = portlets.iterator(); iterator.hasNext();)
+ for (Portlet portlet : portlets)
{
- Portlet portlet = (Portlet)iterator.next();
PortletDescription desc = getPortletDescription(portlet, desiredLocales);
offeredPortletDescriptions.add(desc);
}
@@ -169,13 +168,14 @@
/**
* @param desiredLocales
- * @param registration here so that we can do filtering of portlets based on
registration data.
+ * @param registration here so that we can do filtering of portlets based on
registration data (not currently
+ * implemented)
* @return
*/
private PortletDescription[] getPortletDescriptions(String[] desiredLocales,
Registration registration)
{
- return (PortletDescription[])getOfferedPortletDescriptions(desiredLocales)
- .toArray(new PortletDescription[]{});
+ Set<PortletDescription> descriptions =
getOfferedPortletDescriptions(desiredLocales);
+ return descriptions.toArray(new PortletDescription[descriptions.size()]);
}
/**
@@ -271,9 +271,9 @@
String[] localeNames = new String[locales.size()];
int i = 0;
- for (Iterator iterator = locales.iterator(); iterator.hasNext();)
+ for (Object locale : locales)
{
- localeNames[i++] = WSRPUtils.toString((Locale)iterator.next());
+ localeNames[i++] = WSRPUtils.toString((Locale)locale);
}
return localeNames;
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -82,7 +82,6 @@
import java.rmi.RemoteException;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
/**
@@ -414,14 +413,13 @@
return portlet;
}
- Set getRemotablePortlets() throws PortletInvokerException
+ Set<Portlet> getRemotablePortlets() throws PortletInvokerException
{
log.debug("Retrieving remotable portlets");
- Set allPortlets = invoker.getPortlets();
- Set remotablePortlets = new HashSet(allPortlets.size());
- for (Iterator iterator = allPortlets.iterator(); iterator.hasNext();)
+ Set<Portlet> allPortlets = invoker.getPortlets();
+ Set<Portlet> remotablePortlets = new
HashSet<Portlet>(allPortlets.size());
+ for (Portlet portlet : allPortlets)
{
- Portlet portlet = (Portlet)iterator.next();
log.debug("Found portlet: " + portlet.getContext());
if (isRemotable(portlet))
{
@@ -501,12 +499,9 @@
{
return remotable.booleanValue();
}
- else
+ else if (isRemotableByDefault() != null)
{
- if (isRemotableByDefault() != null)
- {
- return isRemotableByDefault().booleanValue();
- }
+ return isRemotableByDefault().booleanValue();
}
return false;
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -63,7 +63,6 @@
private String configLocation;
private ProducerConfiguration configuration;
- private File dataDir;
private File config;
private static DefaultSchemaResolver RESOLVER;
@@ -96,6 +95,7 @@
{
MBeanServer server = MBeanServerLocator.locateJBoss();
ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File dataDir;
try
{
dataDir = (File)server.getAttribute(oname, "ServerDataDir");
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -38,7 +38,7 @@
* @version $Revision:5865 $
* @since 2.6
*/
-public class RegistrationPropertyDescription implements Cloneable, PropertyDescription
+public class RegistrationPropertyDescription implements PropertyDescription
{
private Long key;
private QName name;
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/servlet/RequestDumperFilter.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/servlet/RequestDumperFilter.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/servlet/RequestDumperFilter.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -36,7 +36,6 @@
import java.io.IOException;
import java.io.Reader;
import java.io.StringWriter;
-import java.util.Iterator;
import java.util.Map;
/**
@@ -76,9 +75,9 @@
tmp.append("servletPath=").append(req.getServletPath()).append('\n');
//
- for (Iterator i = req.getParameterMap().entrySet().iterator(); i.hasNext();)
+ for (Object o : req.getParameterMap().entrySet())
{
- Map.Entry entry = (Map.Entry)i.next();
+ Map.Entry entry = (Map.Entry)o;
String name = (String)entry.getKey();
String[] values = (String[])entry.getValue();
tmp.append("param.").append(name).append('=');
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java 2007-12-17
15:01:58 UTC (rev 9359)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/servlet/UserAccess.java 2007-12-18
01:32:23 UTC (rev 9360)
@@ -35,6 +35,10 @@
*/
public class UserAccess
{
+ private UserAccess()
+ {
+ }
+
public static String getUser()
{
HttpServletRequest req = ServletAccess.getRequest();