diff --git a/cspell.json b/cspell.json new file mode 100644 index 00000000000..15d150cd748 --- /dev/null +++ b/cspell.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", + "words": [ + "Apereo", + "Cacheable", + "ClassPath", + "Gradle", + "Jasig", + "JDBC", + "Portlet", + "Portlets", + "RDBM", + "Respondr", + "Servlet", + "SpringFramework", + "uPortal" + ] +} diff --git a/docs/developer/soffits/soffit_data_model.md b/docs/developer/soffits/soffit_data_model.md index ab65c40fbca..e0f59f76656 100644 --- a/docs/developer/soffits/soffit_data_model.md +++ b/docs/developer/soffits/soffit_data_model.md @@ -77,14 +77,14 @@ public class Attributes { @SoffitModelAttribute("bearerJson") public String getBearerJson(Bearer bearer) { - String rslt = null; + String result = null; try { - rslt = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(bearer); + result = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(bearer); } catch (JsonProcessingException e) { final String msg = "Unable to write the Bearer object to JSON"; throw new RuntimeException(msg, e); } - return rslt; + return result; } } diff --git a/docs/fr/developper/soffits/soffit_modele_de_donnee.md b/docs/fr/developper/soffits/soffit_modele_de_donnee.md index 19547bd3cd7..ee83383fc0f 100644 --- a/docs/fr/developper/soffits/soffit_modele_de_donnee.md +++ b/docs/fr/developper/soffits/soffit_modele_de_donnee.md @@ -57,14 +57,14 @@ public class Attributes { @SoffitModelAttribute("bearerJson") public String getBearerJson(Bearer bearer) { - String rslt = null; + String result = null; try { - rslt = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(bearer); + result = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(bearer); } catch (JsonProcessingException e) { final String msg = "Unable to write the Bearer object to JSON"; throw new RuntimeException(msg, e); } - return rslt; + return result; } } diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/layout/dlm/remoting/GroupListHelperImpl.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/layout/dlm/remoting/GroupListHelperImpl.java index 4d4d08af8e6..3c6c19c7f10 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/layout/dlm/remoting/GroupListHelperImpl.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/layout/dlm/remoting/GroupListHelperImpl.java @@ -186,7 +186,7 @@ public JsonEntityBean getIndividualBestRootEntity( // So much for the easy path -- see if the user has any records at all for this specific // owner/activity - JsonEntityBean rslt = null; // Default + JsonEntityBean result = null; // Default final List permissionsOfRelevantActivity = new ArrayList(); for (String activity : permissionActivities) { permissionsOfRelevantActivity.addAll( @@ -219,18 +219,18 @@ public JsonEntityBean getIndividualBestRootEntity( if (!candidate.getEntityTypeAsString().equalsIgnoreCase(groupType)) { continue; } - if (rslt == null) { + if (result == null) { // First allowable selection; run with this one // unless/until we're forced to make a choice. - rslt = candidate; + result = candidate; } else { // For the present we'll assume the match with the most // children is the best; this approach should work // decently unless folks start putting redundant // permissions records in the DB for multiple levels of // the same rich hierarchy. - if (candidate.getChildren().size() > rslt.getChildren().size()) { - rslt = candidate; + if (candidate.getChildren().size() > result.getChildren().size()) { + result = candidate; } } } @@ -248,10 +248,10 @@ public JsonEntityBean getIndividualBestRootEntity( + "', permissionActivities='" + Arrays.toString(permissionActivities) + "' the following best root group: " - + rslt); + + result); } - return rslt; + return result; } /* diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/Attribute.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/Attribute.java index a7bc2d20335..b01bd997bab 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/Attribute.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/Attribute.java @@ -17,7 +17,7 @@ import java.io.Serializable; /** - * Simple class that wraps a string and provides a getter/setter. Nessescary for binding into the + * Simple class that wraps a string and provides a getter/setter. Necessary for binding into the * value of a Map in WebFlow */ public class Attribute implements Serializable { diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/StringListAttribute.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/StringListAttribute.java index a4373ebb48d..1c652f052b3 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/StringListAttribute.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/StringListAttribute.java @@ -22,7 +22,7 @@ public class StringListAttribute implements Serializable { private static final long serialVersionUID = 1L; - public static final List LIST_EMTPY_ITEMS = Arrays.asList("", null); + public static final List LIST_EMPTY_ITEMS = Arrays.asList("", null); private List value = new ArrayList(); public StringListAttribute() {} @@ -51,16 +51,16 @@ public List getValue() { * @return */ public boolean isBlank() { - boolean rslt = true; // default + boolean result = true; // default if (value != null) { for (String v : value) { if (StringUtils.isNotBlank(v)) { - rslt = false; + result = false; break; } } } - return rslt; + return result; } /** @param value the value to set */ @@ -77,7 +77,7 @@ public void setValue(String[] value) { } private void removeAllEmptyItems(List value) { - value.removeAll(LIST_EMTPY_ITEMS); + value.removeAll(LIST_EMPTY_ITEMS); } @Override diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/PersonForm.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/PersonForm.java index e5958b95ce2..7fad42bbb37 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/PersonForm.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/PersonForm.java @@ -81,12 +81,12 @@ public void setAttributes(Map attributes) { * @return The user's attributes that are not listed in accountEditAttributes */ public Map getCustomAttributes() { - Map rslt = + Map result = new HashMap(attributes); for (Preference p : accountEditAttributes) { - rslt.remove(p.getName()); + result.remove(p.getName()); } - return Collections.unmodifiableMap(rslt); + return Collections.unmodifiableMap(result); } public String getPassword() { diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/favorites/FavoritesUtils.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/favorites/FavoritesUtils.java index ccd18df1f69..83e20c40166 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/favorites/FavoritesUtils.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/favorites/FavoritesUtils.java @@ -242,7 +242,7 @@ public List getFavoritePortletLayoutNodes(IUserLayou } public Set getFavoritePortletDefinitions(IUserLayout layout) { - final Set rslt = new HashSet<>(); + final Set result = new HashSet<>(); final List favoriteLayoutNodes = getFavoritePortletLayoutNodes(layout); favoriteLayoutNodes.stream() @@ -267,11 +267,11 @@ public String getStringId() { final IPortletDefinition pDef = portletRegistry.getPortletDefinition(pId); if (pDef != null) { - rslt.add(pDef); + result.add(pDef); } } }); - return rslt; + return result; } /** diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupselector/EntityEnum.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupselector/EntityEnum.java index 3a944579706..96d9b43d41d 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupselector/EntityEnum.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupselector/EntityEnum.java @@ -58,14 +58,14 @@ public static EntityEnum getEntityEnum(String type) { } public static EntityEnum getEntityEnum(Class entityTypeClazz, boolean isGroup) { - EntityEnum rslt = null; + EntityEnum result = null; for (EntityEnum val : EntityEnum.values()) { if (val.getClazz().equals(entityTypeClazz) && val.isGroup() == isGroup) { - rslt = val; + result = val; break; } } - return rslt; + return result; } /** diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java index c0dcecb3486..17376046c45 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/localization/UserLocaleHelper.java @@ -154,7 +154,7 @@ public void updateUserLocale(HttpServletRequest request, String localeString) { localeManager.setUserLocales(Collections.singletonList(userLocale)); localeStore.updateUserLocales(person, new Locale[] {userLocale}); - // remove person layout framgent from session since it contains some of the data + // remove person layout fragment from session since it contains some of the data // in previous // translation and won't be cleared until next logout-login (applies when using // RDBMDistributedLayoutStore as user layout store). diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java index 77cb7e046ae..483edbf37a7 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonLookupHelperImpl.java @@ -462,16 +462,16 @@ protected Set getPermittedOwnAttributes( final Set generallyPermittedAttributes) { // The permttedOwnAttributes collection includes all the generallyPermittedAttributes - final Set rslt = new HashSet<>(generallyPermittedAttributes); + final Set result = new HashSet<>(generallyPermittedAttributes); for (String attr : personAttributeDao.getPossibleUserAttributeNames()) { if (principal.hasPermission( IPermission.PORTAL_USERS, IPermission.VIEW_OWN_USER_ATTRIBUTE_ACTIVITY, attr)) { - rslt.add(attr); + result.add(attr); } } - return rslt; + return result; } /** diff --git a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/swapper/AttributeSwapperHelperImpl.java b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/swapper/AttributeSwapperHelperImpl.java index 1db1da2e7b6..2610ea85a09 100644 --- a/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/swapper/AttributeSwapperHelperImpl.java +++ b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/swapper/AttributeSwapperHelperImpl.java @@ -255,7 +255,7 @@ public void resetAttributes(ExternalContext externalContext) { final Principal currentUser = externalContext.getCurrentUser(); final String uid = currentUser.getName(); - this.logger.warn("User '" + uid + "' reseting to default attributes"); + this.logger.warn("User '" + uid + "' resetting to default attributes"); // Remove the person directory override this.portalRootPersonAttributeDao.removeUserAttributeOverride(uid); diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/ChannelListController.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/ChannelListController.java index ef67d93f25f..e921419e214 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/ChannelListController.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/ChannelListController.java @@ -231,7 +231,7 @@ public ModelAndView getPortletRegistry( */ final Set favoritePortlets = calculateFavoritePortlets(request); - Map> rslt = + Map> result = getRegistry43( webRequest, user, @@ -245,10 +245,10 @@ public ModelAndView getPortletRegistry( if (Boolean.valueOf(favorite)) { log.debug( "Filtering out non-favorite portlets because 'favorite=true' was included in the query string"); - rslt = filterRegistryFavoritesOnly(rslt); + result = filterRegistryFavoritesOnly(result); } - return new ModelAndView("jsonView", "registry", rslt); + return new ModelAndView("jsonView", "registry", result); } /* @@ -269,7 +269,7 @@ private Map> getRegistryOriginal(WebRequest request, IPerso new HashSet<>(portletDefinitionRegistry.getAllPortletDefinitions()); // construct a new channel registry - Map> rslt = new TreeMap<>(); + Map> result = new TreeMap<>(); SortedSet categories = new TreeSet<>(); // add the root category and all its children to the registry @@ -311,8 +311,8 @@ private Map> getRegistryOriginal(WebRequest request, IPerso // Add even if no portlets in category categories.add(uncategorizedPortletsBean); - rslt.put(CATEGORIES_MAP_KEY, categories); - return rslt; + result.put(CATEGORIES_MAP_KEY, categories); + return result; } private ChannelCategoryBean prepareCategoryBean( @@ -410,7 +410,7 @@ private Map> getRegistry43( // tracking them // construct a new channel registry - Map> rslt = new TreeMap<>(); + Map> result = new TreeMap<>(); SortedSet categories = new TreeSet<>(); // add the root category and all its children to the registry @@ -459,8 +459,8 @@ private Map> getRegistry43( categories.add(unc); } - rslt.put(CATEGORIES_MAP_KEY, categories); - return rslt; + result.put(CATEGORIES_MAP_KEY, categories); + return result; } private PortletCategoryBean preparePortletCategoryBean( @@ -518,18 +518,18 @@ private PortletDefinitionBean preparePortletDefinitionBean( WebRequest req, IPortletDefinition portlet, Locale locale, Boolean favorite) { MarketplacePortletDefinition mktpd = marketplaceService.getOrCreateMarketplacePortletDefinition(portlet); - PortletDefinitionBean rslt = + PortletDefinitionBean result = PortletDefinitionBean.fromMarketplacePortletDefinition(mktpd, locale, favorite); // See api docs for postProcessIconUrlParameter() below IPortletDefinitionParameter iconParameter = - rslt.getParameters().get(ICON_URL_PARAMETER_NAME); + result.getParameters().get(ICON_URL_PARAMETER_NAME); if (iconParameter != null) { IPortletDefinitionParameter evaluated = postProcessIconUrlParameter(iconParameter, req); - rslt.putParameter(evaluated); + result.putParameter(evaluated); } - return rslt; + return result; } /* @@ -604,13 +604,13 @@ private Set calculateFavoritePortlets(HttpServletRequest req final UserPreferencesManager upm = (UserPreferencesManager) ui.getPreferencesManager(); final IUserLayoutManager ulm = upm.getUserLayoutManager(); final IUserLayout layout = ulm.getUserLayout(); - final Set rslt = favoritesUtils.getFavoritePortletDefinitions(layout); + final Set result = favoritesUtils.getFavoritePortletDefinitions(layout); log.debug( "Found the following favoritePortlets for user='{}': {}", request.getRemoteUser(), - rslt); - return rslt; + result); + return result; } private Map> filterRegistryFavoritesOnly( @@ -626,9 +626,9 @@ private Map> filterRegistryFavoritesOnly( } }); - final Map> rslt = new TreeMap<>(); - rslt.put(CATEGORIES_MAP_KEY, otpt); - return rslt; + final Map> result = new TreeMap<>(); + result.put(CATEGORIES_MAP_KEY, otpt); + return result; } /** diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/portlets/permissionsadmin/Assignment.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/portlets/permissionsadmin/Assignment.java index 2995999e9f4..b986434e911 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/portlets/permissionsadmin/Assignment.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/portlets/permissionsadmin/Assignment.java @@ -108,7 +108,7 @@ public void setType(Type type) { this.type = type; } - public Assignment findDecendentOrSelfIfExists(JsonEntityBean principal) { + public Assignment findDescendantOrSelfIfExists(JsonEntityBean principal) { // Assertions. if (principal == null) { @@ -116,23 +116,23 @@ public Assignment findDecendentOrSelfIfExists(JsonEntityBean principal) { throw new IllegalArgumentException(msg); } - Assignment rslt = null; // default... + Assignment result = null; // default... if (principal.getId().equals(this.principal.getId()) && principal .getEntityTypeAsString() .equals(this.principal.getEntityTypeAsString())) { - rslt = this; + result = this; } else { for (Assignment a : children) { - rslt = a.findDecendentOrSelfIfExists(principal); - if (rslt != null) { + result = a.findDescendantOrSelfIfExists(principal); + if (result != null) { break; } } } - return rslt; + return result; } public String getPrincipalId() { diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PagsRESTController.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PagsRESTController.java index 27578a21aa4..43b76bab935 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PagsRESTController.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PagsRESTController.java @@ -134,11 +134,11 @@ public class PagsRESTController { (IEntityGroup) GroupService.getGroupMember(eids[0]); // Names must be unique IPerson person = personManager.getPerson(request); - IPersonAttributesGroupDefinition rslt; + IPersonAttributesGroupDefinition result; try { // A little weird that we need to do both; // need some PAGS DAO/Service refactoring - rslt = + result = pagsService.createPagsDefinition( person, parentGroup, inpt.getName(), inpt.getDescription()); // NOTE: We are also obligated to establish the backlink @@ -146,11 +146,11 @@ public class PagsRESTController { // little purpose and could be removed. for (IPersonAttributesGroupTestGroupDefinition testGroupDef : inpt.getTestGroups()) { // NOTE: The deserializer handles testDef --> testGroupDef - testGroupDef.setGroup(rslt); + testGroupDef.setGroup(result); } - rslt.setTestGroups(inpt.getTestGroups()); - rslt.setMembers(inpt.getMembers()); - pagsService.updatePagsDefinition(person, rslt); + result.setTestGroups(inpt.getTestGroups()); + result.setMembers(inpt.getMembers()); + pagsService.updatePagsDefinition(person, result); } catch (RuntimeAuthorizationException rae) { res.setStatus(HttpServletResponse.SC_FORBIDDEN); return "{ 'error': 'not authorized' }"; @@ -162,7 +162,7 @@ public class PagsRESTController { res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); return "{ 'error': '" + e.getMessage() + "' }"; } - return respondPagsGroupJson(res, rslt, person, HttpServletResponse.SC_CREATED); + return respondPagsGroupJson(res, result, person, HttpServletResponse.SC_CREATED); } @RequestMapping( @@ -206,7 +206,7 @@ public class PagsRESTController { } IPerson person = personManager.getPerson(req); - IPersonAttributesGroupDefinition rslt; + IPersonAttributesGroupDefinition result; try { IPersonAttributesGroupDefinition currentDef = pagsService.getPagsDefinitionByName(person, name); @@ -229,7 +229,7 @@ public class PagsRESTController { testGroupDef.setGroup(currentDef); } currentDef.setTestGroups(inpt.getTestGroups()); - rslt = pagsService.updatePagsDefinition(person, currentDef); + result = pagsService.updatePagsDefinition(person, currentDef); } catch (IllegalArgumentException iae) { res.setStatus(HttpServletResponse.SC_NOT_FOUND); return "{ 'error': '" + iae.getMessage() + "' }"; // should be escaped @@ -240,7 +240,7 @@ public class PagsRESTController { res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); return "{ 'error': '" + e.toString() + "' }"; } - return respondPagsGroupJson(res, rslt, person, HttpServletResponse.SC_ACCEPTED); + return respondPagsGroupJson(res, result, person, HttpServletResponse.SC_ACCEPTED); } /* diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PortletsRESTController.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PortletsRESTController.java index 6eaf763240e..9289bed672b 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PortletsRESTController.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/PortletsRESTController.java @@ -206,12 +206,12 @@ public ModelAndView getPortlet( final IPortletWindow portletWindow = portletWindowRegistry.getOrCreateDefaultPortletWindow( wrapper.getRequest(), portletDef.getPortletDefinitionId()); - final String rslt = + final String result = portletExecutionManager.getPortletOutput( portletWindow.getPortletWindowId(), wrapper.getRequest(), wrapper.getResponse()); - return rslt; + return result; } catch (Exception e) { logger.error("Failed to render the requested portlet '{}'", fname, e); res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); @@ -226,17 +226,18 @@ public ModelAndView getPortlet( private IAuthorizationPrincipal getAuthorizationPrincipal(HttpServletRequest req) { IPerson user = personManager.getPerson(req); EntityIdentifier ei = user.getEntityIdentifier(); - IAuthorizationPrincipal rslt = authorizationService.newPrincipal(ei.getKey(), ei.getType()); - return rslt; + IAuthorizationPrincipal result = + authorizationService.newPrincipal(ei.getKey(), ei.getType()); + return result; } private Set getPortletCategories(IPortletDefinition pdef) { Set categories = portletCategoryRegistry.getParentCategories(pdef); - Set rslt = new HashSet(); + Set result = new HashSet(); for (PortletCategory category : categories) { - rslt.add(StringUtils.capitalize(category.getName().toLowerCase())); + result.add(StringUtils.capitalize(category.getName().toLowerCase())); } - return rslt; + return result; } private Set getFavorites(HttpServletRequest request) { diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/oauth/OidcUserInfoController.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/oauth/OidcUserInfoController.java index 1d63f4aa7f5..a8b82540dac 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/oauth/OidcUserInfoController.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/oauth/OidcUserInfoController.java @@ -179,20 +179,20 @@ public ResponseEntity oauthToken( // STEP 4: build a standard OAuth2 access token response final String token = createToken(request, person, claims, groups); - final Map rslt = new HashMap<>(); - rslt.put("access_token", token); - rslt.put("token_type", "bearer"); - rslt.put( + final Map result = new HashMap<>(); + result.put("access_token", token); + result.put("token_type", "bearer"); + result.put( "expires_in", timeoutSeconds > 2 ? timeoutSeconds - 2L /* fudge factor */ : timeoutSeconds); - rslt.put("scope", scope); + result.put("scope", scope); logger.debug( "Produced the following access token for client_id='{}': {}", oAuthClient.getClientId(), - rslt); + result); - return ResponseEntity.ok(rslt); + return ResponseEntity.ok(result); } private String createToken( diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java index 89d3f160650..87ddb62c659 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/permissions/PermissionsRESTController.java @@ -401,24 +401,24 @@ private List getPermissionsForEntity( } } - List rslt = new ArrayList<>(); + List result = new ArrayList<>(); for (UniquePermission permission : directAssignments) { if (p.hasPermission( permission.getOwner(), permission.getActivity(), permission.getIdentifier())) { - rslt.add(getPermissionForPrincipal(permission, entity)); + result.add(getPermissionForPrincipal(permission, entity)); } } for (UniquePermission permission : inheritedAssignments) { if (p.hasPermission( permission.getOwner(), permission.getActivity(), permission.getIdentifier())) { - rslt.add(getPermissionForPrincipal(permission, entity)); + result.add(getPermissionForPrincipal(permission, entity)); } } - Collections.sort(rslt); + Collections.sort(result); - return rslt; + return result; } private JsonPermission getPermissionForPrincipal( diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/search/PeopleSearchStrategy.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/search/PeopleSearchStrategy.java index e1da8508ec8..67622b62921 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/search/PeopleSearchStrategy.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/search/PeopleSearchStrategy.java @@ -51,7 +51,7 @@ public String getResultTypeName() { @Override public List search(String query, HttpServletRequest request) { - final List rslt = new ArrayList<>(); + final List result = new ArrayList<>(); final IPerson user = personManager.getPerson(request); @@ -63,9 +63,9 @@ public List search(String query, HttpServletRequest request) { final List people = lookupHelper.searchForPeople(user, queryPplAttrMap); if (people != null) { for (IPersonAttributes p : people) { - rslt.add(p.getAttributes()); + result.add(p.getAttributes()); } } - return rslt; + return result; } } diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/search/PortletsSearchStrategy.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/search/PortletsSearchStrategy.java index 0133b8fdda7..edf93bdd190 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/search/PortletsSearchStrategy.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/search/PortletsSearchStrategy.java @@ -107,7 +107,7 @@ public String getResultTypeName() { @Override public List search(String query, HttpServletRequest request) { logger.debug("Entering search() with query={}", query); - final List rslt = new ArrayList<>(); + final List result = new ArrayList<>(); final Set favorites = getFavorites(request); try (IndexReader indexReader = DirectoryReader.open(directory)) { @@ -144,7 +144,7 @@ public List search(String query, HttpServletRequest request) { scoreStr, hashKey, query); - rslt.add( + result.add( getPortletAttrs(portlet, url, scoreStr, favorites)); } } catch (IOException e) { @@ -163,7 +163,7 @@ public List search(String query, HttpServletRequest request) { logger.warn("Failed to search portal content for query='{}'", query, e); } - return rslt; + return result; } private Map getPortletAttrs( @@ -171,19 +171,19 @@ private Map getPortletAttrs( String url, String score, Set favorites) { - final Map rslt = new TreeMap<>(); - rslt.put("name", portlet.getName()); - rslt.put("fname", portlet.getFName()); - rslt.put("title", portlet.getTitle()); - rslt.put("description", portlet.getDescription()); - rslt.put("url", url); + final Map result = new TreeMap<>(); + result.put("name", portlet.getName()); + result.put("fname", portlet.getFName()); + result.put("title", portlet.getTitle()); + result.put("description", portlet.getDescription()); + result.put("url", url); if (displayFavoriteFlag) { - rslt.put("favorite", favorites.contains(portlet) ? true : false); + result.put("favorite", favorites.contains(portlet) ? true : false); } if (displayScore) { - rslt.put("score", score); + result.put("score", score); } - return rslt; + return result; } private Set getFavorites(HttpServletRequest request) { @@ -192,11 +192,11 @@ private Set getFavorites(HttpServletRequest request) { final UserPreferencesManager upm = (UserPreferencesManager) ui.getPreferencesManager(); final IUserLayoutManager ulm = upm.getUserLayoutManager(); final IUserLayout layout = ulm.getUserLayout(); - final Set rslt = + final Set result = displayFavoriteFlag ? favoritesUtils.getFavoritePortletDefinitions(layout) : Collections.emptySet(); - return rslt; + return result; } else { return Collections.emptySet(); } diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/security/remoting/PermissionAssignmentMapController.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/security/remoting/PermissionAssignmentMapController.java index 0c02aee959d..3615e4271b3 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/security/remoting/PermissionAssignmentMapController.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/security/remoting/PermissionAssignmentMapController.java @@ -261,7 +261,7 @@ private void placeInHierarchy( // Don't add another node if the specified Assignment // is already in the hierarchy somewhere... for (Assignment root : hierarchy) { - Assignment duplicate = root.findDecendentOrSelfIfExists(a.getPrincipal()); + Assignment duplicate = root.findDescendantOrSelfIfExists(a.getPrincipal()); if (duplicate != null) { return; } @@ -289,7 +289,7 @@ private void placeInHierarchy( JsonEntityBean bean = new JsonEntityBean(group, beanType); Assignment parent = null; for (Assignment root : hierarchy) { - parent = root.findDecendentOrSelfIfExists(bean); + parent = root.findDescendantOrSelfIfExists(bean); if (parent != null) { // We found one... parent.addChild(a); diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/security/remoting/PermissionsListController.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/security/remoting/PermissionsListController.java index 0d942abe695..942622deecf 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/security/remoting/PermissionsListController.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/security/remoting/PermissionsListController.java @@ -95,11 +95,11 @@ public ModelAndView getAssignments( return null; } - IPermission[] rslt = + IPermission[] result = permissionStore.select( ownerParam, principalParam, activityParam, targetParam, null); - return new ModelAndView("jsonView", "permissionsList", marshall(rslt)); + return new ModelAndView("jsonView", "permissionsList", marshall(result)); } /* @@ -114,7 +114,7 @@ private List> marshall(IPermission[] data) { throw new IllegalArgumentException(msg); } - List> rslt = new ArrayList>(data.length); + List> result = new ArrayList>(data.length); for (IPermission p : data) { JsonEntityBean bean = getEntityBean(p.getPrincipal()); @@ -161,10 +161,10 @@ private List> marshall(IPermission[] data) { } entry.put("targetName", targetName); - rslt.add(entry); + result.add(entry); } - return rslt; + return result; } protected JsonEntityBean getEntityBean(String principalString) { diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/services/portletlist/PortletListService.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/services/portletlist/PortletListService.java index 898395e516f..f9d73ddad0b 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/services/portletlist/PortletListService.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/services/portletlist/PortletListService.java @@ -34,16 +34,16 @@ public boolean isPortletListAdmin(IPerson person) { @Override public List getPortletLists() { - List rslt = portletListDao.getPortletLists(); - log.debug("Returning {} portlet lists", rslt.size()); - return rslt; + List result = portletListDao.getPortletLists(); + log.debug("Returning {} portlet lists", result.size()); + return result; } @Override public List getPortletLists(IPerson requester) { - List rslt = portletListDao.getPortletLists(requester.getUserName()); - log.debug("Returning portlet lists '{}' for user '{}'", rslt, requester.getUserName()); - return rslt; + List result = portletListDao.getPortletLists(requester.getUserName()); + log.debug("Returning portlet lists '{}' for user '{}'", result, requester.getUserName()); + return result; } @Override diff --git a/uPortal-api/uPortal-api-rest/src/test/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServletTest.java b/uPortal-api/uPortal-api-rest/src/test/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServletTest.java index 6953422bd7c..934723da9d8 100644 --- a/uPortal-api/uPortal-api-rest/src/test/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServletTest.java +++ b/uPortal-api/uPortal-api-rest/src/test/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServletTest.java @@ -81,9 +81,9 @@ public void testRemoveByFName() throws IOException { IPerson person = new PersonImpl(); person.setUserName("jDoe"); person.setFullName("john doe"); - IUserInstance userInstace = new UserInstance(person, null, null); + IUserInstance userInstance = new UserInstance(person, null, null); - Mockito.when(userInstanceManager.getUserInstance(req)).thenReturn(userInstace); + Mockito.when(userInstanceManager.getUserInstance(req)).thenReturn(userInstance); ModelAndView modelAndView = updatePreferencesServlet.removeByFName(req, res, "fname"); } diff --git a/uPortal-api/uPortal-api-rest/src/test/java/org/apereo/portal/portlets/permissionsadmin/AssignmentTest.java b/uPortal-api/uPortal-api-rest/src/test/java/org/apereo/portal/portlets/permissionsadmin/AssignmentTest.java index 4bbfebb0fe3..95db8c7f34a 100644 --- a/uPortal-api/uPortal-api-rest/src/test/java/org/apereo/portal/portlets/permissionsadmin/AssignmentTest.java +++ b/uPortal-api/uPortal-api-rest/src/test/java/org/apereo/portal/portlets/permissionsadmin/AssignmentTest.java @@ -55,14 +55,14 @@ public void testAddChildNull() { } @Test(expected = IllegalArgumentException.class) - public void testFindDecendentOrSelfIfExistsForNull() { - Assignment assignment = this.assignment.findDecendentOrSelfIfExists(null); + public void testFindDescendantOrSelfIfExistsForNull() { + Assignment assignment = this.assignment.findDescendantOrSelfIfExists(null); } @Test - public void testFindDecendentOrSelfIfExists() { + public void testFindDescendantOrSelfIfExists() { JsonEntityBean bean = buildJsonGroupEntityBean(); - Assignment newAssignment = this.assignment.findDecendentOrSelfIfExists(bean); + Assignment newAssignment = this.assignment.findDescendantOrSelfIfExists(bean); Assert.assertNotNull(newAssignment); } } diff --git a/uPortal-content/uPortal-content-portlet/src/main/java/org/apereo/portal/portlet/dao/jpa/PortletLifecycleEntryImpl.java b/uPortal-content/uPortal-content-portlet/src/main/java/org/apereo/portal/portlet/dao/jpa/PortletLifecycleEntryImpl.java index 639d31abd3e..f1761960e5c 100644 --- a/uPortal-content/uPortal-content-portlet/src/main/java/org/apereo/portal/portlet/dao/jpa/PortletLifecycleEntryImpl.java +++ b/uPortal-content/uPortal-content-portlet/src/main/java/org/apereo/portal/portlet/dao/jpa/PortletLifecycleEntryImpl.java @@ -92,11 +92,11 @@ public Date getDate() { @Override public int compareTo(IPortletLifecycleEntry o) { - int rslt = date.compareTo(o.getDate()); - if (rslt == 0) { - rslt = lifecycleStateId - o.getLifecycleState().getOrder(); + int result = date.compareTo(o.getDate()); + if (result == 0) { + result = lifecycleStateId - o.getLifecycleState().getOrder(); } - return rslt; + return result; } @Override diff --git a/uPortal-core/src/main/java/org/apereo/portal/AuthorizationException.java b/uPortal-core/src/main/java/org/apereo/portal/AuthorizationException.java index 4dbd633a8d8..d43f78fb6fb 100644 --- a/uPortal-core/src/main/java/org/apereo/portal/AuthorizationException.java +++ b/uPortal-core/src/main/java/org/apereo/portal/AuthorizationException.java @@ -14,7 +14,7 @@ */ package org.apereo.portal; -/** This exception informs uPortal that an authorization violation has occured within a channel. */ +/** This exception informs uPortal that an authorization violation has occurred within a channel. */ public class AuthorizationException extends PortalException { private static final long serialVersionUID = 1L; diff --git a/uPortal-core/src/main/java/org/apereo/portal/EntityTypes.java b/uPortal-core/src/main/java/org/apereo/portal/EntityTypes.java index cf9c8b6a10b..64ccbf07822 100644 --- a/uPortal-core/src/main/java/org/apereo/portal/EntityTypes.java +++ b/uPortal-core/src/main/java/org/apereo/portal/EntityTypes.java @@ -81,7 +81,7 @@ public void setCounterStore(ICounterStore counterStore) { @Cacheable("org.apereo.portal.EntityTypes.CLASS_BY_ID") public Class getEntityTypeFromID(Integer id) { - final List> result = + final List> queryResult = this.jdbcOperations.query( "SELECT ENTITY_TYPE_NAME FROM UP_ENTITY_TYPE WHERE ENTITY_TYPE_ID = ?", CLASS_ROW_MAPPER, @@ -89,9 +89,9 @@ public Class getEntityTypeFromID(Integer id) { @SuppressWarnings( "unchecked") // There is an unused(?) row for java.lang.Object that looks as though // it will fail here - Class rslt = - (Class) DataAccessUtils.singleResult(result); - return rslt; + Class dataResult = + (Class) DataAccessUtils.singleResult(queryResult); + return dataResult; } @Cacheable(cacheNames = "org.apereo.portal.EntityTypes.ID_BY_CLASS", key = "#type.Name") @@ -109,13 +109,13 @@ public Iterator> getAllEntityTypes() { this.jdbcOperations.query( "SELECT ENTITY_TYPE_NAME FROM UP_ENTITY_TYPE", CLASS_ROW_MAPPER); // Filter null values - final Set> rslt = new HashSet<>(); + final Set> result = new HashSet<>(); for (Class clazz : entityTypes) { if (clazz != null) { - rslt.add(clazz); + result.add(clazz); } } - return rslt.iterator(); + return result.iterator(); } @CacheEvict(value = "org.apereo.portal.EntityTypes.ALL", allEntries = true) diff --git a/uPortal-core/src/main/java/org/apereo/portal/i18n/LocaleManager.java b/uPortal-core/src/main/java/org/apereo/portal/i18n/LocaleManager.java index b8f327b7775..48bfd9d230d 100644 --- a/uPortal-core/src/main/java/org/apereo/portal/i18n/LocaleManager.java +++ b/uPortal-core/src/main/java/org/apereo/portal/i18n/LocaleManager.java @@ -84,15 +84,15 @@ public List getLocales() { // Need logic to construct ordered locale list. // Consider creating a separate ILocaleResolver // interface to do this work. - final List rslt = new ArrayList<>(); + final List result = new ArrayList<>(); // Add highest priority locales first - addToLocaleList(rslt, sessionLocales); - addToLocaleList(rslt, userLocales); + addToLocaleList(result, sessionLocales); + addToLocaleList(result, userLocales); // We will ignore browser locales until we know how to // translate them into proper java.util.Locales // addToLocaleList(locales, browserLocales); - addToLocaleList(rslt, portalLocales); - return rslt; + addToLocaleList(result, portalLocales); + return result; } /** Add locales to the locale list if they aren't in there already */ diff --git a/uPortal-core/src/main/java/org/apereo/portal/portlet/om/PortletLifecycleState.java b/uPortal-core/src/main/java/org/apereo/portal/portlet/om/PortletLifecycleState.java index a91aee5f1e5..2a176f72efc 100644 --- a/uPortal-core/src/main/java/org/apereo/portal/portlet/om/PortletLifecycleState.java +++ b/uPortal-core/src/main/java/org/apereo/portal/portlet/om/PortletLifecycleState.java @@ -36,19 +36,19 @@ public enum PortletLifecycleState { } public static PortletLifecycleState forOrderValue(int orderValue) { - PortletLifecycleState rslt = null; + PortletLifecycleState result = null; for (PortletLifecycleState state : PortletLifecycleState.values()) { if (state.getOrder() == orderValue) { - rslt = state; + result = state; break; } } - if (rslt == null) { + if (result == null) { final String msg = "PortletLifecycleState not found for the specified order value: " + orderValue; throw new IllegalArgumentException(msg); } - return rslt; + return result; } public int getOrder() { diff --git a/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java index 9e9ceac8d13..5e0e789f816 100644 --- a/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java +++ b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java @@ -153,13 +153,13 @@ public boolean contains(IGroupMember gm) throws GroupsException { private synchronized Set buildChildrenSet() throws GroupsException { logger.debug("Constructing children for group='{}'", getUnderlyingEntityIdentifier()); - final Set rslt = new HashSet<>(); + final Set result = new HashSet<>(); for (Iterator it = getLocalGroupService().findMembers(this); it.hasNext(); ) { final IGroupMember member = (IGroupMember) it.next(); - rslt.add(member); + result.add(member); } - return Collections.unmodifiableSet(rslt); + return Collections.unmodifiableSet(result); } /** @@ -276,14 +276,14 @@ public String getLocalKey() { */ private Iterator getMemberGroups() throws GroupsException { - Set rslt = new HashSet<>(); + Set result = new HashSet<>(); for (IGroupMember child : getChildren()) { if (child.isGroup()) { - rslt.add((IEntityGroup) child); + result.add((IEntityGroup) child); } } - return rslt.iterator(); + return result.iterator(); } /** @@ -305,8 +305,8 @@ public Set getChildren() throws GroupsException { } @SuppressWarnings("unchecked") - final Set rslt = (Set) element.getObjectValue(); - return rslt; + final Set result = (Set) element.getObjectValue(); + return result; } /** @return String */ @@ -410,17 +410,17 @@ private void primAddMember(IGroupMember gm) throws GroupsException { * Returns the Set of IGroupMembers in our member Collection * and, recursively, in the Collections of our members. * - * @param rslt Set - a Set that members are added to. + * @param result Set - a Set that members are added to. * @return Set */ - private Set primGetAllMembers(Set rslt) throws GroupsException { + private Set primGetAllMembers(Set result) throws GroupsException { for (IGroupMember gm : getChildren()) { - rslt.add(gm); + result.add(gm); if (gm.isGroup()) { - ((EntityGroupImpl) gm).primGetAllMembers(rslt); + ((EntityGroupImpl) gm).primGetAllMembers(result); } } - return rslt; + return result; } /** diff --git a/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/GroupMemberImpl.java b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/GroupMemberImpl.java index bbd44de5dd9..5146bae448f 100644 --- a/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/GroupMemberImpl.java +++ b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/GroupMemberImpl.java @@ -93,22 +93,22 @@ public Set getParentGroups() throws GroupsException { } @SuppressWarnings("unchecked") - final Set rslt = (Set) element.getObjectValue(); - return rslt; + final Set result = (Set) element.getObjectValue(); + return result; } private synchronized Set buildParentGroupsSet() throws GroupsException { logger.debug( "Constructing containingGroups for member='{}'", getUnderlyingEntityIdentifier()); - final Set rslt = new HashSet<>(); + final Set result = new HashSet<>(); for (Iterator it = GroupService.getCompositeGroupService().findParentGroups(this); it.hasNext(); ) { final IEntityGroup eg = (IEntityGroup) it.next(); - rslt.add(eg); + result.add(eg); } - return Collections.unmodifiableSet(rslt); + return Collections.unmodifiableSet(result); } /** @return String */ @@ -167,19 +167,19 @@ public IEntityGroup asGroup() { * * @param member org.apereo.portal.groups.IGroupMember - The current group member in the * recursive execution. - * @param rslt Set - A Set that groups are added to. + * @param result Set - A Set that groups are added to. * @return Set */ - protected Set primGetAncestorGroups(IGroupMember member, Set rslt) + protected Set primGetAncestorGroups(IGroupMember member, Set result) throws GroupsException { for (IEntityGroup group : member.getParentGroups()) { // avoid stack overflow in case of circular group dependencies - if (!rslt.contains(group)) { - rslt.add(group); - primGetAncestorGroups(group, rslt); + if (!result.contains(group)) { + result.add(group); + primGetAncestorGroups(group, result); } } - return rslt; + return result; } @Override diff --git a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/EntityPersonAttributesGroupStore.java b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/EntityPersonAttributesGroupStore.java index 6f97ae4b450..d5a30e79213 100644 --- a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/EntityPersonAttributesGroupStore.java +++ b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/EntityPersonAttributesGroupStore.java @@ -228,19 +228,19 @@ public Iterator findParentGroups(IGroupMember member) throws Group logger.debug("finding containing groups for member key {}", member.getKey()); final Set set = Collections.emptySet(); - Iterator rslt = set.iterator(); // default + Iterator result = set.iterator(); // default if (member.isGroup()) { // PAGS groups may only contain other PAGS groups (and people, of course) final IEntityGroup ieg = (IEntityGroup) member; if (PagsService.SERVICE_NAME_PAGS.equals(ieg.getServiceName().toString())) { - rslt = findParentGroupsForGroup((IEntityGroup) member); + result = findParentGroupsForGroup((IEntityGroup) member); } } else { - rslt = findParentGroupsForEntity((IEntity) member); + result = findParentGroupsForEntity((IEntity) member); } - return rslt; + return result; } private Iterator findParentGroupsForGroup(IEntityGroup group) { @@ -517,8 +517,8 @@ private IPersonAttributesGroupDefinition getPagsGroupDefByName(String name) { if (pagsGroups.size() > 1) { logger.error("More than one PAGS group with name {} found.", name); } - final IPersonAttributesGroupDefinition rslt = + final IPersonAttributesGroupDefinition result = pagsGroups.isEmpty() ? null : pagsGroups.iterator().next(); - return rslt; + return result; } } diff --git a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/PagsService.java b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/PagsService.java index f2dcfa8d696..ef767c3ad5e 100644 --- a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/PagsService.java +++ b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/PagsService.java @@ -65,18 +65,18 @@ public final class PagsService { * @return */ public Set getPagsDefinitions(IPerson person) { - Set rslt = new HashSet<>(); + Set result = new HashSet<>(); for (IPersonAttributesGroupDefinition def : pagsGroupDefDao.getPersonAttributesGroupDefinitions()) { if (hasPermission( person, IPermission.VIEW_GROUP_ACTIVITY, def.getCompositeEntityIdentifierForGroup().getKey())) { - rslt.add(def); + result.add(def); } } - logger.debug("Returning PAGS definitions '{}' for user '{}'", rslt, person.getUserName()); - return rslt; + logger.debug("Returning PAGS definitions '{}' for user '{}'", result, person.getUserName()); + return result; } /** @@ -86,19 +86,19 @@ public Set getPagsDefinitions(IPerson person) * @return */ public IPersonAttributesGroupDefinition getPagsDefinitionByName(IPerson person, String name) { - IPersonAttributesGroupDefinition rslt = getPagsGroupDefByName(name); - if (rslt == null) { + IPersonAttributesGroupDefinition result = getPagsGroupDefByName(name); + if (result == null) { // Better to produce exception? I'm thinking not, but open-minded. return null; } if (!hasPermission( person, IPermission.VIEW_GROUP_ACTIVITY, - rslt.getCompositeEntityIdentifierForGroup().getKey())) { + result.getCompositeEntityIdentifierForGroup().getKey())) { throw new RuntimeAuthorizationException(person, IPermission.VIEW_GROUP_ACTIVITY, name); } - logger.debug("Returning PAGS definition '{}' for user '{}'", rslt, person.getUserName()); - return rslt; + logger.debug("Returning PAGS definition '{}' for user '{}'", result, person.getUserName()); + return result; } /** Verifies permissions and that the group doesn't already exist (case insensitive) */ @@ -149,7 +149,7 @@ public IPersonAttributesGroupDefinition createPagsDefinition( throw new IllegalArgumentException("Specified groupName already in use: " + groupName); } - IPersonAttributesGroupDefinition rslt = + IPersonAttributesGroupDefinition result = pagsGroupDefDao.createPersonAttributesGroupDefinition(groupName, description); if (parent != null) { // Should refactor this switch to instead choose a service and invoke a method on it @@ -157,11 +157,11 @@ public IPersonAttributesGroupDefinition createPagsDefinition( case SERVICE_NAME_LOCAL: IEntityGroup member = GroupService.findGroup( - rslt.getCompositeEntityIdentifierForGroup().getKey()); + result.getCompositeEntityIdentifierForGroup().getKey()); if (member == null) { String msg = "The specified group was created, but is not present in the store: " - + rslt.getName(); + + result.getName(); throw new RuntimeException(msg); } parent.addChild(member); @@ -172,7 +172,7 @@ public IPersonAttributesGroupDefinition createPagsDefinition( getPagsGroupDefByName(parent.getName()); Set members = new HashSet<>(parentDef.getMembers()); - members.add(rslt); + members.add(result); parentDef.setMembers(members); pagsGroupDefDao.updatePersonAttributesGroupDefinition(parentDef); break; @@ -184,7 +184,7 @@ public IPersonAttributesGroupDefinition createPagsDefinition( } } - return rslt; + return result; } /** NOTE -- This method assumes that pagsDef is an existing JPA-managed entity. */ @@ -202,9 +202,9 @@ public IPersonAttributesGroupDefinition updatePagsDefinition( pagsDef.getCompositeEntityIdentifierForGroup().getKey()); } - IPersonAttributesGroupDefinition rslt = + IPersonAttributesGroupDefinition result = pagsGroupDefDao.updatePersonAttributesGroupDefinition(pagsDef); - return rslt; + return result; } /** NOTE -- This method assumes that pagsDef is an existing JPA-managed entity. */ diff --git a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/jpa/JpaPersonAttributesGroupDefinitionDao.java b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/jpa/JpaPersonAttributesGroupDefinitionDao.java index b046356c558..f3ca8c6674b 100644 --- a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/jpa/JpaPersonAttributesGroupDefinitionDao.java +++ b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/jpa/JpaPersonAttributesGroupDefinitionDao.java @@ -174,9 +174,9 @@ public Set getParentPersonAttributesGroupDefin TypedQuery query = this.createCachedQuery(parentGroupDefinitionsQuery); query.setParameter(nameParameter, group.getName()); - Set rslt = + Set result = new HashSet(query.getResultList()); - return rslt; + return result; } @PortalTransactionalReadOnly diff --git a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/jpa/PagsDefinitionJsonUtils.java b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/jpa/PagsDefinitionJsonUtils.java index 6a0d98de5a0..6d5c1c4de8f 100644 --- a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/jpa/PagsDefinitionJsonUtils.java +++ b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/jpa/PagsDefinitionJsonUtils.java @@ -131,7 +131,7 @@ public static final class TestGroupJsonDeserializer public Set deserialize( JsonParser jsonParser, DeserializationContext ctx) throws JsonProcessingException, IOException { - Set rslt = new HashSet<>(); + Set result = new HashSet<>(); ObjectCodec oc = jsonParser.getCodec(); JsonNode json = oc.readTree(jsonParser); for (Iterator testGroupNodes = json.elements(); testGroupNodes.hasNext(); ) { @@ -154,9 +154,9 @@ public Set deserialize( testDef.setTestGroup(testGroupDef); } testGroupDef.setTests(testDefs); - rslt.add(testGroupDef); + result.add(testGroupDef); } - return rslt; + return result; } } } diff --git a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/testers/AdHocGroupTester.java b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/testers/AdHocGroupTester.java index 9ac0f2e623e..11c72bf265a 100644 --- a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/testers/AdHocGroupTester.java +++ b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/testers/AdHocGroupTester.java @@ -103,14 +103,14 @@ public boolean test(IPerson person) { // method that potentially recurs boolean isPersonGroupMember = gmPerson.isDeepMemberOf(entityGroup); currentTests.remove(personHash); - final boolean rslt = isPersonGroupMember ^ isNotTest; + final boolean result = isPersonGroupMember ^ isNotTest; logger.debug( "Returning '{}' from test() for '{}' {} a (deep) member of '{}'", - rslt, + result, person.getUserName(), isNotTest ? "is not" : "is", entityGroup.getName()); - return rslt; + return result; } /** diff --git a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/testers/InjectAttributeRegexTester.java b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/testers/InjectAttributeRegexTester.java index 234ea157960..620f28253fa 100644 --- a/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/testers/InjectAttributeRegexTester.java +++ b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/testers/InjectAttributeRegexTester.java @@ -58,7 +58,7 @@ public InjectAttributeRegexTester(IPersonAttributesGroupTestDefinition definitio @Override public boolean test(IPerson person) { - boolean rslt = false; // default + boolean result = false; // default /* * First replace all instances of @{attrName}@ with @@ -87,12 +87,12 @@ public boolean test(IPerson person) { for (Object secondValue : values) { if (secondValue instanceof String && secondPattern.matcher((String) secondValue).matches()) { - rslt = true; + result = true; break; } } } - return rslt; + return result; } } diff --git a/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SimpleAttributesMapper.java b/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SimpleAttributesMapper.java index 3d852cbac6e..b1fb2a936e5 100644 --- a/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SimpleAttributesMapper.java +++ b/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SimpleAttributesMapper.java @@ -74,7 +74,7 @@ public Object mapFromAttributes(Attributes attr) { log.debug(msg); } - LdapRecord rslt; + LdapRecord result; try { if (log.isDebugEnabled()) { @@ -95,7 +95,7 @@ public Object mapFromAttributes(Attributes attr) { membership.add((String) en.nextElement()); } } - rslt = new LdapRecord(g, membership); + result = new LdapRecord(g, membership); if (log.isDebugEnabled()) { StringBuilder msg = new StringBuilder(); @@ -120,7 +120,7 @@ public Object mapFromAttributes(Attributes attr) { throw new RuntimeException(msg, t); } - return rslt; + return result; } public void setKeyAttributeName(String keyAttributeName) { diff --git a/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java b/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java index 2067b8b8278..e3fba451438 100644 --- a/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java +++ b/uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java @@ -196,11 +196,11 @@ public void setDisplayPersonMembers(boolean displayPersonMembers) { new LazyInitializer() { @Override protected IEntityGroup initialize() { - IEntityGroup rslt = new EntityTestingGroupImpl(ROOT_KEY, IPerson.class); - rslt.setCreatorID("System"); - rslt.setName(ROOT_KEY); - rslt.setDescription(ROOT_DESC); - return rslt; + IEntityGroup result = new EntityTestingGroupImpl(ROOT_KEY, IPerson.class); + result.setCreatorID("System"); + result.setName(ROOT_KEY); + result.setDescription(ROOT_DESC); + return result; } }; @@ -249,7 +249,7 @@ public Iterator findParentGroups(IGroupMember gm) throws GroupsException { refreshTree(); } log.debug("Invoking findParentGroups() for group member: {}", gm.getKey()); - Set rslt = new HashSet<>(); + Set result = new HashSet<>(); final IEntityGroup root = getRootGroup(); if (gm.isGroup()) { IEntityGroup group = (IEntityGroup) gm; @@ -258,21 +258,21 @@ public Iterator findParentGroups(IGroupMember gm) throws GroupsException { gm.getKey(), group.getLocalKey(), group.getName()); - getParentGroups(group.getLocalKey(), rslt); + getParentGroups(group.getLocalKey(), result); } else if (!gm.isGroup() && gm.getLeafType().equals(root.getLeafType())) { if ((groupsTree != null) && (groupsTree.getGroups() != null)) { Object[] groupKeys = getPersonGroupMemberKeys(gm); for (Object o : groupKeys) { String s = (String) o; IEntityGroup group = groupsTree.getGroups().get(s); - rslt.add(group); - rslt.addAll(getParentGroups(s, new HashSet<>())); + result.add(group); + result.addAll(getParentGroups(s, new HashSet<>())); } } else if (log.isDebugEnabled()) { log.debug("Unable to find groups for member: [{}]", gm.getKey()); } } - return rslt.iterator(); + return result.iterator(); } // gm should already be determined to be reference to person @@ -336,17 +336,17 @@ public Iterator findEntitiesForGroup(IEntityGroup group) throws GroupsException // We only deal w/ group-group relationships here... // return findMemberGroups(group); - List rslt = new ArrayList(); + List result = new ArrayList(); if (displayPersonMembers) { List list = groupsTree.getPersonChildren().get(group.getLocalKey()); if (list != null) { // should only reach this code if its a SmartLdap managed group... for (String s : list) { - rslt.add(persons.get(s)); + result.add(persons.get(s)); } } } - return rslt.iterator(); + return result.iterator(); } @Override @@ -375,14 +375,14 @@ public String[] findMemberGroupKeys(IEntityGroup group) throws GroupsException { log.debug("Invoking findMemberGroupKeys() for group: {}", group.getLocalKey()); - List rslt = new ArrayList<>(); + List result = new ArrayList<>(); for (Iterator it = findMemberGroups(group); it.hasNext(); ) { IEntityGroup g = (IEntityGroup) it.next(); // Return composite keys here... - rslt.add(g.getKey()); + result.add(g.getKey()); } - return rslt.toArray(new String[rslt.size()]); + return result.toArray(new String[result.size()]); } /** @@ -401,17 +401,17 @@ public Iterator findMemberGroups(IEntityGroup group) throws GroupsException { log.debug("Invoking findMemberGroups() for group: {}", group.getLocalKey()); - List rslt = new ArrayList<>(); + List result = new ArrayList<>(); List list = groupsTree.getChildren().get(group.getLocalKey()); if (list != null) { // should only reach this code if its a SmartLdap managed group... for (String s : list) { - rslt.add(groupsTree.getGroups().get(s)); + result.add(groupsTree.getGroups().get(s)); } } - return rslt.iterator(); + return result.iterator(); } /** @@ -495,14 +495,14 @@ public EntityIdentifier[] searchForGroups(String query, SearchMethod method, Cla throw new GroupsException(msg); } - List rslt = new ArrayList<>(); + List result = new ArrayList<>(); if (groupsTree != null) { for (Map.Entry> y : groupsTree.getKeysByUpperCaseName().entrySet()) { if (y.getKey().matches(regex)) { List keys = y.getValue(); for (String k : keys) { - rslt.add(new EntityIdentifier(k, IEntityGroup.class)); + result.add(new EntityIdentifier(k, IEntityGroup.class)); } } } @@ -510,7 +510,7 @@ public EntityIdentifier[] searchForGroups(String query, SearchMethod method, Cla log.debug("Unable to find groups for query: [{}]", query); } - return rslt.toArray(new EntityIdentifier[rslt.size()]); + return result.toArray(new EntityIdentifier[result.size()]); } @Override @@ -528,7 +528,7 @@ public void updateMembers(IEntityGroup group) throws GroupsException { public LdapRecord detectAndEliminateGroupReferences( LdapRecord record, List groupChain) { - LdapRecord rslt = record; // default + LdapRecord result = record; // default List keysOfChildren = record.getKeysOfChildren(); List filteredChildren = new ArrayList<>(); @@ -544,16 +544,16 @@ public LdapRecord detectAndEliminateGroupReferences( } } if (filteredChildren.size() < keysOfChildren.size()) { - rslt = new LdapRecord(record.getGroup(), filteredChildren); + result = new LdapRecord(record.getGroup(), filteredChildren); } - return rslt; + return result; } public boolean hasUndiscoveredChildrenWithinDn( LdapRecord record, String referenceDn, Set groupsSet) { - boolean rslt = false; // default + boolean result = false; // default for (String childKey : record.getKeysOfChildren()) { log.debug( @@ -571,7 +571,7 @@ public boolean hasUndiscoveredChildrenWithinDn( List list = Collections.emptyList(); LdapRecord proxy = new LdapRecord(group, list); if (!groupsSet.contains(proxy)) { - rslt = true; + result = true; break; } else { log.debug("Child group is already in collection: {}", childKey); @@ -582,9 +582,9 @@ public boolean hasUndiscoveredChildrenWithinDn( log.debug( "Query for children of parent group '{}': {}", record.getGroup().getLocalKey(), - rslt); + result); - return rslt; + return result; } /* diff --git a/uPortal-hibernate/uPortal-hibernate3-dialects/build.gradle b/uPortal-hibernate/uPortal-hibernate3-dialects/build.gradle index 3ea2660be96..35fd327c85f 100644 --- a/uPortal-hibernate/uPortal-hibernate3-dialects/build.gradle +++ b/uPortal-hibernate/uPortal-hibernate3-dialects/build.gradle @@ -1,4 +1,4 @@ -description = "Apereo uPortal Usefull Dialects for hibernate 3" +description = "Apereo uPortal Useful Dialects for hibernate 3" ext { // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 diff --git a/uPortal-hibernate/uPortal-hibernate4-dialects/build.gradle b/uPortal-hibernate/uPortal-hibernate4-dialects/build.gradle index 3cf0523b4cf..dfb309bbbb4 100644 --- a/uPortal-hibernate/uPortal-hibernate4-dialects/build.gradle +++ b/uPortal-hibernate/uPortal-hibernate4-dialects/build.gradle @@ -1,4 +1,4 @@ -description = "Apereo uPortal Usefull Dialects for hibernate 4" +description = "Apereo uPortal Useful Dialects for hibernate 4" dependencies { diff --git a/uPortal-index/src/main/java/org/apereo/portal/index/PortalSearchIndexer.java b/uPortal-index/src/main/java/org/apereo/portal/index/PortalSearchIndexer.java index 38857ad9866..d2f6d44f707 100644 --- a/uPortal-index/src/main/java/org/apereo/portal/index/PortalSearchIndexer.java +++ b/uPortal-index/src/main/java/org/apereo/portal/index/PortalSearchIndexer.java @@ -152,12 +152,12 @@ private String extractContent(IPortletDefinition portlet) { return null; } - final String rslt = contentExtractor.extractContent(portlet); + final String result = contentExtractor.extractContent(portlet); logger.debug( "Extracted the following content for portlet with fname='{}'\n{}", portlet.getFName(), - rslt); + result); - return rslt; + return result; } } diff --git a/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/IPortalDataHandlerService.java b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/IPortalDataHandlerService.java index 6c3551f7d04..87795edc2f0 100644 --- a/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/IPortalDataHandlerService.java +++ b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/IPortalDataHandlerService.java @@ -60,7 +60,7 @@ public final boolean isRecursive() { return this.recursive; } /** @return defaults to true */ - public final boolean isIngoreNonDataFiles() { + public final boolean isIgnoreNonDataFiles() { return this.ignoreNonDataFiles; } } diff --git a/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/PortalDataKeyFileProcessor.java b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/PortalDataKeyFileProcessor.java index 995fb8a24b3..6a07b65eb74 100644 --- a/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/PortalDataKeyFileProcessor.java +++ b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/PortalDataKeyFileProcessor.java @@ -102,7 +102,7 @@ public Object apply(Resource input) { final StartElement rootElement = StaxUtils.getRootElement(xmlEventReader); portalDataKey = new PortalDataKey(rootElement); } catch (Exception e) { - if (this.options != null && !this.options.isIngoreNonDataFiles()) { + if (this.options != null && !this.options.isIgnoreNonDataFiles()) { throw new RuntimeException("Failed to parse: " + input, e); } diff --git a/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/SpELDataTemplatingStrategy.java b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/SpELDataTemplatingStrategy.java index 86074801a12..f98594e0bb7 100644 --- a/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/SpELDataTemplatingStrategy.java +++ b/uPortal-io/uPortal-io-core/src/main/java/org/apereo/portal/io/xml/SpELDataTemplatingStrategy.java @@ -93,9 +93,9 @@ public Source processTemplates(Document data, String filename) { } } - final SAXSource rslt = new DocumentSource(data); - rslt.setSystemId(filename); // must be set, else import chokes - return rslt; + final SAXSource result = new DocumentSource(data); + result.setSystemId(filename); // must be set, else import chokes + return result; } /* @@ -103,11 +103,11 @@ public Source processTemplates(Document data, String filename) { */ private String processText(String text) { - String rslt = text; // default + String result = text; // default Expression x = portalSpELService.parseExpression( text, PortalSpELServiceImpl.TemplateParserContext.INSTANCE); - rslt = x.getValue(ctx, String.class); - return rslt; + result = x.getValue(ctx, String.class); + return result; } } diff --git a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/DefaultUsernamePhrase.java b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/DefaultUsernamePhrase.java index 327e9127604..d62806cf23c 100644 --- a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/DefaultUsernamePhrase.java +++ b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/DefaultUsernamePhrase.java @@ -58,13 +58,13 @@ public void init(EntityConfig config) { @Override public Object evaluate(TaskRequest req, TaskResponse res) { - String rslt = null; + String result = null; Element e = (Element) element.evaluate(req, res); if (e != null) { - rslt = e.getText(); + result = e.getText(); } - return rslt; + return result; } } diff --git a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/FilePatternPhrase.java b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/FilePatternPhrase.java index b14b74d3369..f3fada7130f 100644 --- a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/FilePatternPhrase.java +++ b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/FilePatternPhrase.java @@ -66,13 +66,13 @@ public void init(EntityConfig config) { @Override public Object evaluate(TaskRequest req, TaskResponse res) { - String rslt = DEFAULT_VALUE; + String result = DEFAULT_VALUE; String p = ((String) pattern.evaluate(req, res)).trim(); if (p != null && p.length() != 0 && !p.equals(USE_DEFAULT_VALUE)) { - rslt = p; + result = p; } - return rslt; + return result; } } diff --git a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GenerateEntityFileNameTask.java b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GenerateEntityFileNameTask.java index 50a0e91425e..b9f4c0ecb6c 100644 --- a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GenerateEntityFileNameTask.java +++ b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GenerateEntityFileNameTask.java @@ -89,7 +89,7 @@ public void perform(TaskRequest req, TaskResponse res) { final IUserLayoutStore rdbmdls = (IUserLayoutStore) layoutStore.evaluate(req, res); SupportedFileTypes y = SupportedFileTypes.getApplicableFileType(rootElement, rdbmdls); String entityFileName = y.getSafeFileNameWithExtension(rootElement); - ReturnValue rslt = (ReturnValue) req.getAttribute(Attributes.RETURN_VALUE); - rslt.setValue(entityFileName); + ReturnValue result = (ReturnValue) req.getAttribute(Attributes.RETURN_VALUE); + result.setValue(entityFileName); } } diff --git a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GetMemberKeyPhrase.java b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GetMemberKeyPhrase.java index df97bc4b8da..09878772961 100644 --- a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GetMemberKeyPhrase.java +++ b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GetMemberKeyPhrase.java @@ -71,7 +71,7 @@ public Object evaluate(TaskRequest req, TaskResponse res) { // Internal search, thus case sensitive. public static String getPhrase(String name, String memberValue) { - String rslt = null; + String result = null; // We can cut & run now if the element is a ... if (name.equals("literal")) { @@ -90,14 +90,14 @@ public static String getPhrase(String name, String memberValue) { // Must be a group... Class[] leafTypes = new Class[] {IPerson.class, IPortletDefinition.class}; - for (int i = 0; i < leafTypes.length && rslt == null; i++) { + for (int i = 0; i < leafTypes.length && result == null; i++) { EntityIdentifier[] eis = GroupService.searchForGroups( memberValue, IGroupConstants.SearchMethod.DISCRETE, leafTypes[i]); if (eis.length == 1) { // Match! IEntityGroup g = GroupService.findGroup(eis[0].getKey()); - rslt = g.getLocalKey(); + result = g.getLocalKey(); break; } else if (eis.length > 1) { String msg = "Ambiguous member name: " + memberValue; @@ -110,11 +110,11 @@ public static String getPhrase(String name, String memberValue) { throw new RuntimeException(msg, t); } - if (rslt == null) { + if (result == null) { String msg = "The specified member was not found: " + memberValue; throw new RuntimeException(msg); } - return rslt; + return result; } } diff --git a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GetMemberServicePhrase.java b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GetMemberServicePhrase.java index 1ef8ca7b15b..25c60315349 100644 --- a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GetMemberServicePhrase.java +++ b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GetMemberServicePhrase.java @@ -69,7 +69,7 @@ public Object evaluate(TaskRequest req, TaskResponse res) { // Internal search, thus case sensitive. public static String getPhrase(String name, String memberValue) { - String rslt = null; + String result = null; // We can (and must) cut & run if the element is a or a ... if (name.equals("literal") || name.equals("channel")) { @@ -79,7 +79,7 @@ public static String getPhrase(String name, String memberValue) { try { Class[] leafTypes = new Class[] {IPerson.class, IPortletDefinition.class}; - for (int i = 0; i < leafTypes.length && rslt == null; i++) { + for (int i = 0; i < leafTypes.length && result == null; i++) { EntityIdentifier[] eis = GroupService.searchForGroups( memberValue, IGroupConstants.SearchMethod.DISCRETE, leafTypes[i]); @@ -87,7 +87,7 @@ public static String getPhrase(String name, String memberValue) { // Match! if (eis[0].getType() == IEntityGroup.class) { IEntityGroup g = GroupService.findGroup(eis[0].getKey()); - rslt = g.getServiceName().toString(); + result = g.getServiceName().toString(); } else { String msg = "The specified entity is not a group: " + memberValue; throw new RuntimeException(msg); @@ -104,11 +104,11 @@ public static String getPhrase(String name, String memberValue) { throw new RuntimeException(msg, t); } - if (rslt == null) { + if (result == null) { String msg = "The specified member was not found: " + memberValue; throw new RuntimeException(msg); } - return rslt; + return result; } } diff --git a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GroupKeyOrLiteralPhrase.java b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GroupKeyOrLiteralPhrase.java index 4fc9b742c48..388b502d0f7 100644 --- a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GroupKeyOrLiteralPhrase.java +++ b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/GroupKeyOrLiteralPhrase.java @@ -64,7 +64,7 @@ public void init(EntityConfig config) { @Override public Object evaluate(TaskRequest req, TaskResponse res) { - String rslt = null; + String result = null; Element e = (Element) element.evaluate(req, res); if (e.getName().equals("group")) { @@ -80,7 +80,7 @@ public Object evaluate(TaskRequest req, TaskResponse res) { switch (eis.length) { case 1: // This is good -- what we hope for... - rslt = GroupService.findGroup(eis[0].getKey()).getKey(); + result = GroupService.findGroup(eis[0].getKey()).getKey(); break; case 0: // This is ok -- try the next type... @@ -92,7 +92,7 @@ public Object evaluate(TaskRequest req, TaskResponse res) { } // We better have a match by now... - if (rslt == null) { + if (result == null) { String msg = "No group with the specified name was found: " + e.getText(); throw new RuntimeException(msg); } @@ -102,12 +102,12 @@ public Object evaluate(TaskRequest req, TaskResponse res) { throw new RuntimeException(msg, t); } } else if (e.getName().equals("literal")) { - rslt = e.getText(); + result = e.getText(); } else { String msg = "Unsupported element type: " + e.getName(); throw new RuntimeException(msg); } - return rslt; + return result; } } diff --git a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/SupportedFileTypes.java b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/SupportedFileTypes.java index 90688d0c568..c86ce1bdd56 100644 --- a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/SupportedFileTypes.java +++ b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/SupportedFileTypes.java @@ -30,25 +30,25 @@ public enum SupportedFileTypes { LAYOUT("layout", "@username") { @Override protected boolean appliesTo(Element e, IUserLayoutStore rdbmdls) { - boolean rslt = false; // default + boolean result = false; // default boolean isLayout = e.getName().equals(rootElementNodeName); if (isLayout) { String username = ((Node) documentNameXPath.evaluate(e)).getText(); - rslt = !rdbmdls.isFragmentOwner(username); + result = !rdbmdls.isFragmentOwner(username); } - return rslt; + return result; } }, FRAGMENT_LAYOUT("layout", "@username", "fragment-layout") { @Override protected boolean appliesTo(Element e, IUserLayoutStore rdbmdls) { - boolean rslt = false; // default + boolean result = false; // default boolean isLayout = e.getName().equals(rootElementNodeName); if (isLayout) { String username = ((Node) documentNameXPath.evaluate(e)).getText(); - rslt = rdbmdls.isFragmentOwner(username); + result = rdbmdls.isFragmentOwner(username); } - return rslt; + return result; } }, PROFILE("profile", "@username") { @@ -75,13 +75,13 @@ public String getSafeFileNameWithExtension(Element e) { + e.getName(); throw new RuntimeException(msg); } - StringBuilder rslt = new StringBuilder(); - rslt.append(makeSafe(namePart)) + StringBuilder result = new StringBuilder(); + result.append(makeSafe(namePart)) .append("-") .append(makeSafe(fNamePart)) .append(".") .append(fileExtension); - return rslt.toString(); + return result.toString(); } }, PERMISSION("permission", null) { @@ -130,15 +130,15 @@ public String getSafeFileNameWithExtension(Element e) { + e.getName(); throw new RuntimeException(msg); } - StringBuilder rslt = new StringBuilder(); - rslt.append(makeSafe(principalPart)) + StringBuilder result = new StringBuilder(); + result.append(makeSafe(principalPart)) .append("__") .append(makeSafe(activityPart)) .append("__") .append(makeSafe(ownerPart)) .append(".") .append(fileExtension); - return rslt.toString(); + return result.toString(); } }, MEMBERSHIP("membership", null) { @@ -159,17 +159,17 @@ public String getSafeFileNameWithExtension(Element e) { @Override protected boolean appliesTo(Element e, IUserLayoutStore rdbmdls) { - boolean rslt = false; // default + boolean result = false; // default boolean isGroup = e.getName().equals(rootElementNodeName); if (isGroup) { Object childrenElement = childrenXPath.evaluate(e); if (childrenElement != null && childrenElement instanceof List) { List nodes = (List) childrenElement; // evaluate() returns an empty list if there are no matches - rslt = nodes.isEmpty(); + result = nodes.isEmpty(); } } - return rslt; + return result; } }, GROUP_MEMBERSHIP("group", "name", "group_membership") { @@ -177,15 +177,15 @@ protected boolean appliesTo(Element e, IUserLayoutStore rdbmdls) { @Override protected boolean appliesTo(Element e, IUserLayoutStore rdbmdls) { - boolean rslt = false; // default + boolean result = false; // default boolean isGroup = e.getName().equals(rootElementNodeName); if (isGroup) { Object childrenElement = childrenXPath.evaluate(e); if (childrenElement != null && childrenElement instanceof Node) { - rslt = true; + result = true; } } - return rslt; + return result; } }, USER("user", "@username") { @@ -193,15 +193,15 @@ protected boolean appliesTo(Element e, IUserLayoutStore rdbmdls) { @Override protected boolean appliesTo(Element e, IUserLayoutStore rdbmdls) { - boolean rslt = false; // default + boolean result = false; // default boolean isUser = e.getName().equals(rootElementNodeName); if (isUser) { Object defaultUserElement = templateUserXPath.evaluate(e); if (defaultUserElement != null && defaultUserElement instanceof Node) { - rslt = true; + result = true; } } - return rslt; + return result; } }, THEME("theme", "name"), @@ -252,20 +252,20 @@ public static SupportedFileTypes getApplicableFileType(Element e, IUserLayoutSto throw new IllegalArgumentException(msg); } - SupportedFileTypes rslt = null; + SupportedFileTypes result = null; for (SupportedFileTypes y : SupportedFileTypes.values()) { if (y.appliesTo(e, rdbmdls)) { - rslt = y; + result = y; break; } } - if (rslt == null) { + if (result == null) { String msg = "SupportedFileTypes instance not found for the specified element: " + e.getName(); throw new RuntimeException(msg); } - return rslt; + return result; } public String getSafeFileNameWithExtension(Element e) { diff --git a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/xml/portlet/ExternalPortletDefinitionUnmarshaller.java b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/xml/portlet/ExternalPortletDefinitionUnmarshaller.java index 88866956055..d9344022ee9 100644 --- a/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/xml/portlet/ExternalPortletDefinitionUnmarshaller.java +++ b/uPortal-io/uPortal-io-types/src/main/java/org/apereo/portal/io/xml/portlet/ExternalPortletDefinitionUnmarshaller.java @@ -128,9 +128,9 @@ public ExternalPortletDefinitionUnmarshaller() { } final String fname = epd.getFname(); - IPortletDefinition rslt = portletDefinitionDao.getPortletDefinitionByFname(fname); - if (rslt == null) { - rslt = + IPortletDefinition result = portletDefinitionDao.getPortletDefinitionByFname(fname); + if (result == null) { + result = new PortletDefinitionImpl( portletType, fname, @@ -140,7 +140,7 @@ public ExternalPortletDefinitionUnmarshaller() { portletDescriptor.getPortletName(), isFramework != null ? isFramework : false); } else { - final IPortletDescriptorKey portletDescriptorKey = rslt.getPortletDescriptorKey(); + final IPortletDescriptorKey portletDescriptorKey = result.getPortletDescriptorKey(); portletDescriptorKey.setPortletName(portletDescriptor.getPortletName()); if (isFramework != null && isFramework) { portletDescriptorKey.setFrameworkPortlet(true); @@ -149,40 +149,40 @@ public ExternalPortletDefinitionUnmarshaller() { portletDescriptorKey.setFrameworkPortlet(false); portletDescriptorKey.setWebAppName(portletDescriptor.getWebAppName()); } - rslt.setName(epd.getName()); - rslt.setTitle(epd.getTitle()); - rslt.setType(portletType); + result.setName(epd.getName()); + result.setTitle(epd.getTitle()); + result.setType(portletType); } - rslt.setDescription(epd.getDesc()); + result.setDescription(epd.getDesc()); final BigInteger timeout = epd.getTimeout(); if (timeout != null) { - rslt.setTimeout(timeout.intValue()); + result.setTimeout(timeout.intValue()); } final BigInteger actionTimeout = epd.getActionTimeout(); if (actionTimeout != null) { - rslt.setActionTimeout(actionTimeout.intValue()); + result.setActionTimeout(actionTimeout.intValue()); } final BigInteger eventTimeout = epd.getEventTimeout(); if (eventTimeout != null) { - rslt.setEventTimeout(eventTimeout.intValue()); + result.setEventTimeout(eventTimeout.intValue()); } final BigInteger renderTimeout = epd.getRenderTimeout(); if (renderTimeout != null) { - rslt.setRenderTimeout(renderTimeout.intValue()); + result.setRenderTimeout(renderTimeout.intValue()); } final BigInteger resourceTimeout = epd.getResourceTimeout(); if (resourceTimeout != null) { - rslt.setResourceTimeout(resourceTimeout.intValue()); + result.setResourceTimeout(resourceTimeout.intValue()); } - unmarshallLifecycle(epd.getLifecycle(), rslt); + unmarshallLifecycle(epd.getLifecycle(), result); final Set parameters = new LinkedHashSet<>(); for (ExternalPortletParameter param : epd.getParameters()) { parameters.add(new PortletDefinitionParameterImpl(param.getName(), param.getValue())); } - rslt.setParameters(parameters); + result.setParameters(parameters); final ArrayList preferenceList = new ArrayList<>(); for (ExternalPortletPreference pref : epd.getPortletPreferences()) { @@ -194,9 +194,9 @@ public ExternalPortletDefinitionUnmarshaller() { new PortletPreferenceImpl( pref.getName(), readOnly != null ? readOnly : false, values)); } - rslt.setPortletPreferences(preferenceList); + result.setPortletPreferences(preferenceList); - return rslt; + return result; } /* package-private */ void unmarshallLifecycle( @@ -262,11 +262,11 @@ public Date getDate() { @Override public int compareTo(IPortletLifecycleEntry o) { - int rslt = date.compareTo(o.getDate()); - if (rslt == 0) { - rslt = state.getOrder() - o.getLifecycleState().getOrder(); + int result = date.compareTo(o.getDate()); + if (result == 0) { + result = state.getOrder() - o.getLifecycleState().getOrder(); } - return rslt; + return result; } }, user); diff --git a/uPortal-io/uPortal-io-types/src/test/java/org/apereo/portal/io/xml/portlet/ExternalPortletDefinitionUnmarshallerTest.java b/uPortal-io/uPortal-io-types/src/test/java/org/apereo/portal/io/xml/portlet/ExternalPortletDefinitionUnmarshallerTest.java index 2fde895b25d..a42eaf20918 100644 --- a/uPortal-io/uPortal-io-types/src/test/java/org/apereo/portal/io/xml/portlet/ExternalPortletDefinitionUnmarshallerTest.java +++ b/uPortal-io/uPortal-io-types/src/test/java/org/apereo/portal/io/xml/portlet/ExternalPortletDefinitionUnmarshallerTest.java @@ -184,9 +184,9 @@ public void testUnmarshallLifecycle() { } private Calendar getCalendarForMillis(long millis) { - final Calendar rslt = Calendar.getInstance(); - rslt.setTimeInMillis(millis); - return rslt; + final Calendar result = Calendar.getInstance(); + result.setTimeInMillis(millis); + return result; } private static final class MockUserIdentityStore implements IUserIdentityStore { @@ -204,11 +204,11 @@ public int getPortalUID(IPerson person, boolean createPortalData) @Override public IPerson getPerson(String userName, boolean createPortalData) throws AuthorizationException { - final IPerson rslt = new PersonImpl(); - rslt.setUserName(userName); - rslt.setID(userName.hashCode()); - rslt.setSecurityContext(new BrokenSecurityContext()); - return rslt; + final IPerson result = new PersonImpl(); + result.setUserName(userName); + result.setID(userName.hashCode()); + result.setSecurityContext(new BrokenSecurityContext()); + return result; } @Override diff --git a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/IUserLayoutStore.java b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/IUserLayoutStore.java index 0899173dffe..653a86ab0f4 100644 --- a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/IUserLayoutStore.java +++ b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/IUserLayoutStore.java @@ -189,7 +189,7 @@ void setUserLayout( /** * Generates a new struct id for directive elements that dlm places in the PLF version of the - * layout tree. These elements are atifacts of the dlm storage model and used during merge but + * layout tree. These elements are artifacts of the dlm storage model and used during merge but * do not appear in the user's composite view. */ String getNextStructDirectiveId(IPerson person); diff --git a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutPortlet.java b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutPortlet.java index fc5a010d0f3..a82c614ccdd 100644 --- a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutPortlet.java +++ b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutPortlet.java @@ -262,7 +262,7 @@ public void setRenderOnWeb(boolean setter) { /** * Get a read-only view on the portlet publishing parameters for this portlet. * - * @return potentially null read-only Map from paramter name to parameter object + * @return potentially null read-only Map from parameter name to parameter object * @since uPortal 5.2 */ public Map getParameters() { diff --git a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutStructure.java b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutStructure.java index 916a66903d4..b5919ad35b8 100644 --- a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutStructure.java +++ b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/LayoutStructure.java @@ -63,7 +63,7 @@ public final class LayoutStructure { * A List of StructureParameter instances representing parameters to this LayoutStructure. * *

Prior to uPortal 2.5, this field was null when there were no parameters. Now this field is - * never null and no parameters are repreesented by an empty list. + * never null and no parameters are represented by an empty list. */ private final List parameters = new ArrayList(); diff --git a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/Constants.java b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/Constants.java index 3f552c029ee..0d48c5d4fe6 100755 --- a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/Constants.java +++ b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/Constants.java @@ -21,7 +21,7 @@ */ public class Constants { - // define the namespace prefixe on dlm elements and attributes. + // define the namespace prefix on dlm elements and attributes. public static final String NS = "dlm:"; public static final String NS_DECL = "xmlns:dlm"; public static final String NS_URI = "http://www.uportal.org/layout/dlm"; diff --git a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/FragmentDefinition.java b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/FragmentDefinition.java index 73894dbeaa3..7eb725166b8 100755 --- a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/FragmentDefinition.java +++ b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/dlm/FragmentDefinition.java @@ -358,18 +358,18 @@ public void toElement(org.dom4j.Element parent) { } QName q = new QName("fragment", FragmentDefinition.NAMESPACE); - org.dom4j.Element rslt = DocumentHelper.createElement(q); - rslt.addAttribute("name", this.getName()); - rslt.addAttribute("ownerID", this.getOwnerId()); - rslt.addAttribute("precedence", Double.toString(this.getPrecedence())); - rslt.addAttribute("description", this.getDescription()); + org.dom4j.Element result = DocumentHelper.createElement(q); + result.addAttribute("name", this.getName()); + result.addAttribute("ownerID", this.getOwnerId()); + result.addAttribute("precedence", Double.toString(this.getPrecedence())); + result.addAttribute("description", this.getDescription()); // Serialize our children... for (Evaluator v : this.evaluators) { - v.toElement(rslt); + v.toElement(result); } - parent.add(rslt); + parent.add(result); } @Override diff --git a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/StickyProfileMapperImpl.java b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/StickyProfileMapperImpl.java index 3ff7e281ae7..9e7e2607741 100644 --- a/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/StickyProfileMapperImpl.java +++ b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/StickyProfileMapperImpl.java @@ -196,7 +196,7 @@ public void setIdentitySwapperManager(final IdentitySwapperManager manager) { *

Typically, this will be the value "default". "default" will typically both map to whatever * profile fname is your default (so, "resopndr") AND a user selecting "default" (rather than * "respondr") is saying "I have no selection and want to accept the default behavior", NOT "I - * prefer whatever default maps to right now forver even if default changes in the future." + * prefer whatever default maps to right now forever even if default changes in the future." * * @param profileKeyForNoSelection potentially null key that you want to mean apathy about * profile selection diff --git a/uPortal-layout/uPortal-layout-core/src/test/java/org/apereo/portal/layout/profile/StickyProfileMapperImplTest.java b/uPortal-layout/uPortal-layout-core/src/test/java/org/apereo/portal/layout/profile/StickyProfileMapperImplTest.java index 17eebab96f4..6a2f813f74c 100644 --- a/uPortal-layout/uPortal-layout-core/src/test/java/org/apereo/portal/layout/profile/StickyProfileMapperImplTest.java +++ b/uPortal-layout/uPortal-layout-core/src/test/java/org/apereo/portal/layout/profile/StickyProfileMapperImplTest.java @@ -123,7 +123,7 @@ public void testStoresValidSelectionToRegistry() { /** Test that does not store selections by guest user to registry. */ @Test - public void testIngoresGuestUserProfileSelections() { + public void testIgnoresGuestUserProfileSelections() { final ProfileSelectionEvent selectionEvent = new ProfileSelectionEvent(this, "validKey1", guestPerson, request); diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DeleteManager.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DeleteManager.java index 50225221e78..920f075b4b4 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DeleteManager.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DeleteManager.java @@ -37,7 +37,7 @@ public class DeleteManager { /** * Hands back the single instance of RDBMDistributedLayoutStore. There is already a method for - * aquiring a single instance of the configured layout store so we delegate over there so that + * acquiring a single instance of the configured layout store so we delegate over there so that * all references refer to the same instance. This method is solely for convenience so that we * don't have to keep calling UserLayoutStoreFactory and casting the resulting class. */ diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java index 375155fbe38..d465f2c7b1c 100644 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java @@ -277,9 +277,9 @@ public XMLEventReader getUserLayoutReader() { final XMLInputFactory xmlInputFactory = this.xmlUtilities.getXmlInputFactory(); - final DOMSource layoutSoure = new DOMSource(ul); + final DOMSource layoutSource = new DOMSource(ul); try { - return xmlInputFactory.createXMLEventReader(layoutSoure); + return xmlInputFactory.createXMLEventReader(layoutSource); } catch (XMLStreamException e) { throw new RuntimeException( "Failed to create Layout XMLStreamReader for user: " + owner.getUserName(), e); diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/EditManager.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/EditManager.java index 439df607cc2..a66ea370804 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/EditManager.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/EditManager.java @@ -36,7 +36,7 @@ public class EditManager { /** * Hands back the single instance of RDBMDistributedLayoutStore. There is already a method for - * aquiring a single instance of the configured layout store so we delegate over there so that + * acquiring a single instance of the configured layout store so we delegate over there so that * all references refer to the same instance. This method is solely for convenience so that we * don't have to keep calling UserLayoutStoreFactory and casting the resulting class. */ diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentDefinitionDao.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentDefinitionDao.java index 46c229df556..af07cad9e3e 100644 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentDefinitionDao.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/FragmentDefinitionDao.java @@ -95,8 +95,8 @@ public CriteriaQuery apply(CriteriaBuilder cb) { public List getAllFragments() { final TypedQuery query = this.createCachedQuery(this.findAllFragmentsQuery); - final List rslt = query.getResultList(); - return rslt; + final List result = query.getResultList(); + return result; } @Override @@ -106,8 +106,8 @@ public FragmentDefinition getFragmentDefinition(String name) { query.setParameter(this.nameParameter, name); final List list = query.getResultList(); - final FragmentDefinition rslt = DataAccessUtils.uniqueResult(list); - return rslt; + final FragmentDefinition result = DataAccessUtils.uniqueResult(list); + return result; } @Override @@ -117,8 +117,8 @@ public FragmentDefinition getFragmentDefinitionByOwner(String ownerId) { query.setParameter(this.ownerParameter, ownerId); final List list = query.getResultList(); - final FragmentDefinition rslt = DataAccessUtils.uniqueResult(list); - return rslt; + final FragmentDefinition result = DataAccessUtils.uniqueResult(list); + return result; } @Override diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ILFBuilder.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ILFBuilder.java index ed34e128d6f..ac737290fc6 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ILFBuilder.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ILFBuilder.java @@ -85,7 +85,7 @@ public static Document constructILF(Document PLF, List sequence, IPers /** * Passes the layout root of each of these documents to mergeChildren causing all children of - * newLayout to be merged into compositeLayout following merging protocal for distributed layout + * newLayout to be merged into compositeLayout following merging protocol for distributed layout * management. * * @throws AuthorizationException diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/NodeReferenceFactory.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/NodeReferenceFactory.java index d8c16c35d85..1a5b58a0355 100644 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/NodeReferenceFactory.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/NodeReferenceFactory.java @@ -220,7 +220,7 @@ public Pathref getPathrefFromNoderef( log.trace(msg.toString()); } - Pathref rslt = null; // default; signifies we can't match a node + Pathref result = null; // default; signifies we can't match a node final Matcher dlmNodeMatcher = DLM_NODE_PATTERN.matcher(dlmNoderef); if (dlmNodeMatcher.matches()) { @@ -261,7 +261,7 @@ public Pathref getPathrefFromNoderef( fname = fnameAttr.getTextContent(); } - rslt = new Pathref(userLayoutInfo.first, xpath, fname); + result = new Pathref(userLayoutInfo.first, xpath, fname); } } @@ -286,10 +286,10 @@ public Pathref getPathrefFromNoderef( fname = target.valueOf("@fname"); } - rslt = new Pathref(layoutOwnerUsername, target.getUniquePath(), fname); + result = new Pathref(layoutOwnerUsername, target.getUniquePath(), fname); } - return rslt; + return result; } /* diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/Noderef.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/Noderef.java index 8664cfb491d..5704cfde56c 100644 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/Noderef.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/Noderef.java @@ -28,7 +28,7 @@ *

    *
  • userId of the fragment owner (e.g. 'u13') *
  • layoutId of the fragment layout (currently this will always be 'l1') - *
  • structureId of the node within the fragment layout (e.g. 's2' but the preceeding character + *
  • structureId of the node within the fragment layout (e.g. 's2' but the preceding character * is not always an 's') *
* @@ -84,7 +84,7 @@ public String getStructureId() { @Override public String toString() { - String rslt = null; + String result = null; if (userId != 0 && layoutId != 0) { // An intra-layout Noderef StringBuilder sb = new StringBuilder(); @@ -93,12 +93,12 @@ public String toString() { .append(LAYOUT_ID_PREFIX) .append(layoutId) .append(structureId); - rslt = sb.toString(); + result = sb.toString(); } else { // An extra-layout Noderef - rslt = structureId; + result = structureId; } - return rslt; + return result; } @Override diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PLFIntegrator.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PLFIntegrator.java index 2d39260e8af..7ea2eae5cf7 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PLFIntegrator.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PLFIntegrator.java @@ -210,7 +210,7 @@ static Element appendChild(Element plfChild, Element parent, boolean copyChildre Element copy = (Element) document.importNode(plfChild, false); parent.appendChild(copy); - // set the identifier for the doc if warrented + // set the identifier for the doc if warranted String id = copy.getAttribute(Constants.ATT_ID); if (id != null && !id.equals("")) copy.setIdAttribute(Constants.ATT_ID, true); diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java index 55eb9da0532..dda2206f20d 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/ParameterEditManager.java @@ -39,7 +39,7 @@ public class ParameterEditManager { /** * Hands back the single instance of RDBMDistributedLayoutStore. There is already a method for - * aquiring a single instance of the configured layout store so we delegate over there so that + * acquiring a single instance of the configured layout store so we delegate over there so that * all references refer to the same instance. This method is solely for convenience so that we * don't have to keep calling UserLayoutStoreFactory and casting the resulting class. */ @@ -62,7 +62,7 @@ static void applyAndUpdateParmEditSet(Document plf, Document ilf, IntegrationRes try { pSet = getParmEditSet(plf, null, false); } catch (Exception e) { - LOG.error("Exception occurred while getting user's DLM " + "paramter-edit-set.", e); + LOG.error("Exception occurred while getting user's DLM " + "parameter-edit-set.", e); } if (pSet == null) return; diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java index e40fdaa2d07..7e9cd739b0e 100644 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/RDBMDistributedLayoutStore.java @@ -649,17 +649,17 @@ private org.dom4j.Element getExportLayoutDom(IPerson person, IUserProfile profil */ private boolean isLayoutCorrupt(org.dom4j.Document layoutDoc) { - boolean rslt = false; // until we find otherwise... + boolean result = false; // until we find otherwise... for (FormOfLayoutCorruption form : KNOWN_FORMS_OF_LAYOUT_CORRUPTION) { if (form.detect(layoutDoc)) { logger.warn("Corrupt layout detected: {}", form.getMessage()); - rslt = true; + result = true; break; } } - return rslt; + return result; } private void addStylesheetUserPreferencesAttributes( @@ -1367,7 +1367,7 @@ public Document getFragmentLayout(IPerson person, IUserProfile profile) { /** * Generates a new struct id for directive elements that dlm places in the PLF version of the - * layout tree. These elements are atifacts of the dlm storage model and used during merge but + * layout tree. These elements are artifacts of the dlm storage model and used during merge but * do not appear in the user's composite view. */ @Override @@ -1439,19 +1439,19 @@ public boolean isFragmentOwner(IPerson person) { @Override public boolean isFragmentOwner(String username) { - boolean rslt = false; // default + boolean result = false; // default final List definitions = this.fragmentUtils.getFragmentDefinitions(); if (definitions != null) { for (final FragmentDefinition fragmentDefinition : definitions) { if (fragmentDefinition.getOwnerId().equals(username)) { - rslt = true; + result = true; break; } } } - return rslt; + return result; } /** diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/AllUsersEvaluatorFactory.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/AllUsersEvaluatorFactory.java index 840f09cac18..e9dff542782 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/AllUsersEvaluatorFactory.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/AllUsersEvaluatorFactory.java @@ -55,11 +55,11 @@ public void toElement(Element parent) { throw new IllegalArgumentException(msg); } - Element rslt = null; + Element result = null; QName q = new QName("audience", FragmentDefinition.NAMESPACE); - rslt = DocumentHelper.createElement(q); - rslt.addAttribute("evaluatorFactory", this.getFactoryClass().getName()); - parent.add(rslt); + result = DocumentHelper.createElement(q); + result.addAttribute("evaluatorFactory", this.getFactoryClass().getName()); + parent.add(result); } @Override diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/AttributeEvaluator.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/AttributeEvaluator.java index 7f65beefdea..4f876a300c0 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/AttributeEvaluator.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/AttributeEvaluator.java @@ -142,11 +142,11 @@ public void toElement(Element parent) { throw new IllegalStateException("Unrecognized mode constant: " + this.mode); } - Element rslt = DocumentHelper.createElement("attribute"); - rslt.addAttribute("name", this.name); - rslt.addAttribute("mode", mde); - rslt.addAttribute("value", this.value); - parent.add(rslt); + Element result = DocumentHelper.createElement("attribute"); + result.addAttribute("name", this.name); + result.addAttribute("mode", mde); + result.addAttribute("value", this.value); + parent.add(result); } @Override @@ -178,13 +178,13 @@ public String getSummary() { throw new RuntimeException("Unsupported MODE: " + mode); } - StringBuilder rslt = new StringBuilder(); - rslt.append("("); - rslt.append("person attribute '").append(name).append("' ").append(relationship); + StringBuilder result = new StringBuilder(); + result.append("("); + result.append("person attribute '").append(name).append("' ").append(relationship); if (mode != EXISTS) { - rslt.append(" '").append(value).append("'"); + result.append(" '").append(value).append("'"); } - rslt.append(")"); - return rslt.toString(); + result.append(")"); + return result.toString(); } } diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GroupMembershipEvaluator.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GroupMembershipEvaluator.java index 655019c205a..5409c69ae0d 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GroupMembershipEvaluator.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GroupMembershipEvaluator.java @@ -173,10 +173,10 @@ public void toElement(Element parent) { "Unrecognized evaluatorMode constant: " + this.evaluatorMode); } - Element rslt = DocumentHelper.createElement("attribute"); - rslt.addAttribute("mode", mde); - rslt.addAttribute("name", this.groupName); - parent.add(rslt); + Element result = DocumentHelper.createElement("attribute"); + result.addAttribute("mode", mde); + result.addAttribute("name", this.groupName); + parent.add(result); } @Override @@ -187,13 +187,13 @@ public Class getFactoryClass() { @Override public String getSummary() { - StringBuilder rslt = new StringBuilder(); - rslt.append("("); - rslt.append("MEMBER OF '").append(this.groupName).append("'"); + StringBuilder result = new StringBuilder(); + result.append("("); + result.append("MEMBER OF '").append(this.groupName).append("'"); if (evaluatorMode == DEEP_MEMBER_OF_MODE) { - rslt.append(" OR ANY DESCENDANT GROUP"); + result.append(" OR ANY DESCENDANT GROUP"); } - rslt.append(")"); - return rslt.toString(); + result.append(")"); + return result.toString(); } } diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GuestUserEvaluatorFactory.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GuestUserEvaluatorFactory.java index e723d7fcc72..b3fa744668b 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GuestUserEvaluatorFactory.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/GuestUserEvaluatorFactory.java @@ -68,11 +68,11 @@ public void toElement(Element parent) { throw new IllegalArgumentException(msg); } - Element rslt = null; + Element result = null; QName q = new QName("audience", FragmentDefinition.NAMESPACE); - rslt = DocumentHelper.createElement(q); - rslt.addAttribute("evaluatorFactory", this.getFactoryClass().getName()); - parent.add(rslt); + result = DocumentHelper.createElement(q); + result.addAttribute("evaluatorFactory", this.getFactoryClass().getName()); + parent.add(result); } @Override diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/Paren.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/Paren.java index a7855a9119e..fc9aba21b11 100755 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/Paren.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/Paren.java @@ -55,17 +55,17 @@ public Paren(Type t) { @Override public boolean isApplicable(IPerson toPerson) { - boolean rslt = false; + boolean result = false; if (LOG.isDebugEnabled()) LOG.debug(" >>>> calling paren[" + this + ", op=" + type + "].isApplicable()"); switch (this.type) { case OR: { - rslt = false; // presume false in this case... + result = false; // presume false in this case... for (Evaluator v : this.evaluators) { if (v.isApplicable(toPerson)) { - rslt = true; + result = true; break; } } @@ -74,10 +74,10 @@ public boolean isApplicable(IPerson toPerson) { case AND: { - rslt = true; // presume true in this case... + result = true; // presume true in this case... for (Evaluator v : this.evaluators) { if (v.isApplicable(toPerson) == false) { - rslt = false; + result = false; break; } } @@ -86,21 +86,21 @@ public boolean isApplicable(IPerson toPerson) { case NOT: { - rslt = false; // presume false in this case... until later... + result = false; // presume false in this case... until later... for (Evaluator v : this.evaluators) { if (v.isApplicable(toPerson)) { - rslt = true; + result = true; break; } } - rslt = !rslt; + result = !result; } break; } if (LOG.isDebugEnabled()) - LOG.debug(" ---- paren[" + this + ", op=" + type + "].isApplicable()=" + rslt); - return rslt; + LOG.debug(" ---- paren[" + this + ", op=" + type + "].isApplicable()=" + result); + return result; } @Override @@ -114,30 +114,30 @@ public void toElement(Element parent) { // NB: This method behaves vastly different depending on whether // the parent of this Paren is an instance of FragmentDefinition. - Element rslt = null; + Element result = null; if (parent.getName().equals("fragment")) { // The parent is a fragment, so we render as a element... QName q = new QName("audience", FragmentDefinition.NAMESPACE); - rslt = DocumentHelper.createElement(q); + result = DocumentHelper.createElement(q); // Discover the EvaluatorFactory class... - rslt.addAttribute("evaluatorFactory", this.getFactoryClass().getName()); + result.addAttribute("evaluatorFactory", this.getFactoryClass().getName()); } else { // The parent is *not* a fragment, so we render as a element... - rslt = DocumentHelper.createElement("paren"); - rslt.addAttribute("mode", this.type.toString()); + result = DocumentHelper.createElement("paren"); + result.addAttribute("mode", this.type.toString()); } // Serialize our children... for (Evaluator v : this.evaluators) { - v.toElement(rslt); + v.toElement(result); } // Append ourself... - parent.add(rslt); + parent.add(result); } @Override @@ -148,7 +148,7 @@ public Class getFactoryClass() { @Override public String getSummary() { - StringBuilder rslt = new StringBuilder(); + StringBuilder result = new StringBuilder(); switch (type) { case AND: @@ -156,27 +156,27 @@ public String getSummary() { String operator = type.equals(Type.AND) ? " && " : " || "; for (int i = 0; i < evaluators.size(); i++) { if (i > 0) { - rslt.append(operator); + result.append(operator); } Evaluator ev = evaluators.get(i); - rslt.append(ev.getSummary()); + result.append(ev.getSummary()); } if (evaluators.size() > 1) { - rslt.insert(0, "(").append(")"); + result.insert(0, "(").append(")"); } break; case NOT: - rslt.append("!"); + result.append("!"); if (!evaluators.isEmpty()) { - rslt.append(evaluators.get(0).getSummary()); + result.append(evaluators.get(0).getSummary()); } else { - rslt.append("()"); + result.append("()"); } break; default: throw new RuntimeException("Unrecognized Type: " + type); } - return rslt.toString(); + return result.toString(); } } diff --git a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/ProfileEvaluator.java b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/ProfileEvaluator.java index 20902ab59a1..d9dd1766bfe 100644 --- a/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/ProfileEvaluator.java +++ b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/providers/ProfileEvaluator.java @@ -68,9 +68,9 @@ public void toElement(Element parent) { throw new IllegalArgumentException(msg); } - Element rslt = DocumentHelper.createElement("profile"); - rslt.addAttribute("fname", this.profileFname); - parent.add(rslt); + Element result = DocumentHelper.createElement("profile"); + result.addAttribute("fname", this.profileFname); + parent.add(result); } @Override diff --git a/uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java b/uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java index f926f34db79..d6b4c7ae445 100644 --- a/uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java +++ b/uPortal-marketplace/src/main/java/org/apereo/portal/portlet/marketplace/MarketplacePortletDefinition.java @@ -362,19 +362,20 @@ public Set getRandomSamplingRelatedPortlets(final Collections.shuffle(tempList); final int count = Math.min(QUANTITY_RELATED_PORTLETS_TO_SHOW, tempList.size()); - final Set rslt = new HashSet(); + final Set result = + new HashSet(); for (final MarketplacePortletDefinition relatedPortlet : tempList) { if (marketplaceService.mayBrowsePortlet(principal, relatedPortlet)) { - rslt.add(relatedPortlet); + result.add(relatedPortlet); } - if (rslt.size() >= count) break; // escape the loop if we've hit our target quantity + if (result.size() >= count) break; // escape the loop if we've hit our target quantity // of related portlets } - return rslt; + return result; } /** diff --git a/uPortal-marketplace/src/main/java/org/apereo/portal/rest/layout/MarketplaceEntry.java b/uPortal-marketplace/src/main/java/org/apereo/portal/rest/layout/MarketplaceEntry.java index c1613b6fe66..f272dea7310 100644 --- a/uPortal-marketplace/src/main/java/org/apereo/portal/rest/layout/MarketplaceEntry.java +++ b/uPortal-marketplace/src/main/java/org/apereo/portal/rest/layout/MarketplaceEntry.java @@ -48,14 +48,14 @@ public class MarketplaceEntry implements Serializable { private Set getPortletCategories(MarketplacePortletDefinition pdef) { Set categories = pdef.getCategories(); - Set rslt = new HashSet(); + Set result = new HashSet(); for (PortletCategory category : categories) { String lowerCase = category.getName().toLowerCase(); if (!"all categories".equals(lowerCase)) { - rslt.add(StringUtils.capitalize(category.getName().toLowerCase())); + result.add(StringUtils.capitalize(category.getName().toLowerCase())); } } - return rslt; + return result; } private static final long serialVersionUID = 1L; diff --git a/uPortal-persondir/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java b/uPortal-persondir/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java index 1b57c9946b3..687e20f1067 100644 --- a/uPortal-persondir/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java +++ b/uPortal-persondir/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java @@ -286,11 +286,11 @@ public int getPortalUID(IPerson person, boolean createPortalData) public IPerson getPerson(String userName, boolean createPortalData) throws AuthorizationException { - final IPerson rslt = new PersonImpl(); - rslt.setUserName(userName); - rslt.setID(getPortalUID(rslt, createPortalData)); - rslt.setSecurityContext(new BrokenSecurityContext()); - return rslt; + final IPerson result = new PersonImpl(); + result.setUserName(userName); + result.setID(getPortalUID(result, createPortalData)); + result.setSecurityContext(new BrokenSecurityContext()); + return result; } /* (non-javadoc) diff --git a/uPortal-persondir/src/main/java/org/apereo/portal/persondir/ImpersonationStatusPersonAttributeDao.java b/uPortal-persondir/src/main/java/org/apereo/portal/persondir/ImpersonationStatusPersonAttributeDao.java index 11d75a3869b..f5a23e03e58 100644 --- a/uPortal-persondir/src/main/java/org/apereo/portal/persondir/ImpersonationStatusPersonAttributeDao.java +++ b/uPortal-persondir/src/main/java/org/apereo/portal/persondir/ImpersonationStatusPersonAttributeDao.java @@ -59,7 +59,7 @@ public Set getAvailableQueryAttributes() { public Set getPeopleWithMultivaluedAttributes( Map> query) { - Set rslt = null; // default (per spec?) + Set result = null; // default (per spec?) if (this.logger.isDebugEnabled()) { this.logger.debug("invoking getPeopleWithMultivaluedAttributes(" + query + ")"); @@ -88,11 +88,11 @@ public Set getPeopleWithMultivaluedAttributes( final Map> attrs = Collections.singletonMap(IMPERSONATING_ATTRIBUTE_NAME, values); final IPersonAttributes ipa = new CaseInsensitiveNamedPersonImpl(currentUid, attrs); - rslt = Collections.singleton(ipa); + result = Collections.singleton(ipa); } } - return rslt; + return result; } /** diff --git a/uPortal-persondir/src/main/java/org/apereo/portal/persondir/PortalRootPersonAttributeDao.java b/uPortal-persondir/src/main/java/org/apereo/portal/persondir/PortalRootPersonAttributeDao.java index 4fdf2884fc7..1bed2b30520 100644 --- a/uPortal-persondir/src/main/java/org/apereo/portal/persondir/PortalRootPersonAttributeDao.java +++ b/uPortal-persondir/src/main/java/org/apereo/portal/persondir/PortalRootPersonAttributeDao.java @@ -110,13 +110,13 @@ public void removeUserAttributeOverride(String uid) { @Override public IPersonAttributes getPerson(String uid) { - final IPersonAttributes rslt = delegatePersonAttributeDao.getPerson(uid); - if (rslt == null) { + final IPersonAttributes result = delegatePersonAttributeDao.getPerson(uid); + if (result == null) { // Nothing we can do with that return null; } - return postProcessPerson(rslt, uid); + return postProcessPerson(result, uid); } /** @@ -175,7 +175,7 @@ private IPersonAttributes postProcessPerson(IPersonAttributes person, String uid } // First apply specified overrides - IPersonAttributes rslt = + IPersonAttributes result = applyOverridesIfPresent(person); // default -- won't normally need to do anything /* @@ -186,20 +186,20 @@ private IPersonAttributes postProcessPerson(IPersonAttributes person, String uid * * We need to do our best to provide these if the external data sources don't cover it. */ - rslt = selectUsernameIfAbsent(rslt); - rslt = selectDisplayNameIfAbsent(rslt); + result = selectUsernameIfAbsent(result); + result = selectDisplayNameIfAbsent(result); logger.debug( "Post-processing of person with name='{}' produced the following person: {}", person.getName(), - rslt); + result); - return rslt; + return result; } protected IPersonAttributes applyOverridesIfPresent(IPersonAttributes person) { - IPersonAttributes rslt = person; // default -- won't normally need to do anything + IPersonAttributes result = person; // default -- won't normally need to do anything // Check for & process overrides final Map> overrides = overridesMap.get(person.getName()); @@ -212,34 +212,34 @@ protected IPersonAttributes applyOverridesIfPresent(IPersonAttributes person) { final Map> mutableMap = new LinkedHashMap<>(attributes); final Map> mergedAttributes = attributeMerger.mergeAttributes(mutableMap, overrides); - rslt = new NamedPersonImpl(person.getName(), mergedAttributes); + result = new NamedPersonImpl(person.getName(), mergedAttributes); } - return rslt; + return result; } protected IPersonAttributes selectUsernameIfAbsent(IPersonAttributes person) { - IPersonAttributes rslt = person; // default -- won't normally need to do anything + IPersonAttributes result = person; // default -- won't normally need to do anything final String usernameAttribute = usernameAttributeProvider.getUsernameAttribute(); - if (!rslt.getAttributes().containsKey(usernameAttribute) && person.getName() != null) { + if (!result.getAttributes().containsKey(usernameAttribute) && person.getName() != null) { // Alias the person.name property as the username attribute logger.debug("Adding attribute username='{}' for person: ", person.getName(), person); final Map> attributes = person.getAttributes(); final Map> mutableMap = new LinkedHashMap<>(attributes); mutableMap.put(usernameAttribute, Collections.singletonList(person.getName())); - rslt = new NamedPersonImpl(person.getName(), mutableMap); + result = new NamedPersonImpl(person.getName(), mutableMap); } - return rslt; + return result; } protected IPersonAttributes selectDisplayNameIfAbsent(IPersonAttributes person) { - IPersonAttributes rslt = person; // default -- won't normally need to do anything + IPersonAttributes result = person; // default -- won't normally need to do anything - if (!rslt.getAttributes().containsKey(ILocalAccountPerson.ATTR_DISPLAY_NAME)) { + if (!result.getAttributes().containsKey(ILocalAccountPerson.ATTR_DISPLAY_NAME)) { /* * This one is tougher; try some common attributes, but fall back on username @@ -279,10 +279,10 @@ protected IPersonAttributes selectDisplayNameIfAbsent(IPersonAttributes person) mutableMap.put( ILocalAccountPerson.ATTR_DISPLAY_NAME, Collections.singletonList(displayName.toString())); - rslt = new NamedPersonImpl(person.getName(), mutableMap); + result = new NamedPersonImpl(person.getName(), mutableMap); } } - return rslt; + return result; } } diff --git a/uPortal-persondir/src/test/java/org/apereo/portal/persondir/PortalRootPersonAttributeDaoTest.java b/uPortal-persondir/src/test/java/org/apereo/portal/persondir/PortalRootPersonAttributeDaoTest.java index a2fed2b0717..f995b32a5dc 100644 --- a/uPortal-persondir/src/test/java/org/apereo/portal/persondir/PortalRootPersonAttributeDaoTest.java +++ b/uPortal-persondir/src/test/java/org/apereo/portal/persondir/PortalRootPersonAttributeDaoTest.java @@ -39,20 +39,20 @@ public void applyOverridesIfPresentTest() { portalRootPersonAttributeDao.setUserAttributeOverride( "somebody.else", Collections.singletonMap(CUSTOMARY_FIRST_NAME_ATTRIBUTE, "something")); - final IPersonAttributes rsltWithout = + final IPersonAttributes resultWithout = portalRootPersonAttributeDao.applyOverridesIfPresent(person); Assert.assertEquals( - FIRST_NAME, rsltWithout.getAttributeValue(CUSTOMARY_FIRST_NAME_ATTRIBUTE)); + FIRST_NAME, resultWithout.getAttributeValue(CUSTOMARY_FIRST_NAME_ATTRIBUTE)); // Then with overrides final String overriddenFirstName = "Nebby"; portalRootPersonAttributeDao.setUserAttributeOverride( USERNAME, Collections.singletonMap(CUSTOMARY_FIRST_NAME_ATTRIBUTE, overriddenFirstName)); - final IPersonAttributes rsltWith = + final IPersonAttributes resultWith = portalRootPersonAttributeDao.applyOverridesIfPresent(person); Assert.assertEquals( - overriddenFirstName, rsltWith.getAttributeValue(CUSTOMARY_FIRST_NAME_ATTRIBUTE)); + overriddenFirstName, resultWith.getAttributeValue(CUSTOMARY_FIRST_NAME_ATTRIBUTE)); } @Test @@ -65,9 +65,11 @@ public void selectUsernameIfAbsentTest() { final IPersonAttributes person = new NamedPersonImpl(USERNAME, attributes); // Test - final IPersonAttributes rslt = portalRootPersonAttributeDao.selectUsernameIfAbsent(person); + final IPersonAttributes result = + portalRootPersonAttributeDao.selectUsernameIfAbsent(person); Assert.assertEquals( - USERNAME, rslt.getAttributeValue(usernameAttributeProvider.getUsernameAttribute())); + USERNAME, + result.getAttributeValue(usernameAttributeProvider.getUsernameAttribute())); } @Test @@ -80,10 +82,10 @@ public void selectDisplayNameIfAbsent() { final IPersonAttributes person = new NamedPersonImpl(USERNAME, attributes); // Test - final IPersonAttributes rslt = + final IPersonAttributes result = portalRootPersonAttributeDao.selectDisplayNameIfAbsent(person); Assert.assertEquals( FIRST_NAME + " " + LAST_NAME, - rslt.getAttributeValue(ILocalAccountPerson.ATTR_DISPLAY_NAME)); + result.getAttributeValue(ILocalAccountPerson.ATTR_DISPLAY_NAME)); } } diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/activity/ActivityController.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/activity/ActivityController.java index 98deba53898..f732abc30bd 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/activity/ActivityController.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/activity/ActivityController.java @@ -57,7 +57,7 @@ public class ActivityController { private static final String PREFERENCE_DISPLAY_GROUPS = PREFERENCE_PREFIX + "displayGroups"; private static final String PREFERENCE_DISPLAY_OTHER = PREFERENCE_PREFIX + "displayOther"; private static final String PREFERENCE_UNIQUE_LOGINS = PREFERENCE_PREFIX + "uniqueLogins"; - private static final String PREFERENCE_SHOW_SEACHES = PREFERENCE_PREFIX + "showSearches"; + private static final String PREFERENCE_SHOW_SEARCHES = PREFERENCE_PREFIX + "showSearches"; private static final String DEFAULT_PREFERENCE_MASTER_GROUP = "Everyone"; private static final String[] DEFAULT_PREFERENCE_DISPLAY_GROUPS = new String[] {}; private static final String DEFAULT_PREFERENCE_DISPLAY_OTHER = "true"; @@ -110,7 +110,7 @@ public ModelAndView summary(PortletRequest request) throws TypeMismatchException final PortletPreferences prefs = request.getPreferences(); final Boolean showSearches = Boolean.valueOf( - prefs.getValue(PREFERENCE_SHOW_SEACHES, DEFAULT_PREFERENCE_SHOW_SEARCHES)); + prefs.getValue(PREFERENCE_SHOW_SEARCHES, DEFAULT_PREFERENCE_SHOW_SEARCHES)); if (showSearches) { popularSearchTerms = getPopularSearchTerms(); } diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/backgroundpreference/RoleBasedBackgroundSetSelectionStrategy.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/backgroundpreference/RoleBasedBackgroundSetSelectionStrategy.java index 5bc824bba9a..08d13048727 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/backgroundpreference/RoleBasedBackgroundSetSelectionStrategy.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/backgroundpreference/RoleBasedBackgroundSetSelectionStrategy.java @@ -182,8 +182,8 @@ private String evaluateImagePath(String pathBeforeProcessing) { final Expression x = portalSpELService.parseExpression( pathBeforeProcessing, PortalSpELServiceImpl.TemplateParserContext.INSTANCE); - final String rslt = x.getValue(evaluationContext, String.class); - return rslt; + final String result = x.getValue(evaluationContext, String.class); + return result; } /* diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/favorites/FavoritesController.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/favorites/FavoritesController.java index 697f40fc157..ecef562d300 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/favorites/FavoritesController.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/favorites/FavoritesController.java @@ -165,7 +165,7 @@ public String initializeView(PortletRequest req, Model model) { @ModelAttribute("maxHeightPixels") public Integer getMaxHeightPixels(PortletPreferences prefs) { final String value = prefs.getValue(MAX_HEIGHT_PIXELS_PREFERENCE, null); - final Integer rslt = value != null ? Integer.valueOf(value) : null; - return rslt; + final Integer result = value != null ? Integer.valueOf(value) : null; + return result; } } diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/iframe/IFramePortletController.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/iframe/IFramePortletController.java index be1ab4bbf28..79060a0df3a 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/iframe/IFramePortletController.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/iframe/IFramePortletController.java @@ -57,7 +57,7 @@ public final class IFramePortletController { /** link to long description (complements title) */ put("longDescription", null); - /** name of frame for targetting */ + /** name of frame for targeting */ put("name", null); /** source of frame content */ diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/jsp/JspInvokerPortletController.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/jsp/JspInvokerPortletController.java index fd385c9bda3..81105d460f7 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/jsp/JspInvokerPortletController.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/jsp/JspInvokerPortletController.java @@ -106,44 +106,44 @@ protected ModelAndView render(RenderRequest req, RenderResponse res) { } private Map getBeans(PortletRequest req) { - Map rslt = new HashMap(); // default + Map result = new HashMap(); // default PortletPreferences prefs = req.getPreferences(); String[] beanNames = prefs.getValues(BEANS_PREFERENCE, new String[] {}); for (String name : beanNames) { Object bean = applicationContext.getBean(name); - rslt.put(name, bean); + result.put(name, bean); } logger.debug("Invoking with beans={}", (Object[]) beanNames); - return rslt; + return result; } private Map> getPreferences(PortletRequest req) { - Map> rslt = new HashMap>(); // default + Map> result = new HashMap>(); // default PortletPreferences prefs = req.getPreferences(); List names = Collections.list(prefs.getNames()); for (String name : names) { if (!name.startsWith(CONTROLLER_PREFERENCE_PREFIX)) { // Pass it along in the model List values = Arrays.asList(prefs.getValues(name, new String[] {})); - rslt.put(name, values); + result.put(name, values); } } - logger.debug("Invoking with preferences={}", rslt); - return rslt; + logger.debug("Invoking with preferences={}", result); + return result; } private String getViewLocation(PortletRequest req) { - String rslt; + String result; PortletPreferences prefs = req.getPreferences(); String preferenceViewLocation = prefs.getValue(VIEW_LOCATION_PREFERENCE, null); if (StringUtils.isNotBlank(preferenceViewLocation)) { - rslt = preferenceViewLocation; + result = preferenceViewLocation; } else { throw new RuntimeException( "Portlet preference '" + VIEW_LOCATION_PREFERENCE + "' not set"); } - logger.debug("Invoking with viewLocation={}", rslt); - return rslt; + logger.debug("Invoking with viewLocation={}", result); + return result; } /** diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/marketplace/PortletMarketplaceController.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/marketplace/PortletMarketplaceController.java index feaba84da2b..327af3b33af 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/marketplace/PortletMarketplaceController.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/marketplace/PortletMarketplaceController.java @@ -188,7 +188,7 @@ public void setPersonalizer(IPersonalizer personalizer) { * @param webRequest * @param portletRequest * @param model - * @param initialFilter - optional request paramter. Use to init filter on initial view + * @param initialFilter - optional request parameter. Use to init filter on initial view * @return a string representing the initial view. */ @RenderMapping @@ -557,7 +557,7 @@ public List getLayoutIds() { private Set getPermittedCategories(PortletRequest req) { - Set rslt = Collections.emptySet(); // default + Set result = Collections.emptySet(); // default final PortletPreferences prefs = req.getPreferences(); final String[] permittedCategories = prefs.getValues(PERMITTED_CATEGORIES_PREFERENCE, new String[0]); @@ -607,8 +607,8 @@ private Set getPermittedCategories(PortletRequest req) { cacheElement = new net.sf.ehcache.Element(cacheKey, portletCategories); this.marketplaceCategoryCache.put(cacheElement); } - rslt = (Set) cacheElement.getObjectValue(); + result = (Set) cacheElement.getObjectValue(); } - return rslt; + return result; } } diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java index 5fe5e72554d..deecea678d9 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java @@ -841,9 +841,9 @@ public List getPortletApplications() { portletRegistryService.getRegisteredPortletApplicationNames(); iter.hasNext(); ) { final String applicationName = iter.next(); - final PortletApplicationDefinition applicationDefninition; + final PortletApplicationDefinition applicationDefinition; try { - applicationDefninition = + applicationDefinition = portletRegistryService.getPortletApplication(applicationName); } catch (PortletContainerException e) { throw new RuntimeException( @@ -852,7 +852,7 @@ public List getPortletApplications() { + "'"); } - final List portlets = applicationDefninition.getPortlets(); + final List portlets = applicationDefinition.getPortlets(); portlets.sort( new ComparableExtractingComparator( String.CASE_INSENSITIVE_ORDER) { @@ -867,7 +867,7 @@ protected String getComparable(PortletDefinition o) { } }); - contexts.add(applicationDefninition); + contexts.add(applicationDefinition); } contexts.sort( @@ -1074,7 +1074,7 @@ public boolean configModeAction(ExternalContext externalContext, String fname) final IPortletWindowId portletWindowId = this.getDelegateWindowId(externalContext, fname); if (portletWindowId == null) { throw new IllegalStateException( - "Cannot execute configModeAciton without a delegate window ID in the session for key: " + "Cannot execute configModeAction without a delegate window ID in the session for key: " + RenderPortletTag.DEFAULT_SESSION_KEY_PREFIX + fname); } @@ -1149,7 +1149,7 @@ public boolean offerPortletSelection(PortletDefinitionForm form) { public Map getAllowableChannelPublishingDefinitions( IPerson user) { - Map rslt; + Map result; final Map rawMap = portletPublishingDefinitionDao.getChannelPublishingDefinitions(); @@ -1160,21 +1160,21 @@ public Map getAllowableChannelPublish IPermission.PORTLET_MANAGER_SELECT_PORTLET_TYPE, IPermission.ALL_PORTLET_TYPES)) { // Send the whole collection back... - rslt = rawMap; + result = rawMap; } else { // Filter the collection by permissions... - rslt = new HashMap<>(); + result = new HashMap<>(); for (Map.Entry y : rawMap.entrySet()) { if (principal.hasPermission( IPermission.PORTAL_PUBLISH, IPermission.PORTLET_MANAGER_SELECT_PORTLET_TYPE, y.getKey().getName())) { - rslt.put(y.getKey(), y.getValue()); + result.put(y.getKey(), y.getValue()); } } } - return rslt; + return result; } protected Tuple getPortletDescriptorKeys(PortletDefinitionForm form) { diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java index d5fa3044e96..67ab38c6433 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java @@ -718,7 +718,7 @@ public void setTimezoneOffsetInHours(String timezoneOffsetInHours) { } /** - * Return the full date and time at which this portlet shoudl be automatically published. This + * Return the full date and time at which this portlet should be automatically published. This * value is built from the individual date/time fields. * * @return @@ -739,7 +739,7 @@ public Date getPublishDateTime() { } /** - * Return the full date and time at which this portlet shoudl be automatically expired. This + * Return the full date and time at which this portlet should be automatically expired. This * value is built from the individual date/time fields. * * @return diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/tenantmanager/TenantManagerController.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/tenantmanager/TenantManagerController.java index 2b3f3c33546..3b91a465d4d 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/tenantmanager/TenantManagerController.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/tenantmanager/TenantManagerController.java @@ -58,7 +58,7 @@ public class TenantManagerController { private static final String OPTIONAL_LISTENER_PARAMETER = "optionalListener"; private static final String OPERATION_NAME_CODE = "operationNameCode"; private static final String OPERATIONS_LISTENER_RESPONSES = "operationsListenerResponses"; - private static final String OPERATIONS_LINTENER_AVAILABLE_ACTIONS = + private static final String OPERATIONS_LISTENER_AVAILABLE_ACTIONS = "operationsListenerAvailableActions"; private static final String INVALID_FIELDS = "invalidFields"; private static final String PREVIOUS_RESPONSES = "previousResponses"; @@ -151,7 +151,7 @@ public ModelAndView showTenantDetails(final RenderRequest req, final PortletSess Map model = new HashMap(); model.put("tenant", tenant); model.put("tenantManagerAttributes", Collections.unmodifiableMap(tenantManagerAttributes)); - model.put(OPERATIONS_LINTENER_AVAILABLE_ACTIONS, tenantService.getAllAvaialableActions()); + model.put(OPERATIONS_LISTENER_AVAILABLE_ACTIONS, tenantService.getAllAvailableActions()); /* * The following 2 items are empty the first time you visit the screen, @@ -334,7 +334,7 @@ private void forwardToReportScreen( /** Returns a collection of invalid fields, if any. */ private Set detectInvalidFields( final String name, final String fname, final Map attributes) { - final Set rslt = new HashSet<>(); + final Set result = new HashSet<>(); // Name & Fname try { @@ -344,7 +344,7 @@ private Set detectInvalidFields( tenantService.validateFname(fname); } catch (Exception e) { log.warn("Validation failure for tenant name={}", name, e); - rslt.add("name"); + result.add("name"); } // Attributes @@ -354,11 +354,11 @@ private Set detectInvalidFields( tenantService.validateAttribute(attributeName, value); } catch (Exception e) { log.warn("Validation failure for tenant name={}", name, e); - rslt.add(attributeName); + result.add(attributeName); } } - return rslt; + return result; } private String calculateFnameFromName(final String name) { @@ -366,15 +366,15 @@ private String calculateFnameFromName(final String name) { } private Map gatherAttributesFromPortletRequest(ActionRequest req) { - Map rslt = new HashMap(); + Map result = new HashMap(); for (Map.Entry y : tenantManagerAttributes.entrySet()) { final String key = y.getKey(); final String value = req.getParameter(key); if (StringUtils.isNotBlank(value)) { - rslt.put(key, value); + result.put(key, value); } } - return rslt; + return result; } private void clearState(final PortletRequest req) { diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/LocalizedPortletDefinition.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/LocalizedPortletDefinition.java index 110b1078e38..f56a25321d2 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/LocalizedPortletDefinition.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/LocalizedPortletDefinition.java @@ -39,7 +39,7 @@ public LocalizedPortletDefinition() {} * Initialize the state using portlet definition. Class fields will be retrieved from portlet * definition using specified locale. * - * @param definition portelt definition to use (must not be null). + * @param definition portlet definition to use (must not be null). * @param locale specifies the localization to use. */ public LocalizedPortletDefinition(IPortletDefinition definition, String locale) { diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/MessageEntityTranslationController.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/MessageEntityTranslationController.java index c822ad3b31f..a8f314bdc19 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/MessageEntityTranslationController.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/MessageEntityTranslationController.java @@ -34,7 +34,7 @@ * entities and post those entities after form submission. Typical scenario is that entity list is * loaded using {@link #getEntityList()} and user can select one to translate. Upon selection, exact * entity must be retrieved using {@link #getEntity(String, String)} in order to fill in the form. - * Upon form sumission, another AJAX call submits form values and {@link #postTranslation(String, + * Upon form submission, another AJAX call submits form values and {@link #postTranslation(String, * String, String)} updates the message. */ @Controller diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/PortletDefinitionTranslation.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/PortletDefinitionTranslation.java index c6581d803cf..6c424739b68 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/PortletDefinitionTranslation.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/PortletDefinitionTranslation.java @@ -16,7 +16,7 @@ import java.io.Serializable; -/** This domain class represents the original and localized translation of portlet definiton. */ +/** This domain class represents the original and localized translation of portlet definition. */ class PortletDefinitionTranslation implements Serializable { private static final long serialVersionUID = -7503311752482005801L; @@ -93,7 +93,7 @@ public void setLocalized(LocalizedPortletDefinition localized) { } /** - * Get the translated portelt definition. + * Get the translated portlet definition. * * @return translated portlet definition. */ diff --git a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/PortletEntityTranslationController.java b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/PortletEntityTranslationController.java index 66c8839c838..28aabcdac41 100644 --- a/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/PortletEntityTranslationController.java +++ b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/translator/PortletEntityTranslationController.java @@ -31,14 +31,14 @@ * portlet entities and post those entities after form submission. Typical scenario is that entity * list is loaded using {@link #getEntityList()} and user can select one to translate. Upon * selection, exact entity must be retrieved using {@link #getEntity(String, String)} in order to - * fill in the form. Upon form sumission, another AJAX call submits form values and {@link + * fill in the form. Upon form submission, another AJAX call submits form values and {@link * #postTranslation(String, String, String)} updates the message. */ @Controller @RequestMapping(value = "VIEW", params = "entity=portlet") public class PortletEntityTranslationController { - public static final String ENTITY_TYPE_PORTLET = "protlet"; + public static final String ENTITY_TYPE_PORTLET = "portlet"; private IPortletDefinitionDao portletDefinitionDao; diff --git a/uPortal-rdbm/src/main/java/org/apereo/portal/utils/HibernateStyleCounterStore.java b/uPortal-rdbm/src/main/java/org/apereo/portal/utils/HibernateStyleCounterStore.java index b4b03eabfab..85f6d297f3b 100644 --- a/uPortal-rdbm/src/main/java/org/apereo/portal/utils/HibernateStyleCounterStore.java +++ b/uPortal-rdbm/src/main/java/org/apereo/portal/utils/HibernateStyleCounterStore.java @@ -177,10 +177,10 @@ private int getNextIdInternal(final Optimizer optimizer, final String counterNam @Override public IntegralDataTypeHolder getNextValue() { - IntegralDataTypeHolder rslt = null; - for (int i = 0; rslt == null && i < MAX_ATTEMPTS; i++) { + IntegralDataTypeHolder result = null; + for (int i = 0; result == null && i < MAX_ATTEMPTS; i++) { - rslt = + result = transactionOperations.execute( new TransactionCallback< IntegralDataTypeHolder>() { @@ -287,14 +287,14 @@ public void setValues( }); } // End for loop - if (rslt == null) { + if (result == null) { throw new RuntimeException( "Failed to fetch a new batch of sequence values after " + MAX_ATTEMPTS + " tries"); } - return rslt; + return result; } }); } diff --git a/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/cache/CachingPortletResourceOutputHandler.java b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/cache/CachingPortletResourceOutputHandler.java index d83169c5941..a855f98b576 100644 --- a/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/cache/CachingPortletResourceOutputHandler.java +++ b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/cache/CachingPortletResourceOutputHandler.java @@ -24,7 +24,7 @@ import javax.servlet.http.HttpServletResponse; import org.apereo.portal.portlet.rendering.PortletResourceOutputHandler; -/** Extention of {@link CachingPortletOutputHandler} that adds support for resource requests */ +/** Extension of {@link CachingPortletOutputHandler} that adds support for resource requests */ public class CachingPortletResourceOutputHandler extends CachingPortletOutputHandler implements PortletResourceOutputHandler { diff --git a/uPortal-rendering/src/main/java/org/apereo/portal/portlet/registry/PortletCategoryRegistryImpl.java b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/registry/PortletCategoryRegistryImpl.java index fca7d00792c..bf704267dac 100644 --- a/uPortal-rendering/src/main/java/org/apereo/portal/portlet/registry/PortletCategoryRegistryImpl.java +++ b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/registry/PortletCategoryRegistryImpl.java @@ -44,38 +44,38 @@ public void setPortletDefinitionRegistry(IPortletDefinitionRegistry portletDefin @Override public Set getAllChildCategories(PortletCategory parent) { - Set rslt = new HashSet<>(); + Set result = new HashSet<>(); for (PortletCategory child : getChildCategories(parent)) { // recurse - rslt.add(child); - rslt.addAll(getAllChildCategories(child)); + result.add(child); + result.addAll(getAllChildCategories(child)); } - return rslt; + return result; } @Override public Set getAllParentCategories(PortletCategory child) { - Set rslt = new HashSet<>(); + Set result = new HashSet<>(); for (PortletCategory parent : getParentCategories(child)) { // recurse - rslt.add(parent); - rslt.addAll(getAllParentCategories(parent)); + result.add(parent); + result.addAll(getAllParentCategories(parent)); } - return rslt; + return result; } @Override public Set getAllChildPortlets(PortletCategory parent) { - Set rslt; + Set result; try { - rslt = new HashSet<>(getChildPortlets(parent)); + result = new HashSet<>(getChildPortlets(parent)); for (PortletCategory category : getAllChildCategories(parent)) { // Append portlets to list for each child category in the tree - rslt.addAll(getChildPortlets(category)); + result.addAll(getChildPortlets(category)); } } catch (Exception e) { @@ -87,7 +87,7 @@ public Set getAllChildPortlets(PortletCategory parent) { throw new PortalException(msg, e); } - return rslt; + return result; } @Override diff --git a/uPortal-rendering/src/main/java/org/apereo/portal/rendering/RenderingPipelineBranchPoint.java b/uPortal-rendering/src/main/java/org/apereo/portal/rendering/RenderingPipelineBranchPoint.java index 8f48421c76b..fbf123befda 100644 --- a/uPortal-rendering/src/main/java/org/apereo/portal/rendering/RenderingPipelineBranchPoint.java +++ b/uPortal-rendering/src/main/java/org/apereo/portal/rendering/RenderingPipelineBranchPoint.java @@ -80,8 +80,8 @@ public boolean renderStateIfApplicable( final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { - final boolean rslt = predicate.test(request); - if (rslt) { + final boolean result = predicate.test(request); + if (result) { logger.debug( "Using alternate pipe [{}] for branch point with order={}", alternatePipe, @@ -93,7 +93,7 @@ public boolean renderStateIfApplicable( alternatePipe, order); } - return rslt; + return result; } @Override diff --git a/uPortal-rendering/src/main/java/org/apereo/portal/rendering/cache/CachingPipelineComponent.java b/uPortal-rendering/src/main/java/org/apereo/portal/rendering/cache/CachingPipelineComponent.java index 22a9ab397e9..c3861a73990 100644 --- a/uPortal-rendering/src/main/java/org/apereo/portal/rendering/cache/CachingPipelineComponent.java +++ b/uPortal-rendering/src/main/java/org/apereo/portal/rendering/cache/CachingPipelineComponent.java @@ -71,7 +71,7 @@ public final PipelineEventReader getEventReader( HttpServletRequest request, HttpServletResponse response) { if (Included.PLAIN == this.resourcesElementsProvider.getDefaultIncludedType()) { this.logger.trace( - "{} - Resoure Aggregation Disabled, ignoring event cache and returning parent event reader directly", + "{} - ReSource Aggregation Disabled, ignoring event cache and returning parent event reader directly", this.beanName); return this.wrappedComponent.getEventReader(request, response); } diff --git a/uPortal-rendering/src/main/java/org/apereo/portal/rendering/xslt/XSLTComponent.java b/uPortal-rendering/src/main/java/org/apereo/portal/rendering/xslt/XSLTComponent.java index 4fb02502a57..49e25b08e3e 100644 --- a/uPortal-rendering/src/main/java/org/apereo/portal/rendering/xslt/XSLTComponent.java +++ b/uPortal-rendering/src/main/java/org/apereo/portal/rendering/xslt/XSLTComponent.java @@ -150,7 +150,7 @@ public PipelineEventReader getEventReader( final SAXResult outputTarget = new SAXResult(contentHandler); try { - this.logger.debug("{} - Begining XML Transformation", this.beanName); + this.logger.debug("{} - Beginning XML Transformation", this.beanName); transformer.transform(xmlReaderSource, outputTarget); this.logger.debug("{} - XML Transformation complete", this.beanName); } catch (TransformerException e) { diff --git a/uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java b/uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java index 00afc204cf7..8943c8d1442 100644 --- a/uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java +++ b/uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java @@ -408,7 +408,7 @@ public IPortalRequestInfo getPortalRequestInfo(HttpServletRequest request) { // If a state was added to the folder list remove it and // step back one so // other code can handle it - if (UrlState.valueOfIngoreCase(pathPart, null) + if (UrlState.valueOfIgnoreCase(pathPart, null) != null) { logger.trace( "A state was added to the end of folder list {};" @@ -478,7 +478,7 @@ public IPortalRequestInfo getPortalRequestInfo(HttpServletRequest request) { break; } - requestedUrlState = UrlState.valueOfIngoreCase(pathPart, null); + requestedUrlState = UrlState.valueOfIgnoreCase(pathPart, null); // Set the URL state if (requestedUrlState != null) { @@ -552,7 +552,7 @@ public IPortalRequestInfo getPortalRequestInfo(HttpServletRequest request) { if (lastPeriod >= 0 && lastPeriod < urlTypePart.length()) { final String urlTypePartSuffix = urlTypePart.substring(lastPeriod + 1); - urlType = UrlType.valueOfIngoreCase(urlTypePartSuffix, null); + urlType = UrlType.valueOfIgnoreCase(urlTypePartSuffix, null); if (urlType == UrlType.RESOURCE && targetedPortletRequestInfo != null) { final String resourceId = @@ -560,7 +560,7 @@ public IPortalRequestInfo getPortalRequestInfo(HttpServletRequest request) { targetedPortletRequestInfo.setResourceId(resourceId); } } else { - urlType = UrlType.valueOfIngoreCase(urlTypePart, null); + urlType = UrlType.valueOfIgnoreCase(urlTypePart, null); } if (urlType != null) { diff --git a/uPortal-rendering/src/main/java/org/apereo/portal/url/xml/XsltPortalUrlProvider.java b/uPortal-rendering/src/main/java/org/apereo/portal/url/xml/XsltPortalUrlProvider.java index a67a595b1dc..113ee159ac5 100644 --- a/uPortal-rendering/src/main/java/org/apereo/portal/url/xml/XsltPortalUrlProvider.java +++ b/uPortal-rendering/src/main/java/org/apereo/portal/url/xml/XsltPortalUrlProvider.java @@ -72,7 +72,7 @@ public IPortalUrlBuilder getPortalUrlBuilder( if (StringUtils.isEmpty(type)) { urlType = UrlType.RENDER; } else { - urlType = UrlType.valueOfIngoreCase(type); + urlType = UrlType.valueOfIgnoreCase(type); } if (StringUtils.isNotEmpty(fname)) { diff --git a/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/CacheSecurityContextFactory.java b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/CacheSecurityContextFactory.java index e43d548bd6b..1abec1380a2 100644 --- a/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/CacheSecurityContextFactory.java +++ b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/CacheSecurityContextFactory.java @@ -34,7 +34,7 @@ public String getName() { public boolean isEnabled() { final String msg = "CacheSecurityContextFactory must not be used directly by " - + "InitalSecurityContextFactory"; + + "InitialSecurityContextFactory"; throw new UnsupportedOperationException(msg); } diff --git a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/IAuthorizationPrincipal.java b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/IAuthorizationPrincipal.java index e33f6cc5b60..7aaaac2e274 100644 --- a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/IAuthorizationPrincipal.java +++ b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/IAuthorizationPrincipal.java @@ -55,7 +55,7 @@ public interface IAuthorizationPrincipal { boolean canConfigure(String channelPublishId) throws AuthorizationException; /** - * Answers if this IAuthoriztionPrincipal has permission to render this channel. + * Answers if this IAuthorizationPrincipal has permission to render this channel. * * @return boolean * @param channelPublishId int - the Channel publish Id diff --git a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/InitialSecurityContextFactory.java b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/InitialSecurityContextFactory.java index c7f2f5be04d..fa52db33bf5 100644 --- a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/InitialSecurityContextFactory.java +++ b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/InitialSecurityContextFactory.java @@ -24,7 +24,7 @@ import org.springframework.stereotype.Component; /** - * This class provides a "factory" method that returns a security context constracted based on + * This class provides a "factory" method that returns a security context constructed based on * application configuration, including all relevant subcontexts. */ @Component @@ -51,11 +51,11 @@ public void init() { } public ISecurityContext getInitialContext() throws PortalSecurityException { - final ISecurityContext rslt = new UnionSecurityContext(); + final ISecurityContext result = new UnionSecurityContext(); for (ISecurityContextFactory fac : enabledSecurityContextFactories) { ISecurityContext ctx = fac.getSecurityContext(); - rslt.addSubContext(fac.getName(), ctx); + result.addSubContext(fac.getName(), ctx); } - return rslt; + return result; } } diff --git a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/csrf/PortalCsrfSecurityRequestMatcher.java b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/csrf/PortalCsrfSecurityRequestMatcher.java index 69bc10b206e..86c0b62d891 100644 --- a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/csrf/PortalCsrfSecurityRequestMatcher.java +++ b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/csrf/PortalCsrfSecurityRequestMatcher.java @@ -69,21 +69,21 @@ public void init() { public boolean matches(HttpServletRequest request) { // Check the method - boolean rslt = + boolean result = Arrays.stream(IGNORED_METHODS) .noneMatch(s -> s.equalsIgnoreCase(request.getMethod())); // Check URI - if (rslt) { - rslt = ignoredMatchers.stream().noneMatch(matcher -> matcher.matches(request)); + if (result) { + result = ignoredMatchers.stream().noneMatch(matcher -> matcher.matches(request)); } logger.trace( "Spring CSRF protection for method='{}', URI='{}' is {}", request.getMethod(), request.getRequestURI(), - rslt ? "ENABLED" : "DISABLED"); + result ? "ENABLED" : "DISABLED"); - return rslt; + return result; } } diff --git a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/oauth/IdTokenFactory.java b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/oauth/IdTokenFactory.java index ab7136f2023..6ffd72d8268 100644 --- a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/oauth/IdTokenFactory.java +++ b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/oauth/IdTokenFactory.java @@ -330,12 +330,12 @@ public String createUserInfo( .filter(claim -> claim.getClaimValue() != null) .forEach(claim -> builder.claim(claim.getClaimName(), claim.getClaimValue())); - final String rslt = + final String result = builder.signWith(algorithmFactory.getAlgorithm(), signatureKey).compact(); - logger.debug("Produced the following JWT for username='{}': {}", username, rslt); + logger.debug("Produced the following JWT for username='{}': {}", username, result); - return rslt; + return result; } /** @@ -370,27 +370,27 @@ public Jws parseBearerToken(String bearerToken) { } private boolean includeClaim(String claimName, Set claimsToInclude) { - boolean rslt = true; // default + boolean result = true; // default if (claimsToInclude != null && !claimsToInclude.contains(claimName)) { /* * This group is included in the deployed configuration, * but is not wanted by the REST request. */ - rslt = false; + result = false; } - return rslt; + return result; } private boolean includeGroup(IEntityGroup group, Set groupsToInclude) { - boolean rslt = groupsWhitelist.contains(group.getName()); // default - if (rslt && groupsToInclude != null && !groupsToInclude.contains(group.getName())) { + boolean result = groupsWhitelist.contains(group.getName()); // default + if (result && groupsToInclude != null && !groupsToInclude.contains(group.getName())) { /* * This group is included in the deployed configuration, * but is not wanted by the REST request. */ - rslt = false; + result = false; } - return rslt; + return result; } /* diff --git a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/BasePersonManager.java b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/BasePersonManager.java index 8639493ea26..2483d1df527 100644 --- a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/BasePersonManager.java +++ b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/BasePersonManager.java @@ -126,10 +126,10 @@ protected IPerson createPersonForRequest(HttpServletRequest request) { if (claims != null) { final String username = claims.getBody().getSubject(); logger.debug("Found OIDC Id token for username='{}'", username); - final IPerson rslt = new PersonImpl(); - rslt.setAttribute(IPerson.USERNAME, username); - rslt.setID(userIdentityStore.getPortalUserId(username)); - return rslt; + final IPerson result = new PersonImpl(); + result.setAttribute(IPerson.USERNAME, username); + result.setID(userIdentityStore.getPortalUserId(username)); + return result; } /* @@ -162,12 +162,12 @@ protected IPerson createPersonForRequest(HttpServletRequest request) { guestUserId = guestUserIds.get(username); } - final IPerson rslt = PersonFactory.createPerson(); - rslt.setAttribute(IPerson.USERNAME, username); - rslt.setID(guestUserId); - rslt.setSecurityContext(initialSecurityContextFactory.getInitialContext()); + final IPerson result = PersonFactory.createPerson(); + result.setAttribute(IPerson.USERNAME, username); + result.setID(guestUserId); + result.setSecurityContext(initialSecurityContextFactory.getInitialContext()); - return rslt; + return result; } private synchronized void loadGuestUserId(String username, Map map) { diff --git a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/NotSoOpaqueCredentials.java b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/NotSoOpaqueCredentials.java index 5d51a5b6768..9fae2be746d 100644 --- a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/NotSoOpaqueCredentials.java +++ b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/NotSoOpaqueCredentials.java @@ -17,9 +17,9 @@ import org.apereo.portal.security.IOpaqueCredentials; /** - * This is a provider-specific extention to the standard opaque credentials that is designed to work + * This is a provider-specific extension to the standard opaque credentials that is designed to work * with the caching security context. This interface adds a method that removes a bit of the opacity - * of the original by providing means of retreiving a stored credential. See the warnings and + * of the original by providing means of retrieving a stored credential. See the warnings and * caveats associated with the CacheSecurityContext provider. */ public interface NotSoOpaqueCredentials extends IOpaqueCredentials { @@ -27,7 +27,7 @@ public interface NotSoOpaqueCredentials extends IOpaqueCredentials { /** * Returns the stored credentials as a String. * - * @return the strored credentials. + * @return the stored credentials. */ public String getCredentials(); } diff --git a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/PermissionSetImpl.java b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/PermissionSetImpl.java index e19e58b61a6..440dc5a89ba 100644 --- a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/PermissionSetImpl.java +++ b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/security/provider/PermissionSetImpl.java @@ -57,7 +57,7 @@ public EntityIdentifier getEntityIdentifier() { @Override public String toString() { StringBuffer sb = new StringBuffer(); - sb.append("PermissionSetImpl: entitityIdentifier=[" + this.entityIdentifier + "]"); + sb.append("PermissionSetImpl: entityIdentifier=[" + this.entityIdentifier + "]"); sb.append(" permissions: [" + Arrays.toString(permissions) + "]"); return sb.toString(); } diff --git a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/services/PersonService.java b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/services/PersonService.java index a735bebf728..a40236a86d2 100644 --- a/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/services/PersonService.java +++ b/uPortal-security/uPortal-security-core/src/main/java/org/apereo/portal/services/PersonService.java @@ -38,10 +38,10 @@ public class PersonService { /** Obtain the fully-constructed {@link IPerson} associated witth the specified username. */ public IPerson getPerson(String username) { - final IPerson rslt = new PersonImpl(); - rslt.setAttribute(IPerson.USERNAME, username); - rslt.setID(userIdentityStore.getPortalUserId(username)); - rslt.setAttributes(personAttributeDao.getPerson(username).getAttributes()); - return rslt; + final IPerson result = new PersonImpl(); + result.setAttribute(IPerson.USERNAME, username); + result.setID(userIdentityStore.getPortalUserId(username)); + result.setAttributes(personAttributeDao.getPerson(username).getAttributes()); + return result; } } diff --git a/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LoginController.java b/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LoginController.java index 86b9037b007..df10cb17058 100644 --- a/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LoginController.java +++ b/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LoginController.java @@ -169,7 +169,7 @@ public void service(HttpServletRequest request, HttpServletResponse response) */ /* package-private */ URL parseLocalRefUrl( final HttpServletRequest request, final String refUrl) { - URL rslt = null; // default + URL result = null; // default if (StringUtils.isNotBlank(refUrl)) { try { final URL context = new URL(request.getRequestURL().toString()); @@ -178,7 +178,7 @@ public void service(HttpServletRequest request, HttpServletResponse response) if (location.getProtocol().equals(context.getProtocol()) && location.getHost().equals(context.getHost()) && location.getPort() == context.getPort()) { - rslt = location; + result = location; } else { log.warn("The specified refUrl is not local: " + refUrl); } @@ -187,6 +187,6 @@ public void service(HttpServletRequest request, HttpServletResponse response) log.debug(e); } } - return rslt; + return result; } } diff --git a/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LogoutController.java b/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LogoutController.java index c757a0431db..e53c7fbe301 100644 --- a/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LogoutController.java +++ b/uPortal-security/uPortal-security-mvc/src/main/java/org/apereo/portal/security/mvc/LogoutController.java @@ -136,7 +136,7 @@ private String selectRedirectionUrl(HttpServletRequest request) { final String defaultRedirect = request.getContextPath() + "/"; - String rslt = null; // default + String result = null; // default // Get the person object associated with the request final IPerson person = this.personManager.getPerson(request); @@ -146,18 +146,18 @@ private String selectRedirectionUrl(HttpServletRequest request) { // Analyze the user's authentication status final ISecurityContext securityContext = person.getSecurityContext(); if (securityContext.isAuthenticated() && StringUtils.isNotBlank(logoutRedirect)) { - rslt = logoutRedirect; + result = logoutRedirect; } } // Otherwise use a sensible default... - rslt = - rslt != null - ? urlCustomizer.customizeUrl(request, rslt) + result = + result != null + ? urlCustomizer.customizeUrl(request, result) : urlCustomizer.customizeUrl(request, defaultRedirect); - logger.debug("Calculated redirectionURL='{}' for user='{}'", rslt, username); + logger.debug("Calculated redirectionURL='{}' for user='{}'", result, username); - return rslt; + return result; } } diff --git a/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/permission/target/PortletTypeTargetProviderImpl.java b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/permission/target/PortletTypeTargetProviderImpl.java index 52d1d742030..b448a7e7de9 100644 --- a/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/permission/target/PortletTypeTargetProviderImpl.java +++ b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/permission/target/PortletTypeTargetProviderImpl.java @@ -47,16 +47,16 @@ public class PortletTypeTargetProviderImpl implements IPermissionTargetProvider public IPermissionTarget getTarget(String key) { Validate.notBlank(key, "Argument 'key' cannot be blank"); - IPermissionTarget rslt = null; // defualt + IPermissionTarget result = null; // defualt if (key.equals(IPermission.ALL_PORTLET_TYPES)) { - rslt = ALL_PORTLET_TYPES_TARGET; + result = ALL_PORTLET_TYPES_TARGET; } else { // Search database-defined cpds... final Map cpds = channelPublishingDefinitionDao.getChannelPublishingDefinitions(); for (Map.Entry y : cpds.entrySet()) { if (y.getKey().getName().equals(key)) { - rslt = + result = new PermissionTargetImpl( y.getKey().getName(), y.getKey().getName(), @@ -65,19 +65,19 @@ public IPermissionTarget getTarget(String key) { } } - return rslt; + return result; } @Override public Collection searchTargets(String term) { Validate.notBlank(term, "Argument 'term' cannot be blank"); - Set rslt = new HashSet(); + Set result = new HashSet(); // Search case-insensitive final String lowerTerm = term.toLowerCase(); if (IPermission.ALL_PORTLET_TYPES.toLowerCase().contains(lowerTerm)) { - rslt.add(ALL_PORTLET_TYPES_TARGET); + result.add(ALL_PORTLET_TYPES_TARGET); } final Map cpds = channelPublishingDefinitionDao.getChannelPublishingDefinitions(); @@ -88,10 +88,10 @@ public Collection searchTargets(String term) { y.getKey().getName(), y.getKey().getName(), TargetType.PORTLET_TYPE); - rslt.add(target); + result.add(target); } } - return rslt; + return result; } } diff --git a/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AnyUnblockedGrantPermissionPolicy.java b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AnyUnblockedGrantPermissionPolicy.java index d2dcaca8fcd..2a9c3533fae 100644 --- a/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AnyUnblockedGrantPermissionPolicy.java +++ b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AnyUnblockedGrantPermissionPolicy.java @@ -182,11 +182,11 @@ public boolean doesPrincipalHavePermission( } // Search ourselves and all ancestors for an unblocked GRANT. - boolean rslt; + boolean result; try { // Track groups we've already explored to avoid infinite loop final Set seenGroups = new HashSet<>(); - rslt = + result = hasUnblockedPathToGrantWithCache( service, principal, owner, activity, target, seenGroups); } catch (Exception e) { @@ -198,7 +198,7 @@ public boolean doesPrincipalHavePermission( } if (log.isTraceEnabled()) { - if (rslt) { + if (result) { log.trace( "Principal '{}' is granted permission to perform activity " + "'{}' on target '{}' under permission owning system '{}' " @@ -219,7 +219,7 @@ public boolean doesPrincipalHavePermission( } } - return rslt; + return result; } private boolean hasUnblockedPathToGrantWithCache( @@ -360,18 +360,18 @@ private boolean hasUnblockedPathToGrant( private Set removeInactivePermissions(final IPermission[] perms) { Date now = new Date(); - Set rslt = new HashSet<>(1); + Set result = new HashSet<>(1); for (int i = 0; i < perms.length; i++) { IPermission p = perms[i]; if ((p.getEffective() == null || !p.getEffective().after(now)) && (p.getExpires() == null || p.getExpires().after(now))) { - rslt.add(p); + result.add(p); } } - return rslt; + return result; } /** @@ -392,15 +392,15 @@ private boolean containsType(final Set permissions, final String so throw new IllegalArgumentException("Cannot search for type null."); } - boolean rslt = false; // default + boolean result = false; // default for (IPermission p : permissions) { if (soughtType.equals(p.getType())) { - rslt = true; + result = true; } } - return rslt; + return result; } protected CacheKey getCacheKey( @@ -409,12 +409,12 @@ protected CacheKey getCacheKey( IPermissionActivity activity, IPermissionTarget target) { - CacheKey rslt; + CacheKey result; if (principal.isGroup()) { /* * Untagged keys for groups... */ - rslt = + result = CacheKey.build( AnyUnblockedGrantPermissionPolicy.class.getName(), principal.getPrincipalString(), @@ -426,7 +426,7 @@ protected CacheKey getCacheKey( * Keys tagged with the username for users; this practice * will cause them to be purged if the user re-authenticates. */ - rslt = + result = CacheKey.buildTagged( AnyUnblockedGrantPermissionPolicy.class.getName(), UsernameTaggedCacheEntryPurger.createCacheEntryTag(principal.getKey()), @@ -436,6 +436,6 @@ protected CacheKey getCacheKey( target.getKey()); } - return rslt; + return result; } } diff --git a/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java index 3c1db54ca1e..9837d5a67ff 100644 --- a/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java +++ b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java @@ -572,7 +572,7 @@ public boolean doesPrincipalHavePermission( return (Boolean) element.getValue(); } - boolean rslt = false; // fail closed + boolean result = false; // fail closed /* * Convert to (strongly-typed) Java objects based on interfaces in @@ -589,7 +589,7 @@ public boolean doesPrincipalHavePermission( final IPermissionTargetProvider targetProvider = targetProviderRegistry.getTargetProvider(ipActivity.getTargetProviderKey()); final IPermissionTarget ipTarget = targetProvider.getTarget(target); - rslt = + result = policy.doesPrincipalHavePermission( this, principal, ipOwner, ipActivity, ipTarget); } else { @@ -621,7 +621,7 @@ public boolean doesPrincipalHavePermission( missingDataLogTracker.put(missingDataTrackerKey, now); } // This pass becomes a check for superuser (Portal Administrators) - rslt = + result = doesPrincipalHavePermission( principal, IPermission.PORTAL_SYSTEM, @@ -630,9 +630,9 @@ public boolean doesPrincipalHavePermission( policy); } - this.doesPrincipalHavePermissionCache.put(new Element(key, rslt)); + this.doesPrincipalHavePermissionCache.put(new Element(key, result)); - return rslt; + return result; } /** diff --git a/uPortal-security/uPortal-security-xslt/src/main/java/org/apereo/portal/security/xslt/XalanAuthorizationHelperBean.java b/uPortal-security/uPortal-security-xslt/src/main/java/org/apereo/portal/security/xslt/XalanAuthorizationHelperBean.java index 1490d0991f6..036f416a551 100644 --- a/uPortal-security/uPortal-security-xslt/src/main/java/org/apereo/portal/security/xslt/XalanAuthorizationHelperBean.java +++ b/uPortal-security/uPortal-security-xslt/src/main/java/org/apereo/portal/security/xslt/XalanAuthorizationHelperBean.java @@ -111,7 +111,7 @@ public boolean hasPermission(final String owner, final String activity, final St final IAuthorizationPrincipal authPrincipal = this.getUserPrincipal(currentUser.getUserName()); - final boolean rslt = + final boolean result = authPrincipal != null ? authPrincipal.hasPermission(owner, activity, target) : false; @@ -119,9 +119,9 @@ public boolean hasPermission(final String owner, final String activity, final St logger.trace( String.format( "In hasPermission() - owner=[%s], activity=[%s], target=[%s], result=[%s] ", - owner, activity, target, rslt)); + owner, activity, target, result)); } - return rslt; + return result; } protected IAuthorizationPrincipal getUserPrincipal(final String userName) { diff --git a/uPortal-security/uPortal-security-xslt/src/main/java/org/apereo/portal/security/xslt/XalanLayoutElementTitleHelper.java b/uPortal-security/uPortal-security-xslt/src/main/java/org/apereo/portal/security/xslt/XalanLayoutElementTitleHelper.java index c01f4eb7799..7174e176d30 100644 --- a/uPortal-security/uPortal-security-xslt/src/main/java/org/apereo/portal/security/xslt/XalanLayoutElementTitleHelper.java +++ b/uPortal-security/uPortal-security-xslt/src/main/java/org/apereo/portal/security/xslt/XalanLayoutElementTitleHelper.java @@ -51,7 +51,7 @@ public void setLocaleManagerFactory(LocaleManagerFactory localeManagerFactory) { * * @param id - layout structure element's identifier. * @param language - locale identifier. - * @param name - default layout strucute element's name. + * @param name - default layout structure element's name. * @return localized title in case of layout owner's element or default name otherwise. */ public static String getTitle(String id, String language, String name) { diff --git a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/AuthorizationHeaderProvider.java b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/AuthorizationHeaderProvider.java index a2a62ff5140..9f6d5f4f723 100644 --- a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/AuthorizationHeaderProvider.java +++ b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/AuthorizationHeaderProvider.java @@ -102,15 +102,15 @@ public Header createHeader(RenderRequest renderRequest, RenderResponse renderRes // Authorization header final Bearer bearer = bearerService.createBearer(username, attributes, groups, expires); - final Header rslt = + final Header result = new BasicHeader( Headers.AUTHORIZATION.getName(), Headers.BEARER_TOKEN_PREFIX + bearer.getEncryptedToken()); logger.debug( "Produced the following Authorization header for username='{}': {}", username, - rslt); + result); - return rslt; + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/DefinitionHeaderProvider.java b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/DefinitionHeaderProvider.java index f838d1d5db5..5465ad6cf39 100644 --- a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/DefinitionHeaderProvider.java +++ b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/DefinitionHeaderProvider.java @@ -125,15 +125,15 @@ public Header createHeader(RenderRequest renderRequest, RenderResponse renderRes parameters, username, getExpiration(renderRequest)); - final Header rslt = + final Header result = new BasicHeader(Headers.DEFINITION.getName(), definition.getEncryptedToken()); logger.debug( "Produced the following {} header for username='{}': {}", Headers.DEFINITION.getName(), username, - rslt); + result); - return rslt; + return result; } /* diff --git a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/AbstractHeaderProvider.java b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/AbstractHeaderProvider.java index 122bada6f04..cfc7193ff62 100644 --- a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/AbstractHeaderProvider.java +++ b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/AbstractHeaderProvider.java @@ -32,26 +32,26 @@ public abstract class AbstractHeaderProvider implements IHeaderProvider { protected final boolean isIncluded(RenderRequest renderRequest, String preferenceName) { final PortletPreferences preferences = renderRequest.getPreferences(); - final String rslt = preferences.getValue(preferenceName, Boolean.FALSE.toString()); - return Boolean.valueOf(rslt); + final String result = preferences.getValue(preferenceName, Boolean.FALSE.toString()); + return Boolean.valueOf(result); } protected final String getUsername(RenderRequest renderRequest) { - final String rslt = + final String result = renderRequest.getRemoteUser() != null ? renderRequest.getRemoteUser() : guestUserName; - return rslt; + return result; } /** Point at which the JWT expires */ protected final Date getExpiration(RenderRequest renderRequest) { // Expiration of the JWT final PortletSession portletSession = renderRequest.getPortletSession(); - final Date rslt = + final Date result = new Date( portletSession.getLastAccessedTime() + ((long) portletSession.getMaxInactiveInterval() * 1000L)); - return rslt; + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/PortalRequestHeaderProvider.java b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/PortalRequestHeaderProvider.java index ef911fc788f..b605c6e602f 100644 --- a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/PortalRequestHeaderProvider.java +++ b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/PortalRequestHeaderProvider.java @@ -95,14 +95,14 @@ public Header createHeader(RenderRequest renderRequest, RenderResponse renderRes final PortalRequest portalRequest = portalRequestService.createPortalRequest( properties, attributes, parameters, username, getExpiration(renderRequest)); - final Header rslt = + final Header result = new BasicHeader( Headers.PORTAL_REQUEST.getName(), portalRequest.getEncryptedToken()); logger.debug( "Produced the following PortalRequest header for username='{}': {}", username, - rslt); + result); - return rslt; + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/PreferencesHeaderProvider.java b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/PreferencesHeaderProvider.java index 94b834bcb5b..3dfe35c6a7d 100644 --- a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/PreferencesHeaderProvider.java +++ b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/PreferencesHeaderProvider.java @@ -75,11 +75,13 @@ public Header createHeader(RenderRequest renderRequest, RenderResponse renderRes final Preferences preferences = preferencesService.createPreferences( preferencesMap, username, getExpiration(renderRequest)); - final Header rslt = + final Header result = new BasicHeader(Headers.PREFERECES.getName(), preferences.getEncryptedToken()); logger.debug( - "Produced the following Preferences header for username='{}': {}", username, rslt); + "Produced the following Preferences header for username='{}': {}", + username, + result); - return rslt; + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/SoffitConnectorController.java b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/SoffitConnectorController.java index 533d87b390f..0d8cc905ea1 100644 --- a/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/SoffitConnectorController.java +++ b/uPortal-soffit/uPortal-soffit-connector/src/main/java/org/apereo/portal/soffit/connector/SoffitConnectorController.java @@ -192,7 +192,7 @@ public void invokeService(final RenderRequest req, final RenderResponse res) { private ResponseWrapper fetchContentFromCacheIfAvailable( final RenderRequest req, final String serviceUrl) { - ResponseWrapper rslt = null; // default + ResponseWrapper result = null; // default final List cacheKeysToTry = new ArrayList<>(); // Don't use private-scope caching for anonymous users @@ -215,12 +215,12 @@ private ResponseWrapper fetchContentFromCacheIfAvailable( for (CacheTuple key : cacheKeysToTry) { final Element cacheElement = this.responseCache.get(key); if (cacheElement != null) { - rslt = (ResponseWrapper) cacheElement.getObjectValue(); + result = (ResponseWrapper) cacheElement.getObjectValue(); break; } } - return rslt; + return result; } private ResponseWrapper extractResponseAndCacheIfAppropriate( @@ -228,9 +228,9 @@ private ResponseWrapper extractResponseAndCacheIfAppropriate( // Extract final HttpEntity entity = httpResponse.getEntity(); - ResponseWrapper rslt; + ResponseWrapper result; try { - rslt = new ResponseWrapper(IOUtils.toByteArray(entity.getContent())); + result = new ResponseWrapper(IOUtils.toByteArray(entity.getContent())); } catch (UnsupportedOperationException | IOException e) { throw new RuntimeException("Failed to read the response", e); } @@ -292,7 +292,7 @@ private ResponseWrapper extractResponseAndCacheIfAppropriate( cacheTuple, cacheControlValue); if (cacheTuple != null) { - final Element element = new Element(cacheTuple, rslt); + final Element element = new Element(cacheTuple, result); element.setTimeToLive(timeToLive); responseCache.put(element); } else { @@ -306,7 +306,7 @@ private ResponseWrapper extractResponseAndCacheIfAppropriate( } } - return rslt; + return result; } /* diff --git a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/AbstractJwtService.java b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/AbstractJwtService.java index d4a1aeef6e6..a880c61b046 100644 --- a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/AbstractJwtService.java +++ b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/AbstractJwtService.java @@ -73,7 +73,7 @@ protected Claims createClaims( Class clazz, String username, Date expires) { // Registered claims - final Claims rslt = + final Claims result = Jwts.claims() .setIssuer(JWT_ISSUER) .setSubject(username) @@ -82,9 +82,9 @@ protected Claims createClaims( .setId(UUID.randomUUID().toString()); // Deserialization class - rslt.put(JwtClaims.CLASS.getName(), clazz.getName()); + result.put(JwtClaims.CLASS.getName(), clazz.getName()); - return rslt; + return result; } protected String generateEncryptedToken(Claims claims) { @@ -103,17 +103,17 @@ protected Jws parseEncryptedToken( String jwt = jwtEncryptor.decryptIfConfigured(encryptedToken); - final Jws rslt = Jwts.parser().setSigningKey(signatureKey).parseClaimsJws(jwt); + final Jws result = Jwts.parser().setSigningKey(signatureKey).parseClaimsJws(jwt); // Token expired? - final Date expires = rslt.getBody().getExpiration(); + final Date expires = result.getBody().getExpiration(); if (expires.before(new Date())) { - final String msg = "The specified token is expired: " + rslt; + final String msg = "The specified token is expired: " + result; throw new SecurityException(msg); } // Sanity check - final String s = (String) rslt.getBody().get(JwtClaims.CLASS.getName()); + final String s = (String) result.getBody().get(JwtClaims.CLASS.getName()); if (!clazz.getName().equals(s)) { // Opportunity for future versioning of the data model... needs work String msg = @@ -121,6 +121,6 @@ protected Jws parseEncryptedToken( throw new RuntimeException(msg); } - return rslt; + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/BearerService.java b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/BearerService.java index be1928632eb..93495b10151 100644 --- a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/BearerService.java +++ b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/BearerService.java @@ -92,8 +92,8 @@ public Bearer parseBearerToken(String bearerToken) { @SuppressWarnings("unchecked") final List groups = (List) claims.getBody().get(JwtClaims.GROUPS.getName()); - Bearer rslt = new Bearer(bearerToken, username, attributes, groups); - logger.debug("Produced the following Bearer for user '{}': {}", username, rslt); - return rslt; + Bearer result = new Bearer(bearerToken, username, attributes, groups); + logger.debug("Produced the following Bearer for user '{}': {}", username, result); + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/DefinitionService.java b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/DefinitionService.java index 63817a5c865..3908d4e9f2f 100644 --- a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/DefinitionService.java +++ b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/DefinitionService.java @@ -85,9 +85,9 @@ public Definition parseDefinition(String definitionToken) { final Map> parameters = (Map>) claims.getBody().get(JwtClaims.PARAMETERS.getName()); - Definition rslt = + Definition result = new Definition(definitionToken, title, fname, description, categories, parameters); - logger.debug("Produced the following Definition for user '{}': {}", username, rslt); - return rslt; + logger.debug("Produced the following Definition for user '{}': {}", username, result); + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/JwtClaims.java b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/JwtClaims.java index 34643bf4b57..d1fac786910 100644 --- a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/JwtClaims.java +++ b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/JwtClaims.java @@ -90,13 +90,13 @@ private JwtClaims(String name) { } public static JwtClaims forName(String name) { - JwtClaims rslt = null; // default + JwtClaims result = null; // default for (JwtClaims claim : JwtClaims.values()) { if (claim.getName().equals(name)) { - rslt = claim; + result = claim; } } - return rslt; + return result; } public String getName() { diff --git a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/PortalRequestService.java b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/PortalRequestService.java index 523942782d8..9e404454746 100644 --- a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/PortalRequestService.java +++ b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/PortalRequestService.java @@ -73,9 +73,9 @@ public PortalRequest parsePortalRequest(String portalRequestToken) { final Map> parameters = (Map>) claims.getBody().get(JwtClaims.PARAMETERS.getName()); - PortalRequest rslt = + PortalRequest result = new PortalRequest(portalRequestToken, properties, attributes, parameters); - logger.debug("Produced the following PortalRequest for user '{}': {}", username, rslt); - return rslt; + logger.debug("Produced the following PortalRequest for user '{}': {}", username, result); + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/PreferencesService.java b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/PreferencesService.java index eda8636b612..b353995e7d5 100644 --- a/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/PreferencesService.java +++ b/uPortal-soffit/uPortal-soffit-core/src/main/java/org/apereo/portal/soffit/service/PreferencesService.java @@ -67,8 +67,8 @@ public Preferences parsePreferences(String preferencesToken) { } } - Preferences rslt = new Preferences(preferencesToken, preferencesMap); - logger.debug("Produced the following Preferences for user '{}': {}", username, rslt); - return rslt; + Preferences result = new Preferences(preferencesToken, preferencesMap); + logger.debug("Produced the following Preferences for user '{}': {}", username, result); + return result; } } diff --git a/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/renderer/ModelAttributeService.java b/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/renderer/ModelAttributeService.java index 425d1a0f3e6..425ec4bd658 100644 --- a/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/renderer/ModelAttributeService.java +++ b/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/renderer/ModelAttributeService.java @@ -85,7 +85,7 @@ public void init() { Preferences preferences, Definition definition) { - final Map rslt = new HashMap<>(); + final Map result = new HashMap<>(); logger.debug("Processing model attributes for viewName='{}'", viewName); @@ -103,7 +103,7 @@ public void init() { // Are we looking at a class or a method? if (annotatedElement instanceof Class) { // The bean itself is the model attribute - rslt.put(modelAttributeName, bean); + result.put(modelAttributeName, bean); } else if (annotatedElement instanceof Method) { final Method m = (Method) annotatedElement; final Object modelAttribute = @@ -116,7 +116,7 @@ public void init() { bearer, preferences, definition); - rslt.put(modelAttributeName, modelAttribute); + result.put(modelAttributeName, modelAttribute); } else { final String msg = "Unsupported AnnotatedElement type: " @@ -127,9 +127,11 @@ public void init() { } logger.debug( - "Calculated the following model attributes for viewName='{}': {}", viewName, rslt); + "Calculated the following model attributes for viewName='{}': {}", + viewName, + result); - return rslt; + return result; } protected Object getModelAttributeFromMethod( @@ -153,8 +155,8 @@ protected Object getModelAttributeFromMethod( prepareMethodParameters( method, req, res, portalRequest, bearer, preferences, definition); try { - final Object rslt = method.invoke(bean, parameters); - return rslt; + final Object result = method.invoke(bean, parameters); + return result; } catch (IllegalAccessException | InvocationTargetException e) { final String msg = "Failed to generate a model attribute by invoking '" @@ -176,22 +178,22 @@ protected Object[] prepareMethodParameters( // Examine the parameters this Method declares and try to match them. final Class[] parameterTypes = method.getParameterTypes(); - final Object[] rslt = new Object[parameterTypes.length]; - for (int i = 0; i < rslt.length; i++) { + final Object[] result = new Object[parameterTypes.length]; + for (int i = 0; i < result.length; i++) { final Class pType = parameterTypes[i]; // At present, these are the parameter types we support... if (HttpServletRequest.class.equals(pType)) { - rslt[i] = req; + result[i] = req; } else if (HttpServletResponse.class.equals(pType)) { - rslt[i] = res; + result[i] = res; } else if (PortalRequest.class.equals(pType)) { - rslt[i] = portalRequest; + result[i] = portalRequest; } else if (Bearer.class.equals(pType)) { - rslt[i] = bearer; + result[i] = bearer; } else if (Preferences.class.equals(pType)) { - rslt[i] = preferences; + result[i] = preferences; } else if (Definition.class.equals(pType)) { - rslt[i] = definition; + result[i] = definition; } else { final String msg = "Unsupported parameter type for SoffitModelAttribute method: " + pType; @@ -199,7 +201,7 @@ protected Object[] prepareMethodParameters( } } - return rslt; + return result; } protected boolean attributeAppliesToView( diff --git a/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/renderer/SoffitRendererController.java b/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/renderer/SoffitRendererController.java index 014a3f7d4fa..5c0e2e5ae2f 100644 --- a/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/renderer/SoffitRendererController.java +++ b/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/renderer/SoffitRendererController.java @@ -219,8 +219,8 @@ private String selectView( } final ViewTuple viewTuple = new ViewTuple(modulePath, modeLowercase, windowStateLowercase); - String rslt = availableViews.get(viewTuple); - if (rslt == null) { + String result = availableViews.get(viewTuple); + if (result == null) { /* * This circumstance means that we haven't looked (yet); * check for a file named to match all 3. @@ -230,7 +230,7 @@ private String selectView( if (moduleResources.contains(pathBasedOnModeAndState)) { // We have a winner! availableViews.put(viewTuple, pathBasedOnModeAndState); - rslt = pathBasedOnModeAndState; + result = pathBasedOnModeAndState; } else { // Widen the search (within this module) based on Mode only final String pathBasedOnModeOnly = @@ -238,7 +238,7 @@ private String selectView( if (moduleResources.contains(pathBasedOnModeOnly)) { // We still need to store the choice so we're not constantly looking availableViews.put(viewTuple, pathBasedOnModeOnly); - rslt = pathBasedOnModeOnly; + result = pathBasedOnModeOnly; } else { throw new IllegalStateException( "Unable to select a view for Mode=" @@ -251,30 +251,30 @@ private String selectView( logger.info( "Selected viewName='{}' for Mode='{}' and WindowState='{}'", - rslt, + result, modeLowercase, windowStateLowercase); - return rslt; + return result; } private String getCompletePathforParts(final String... parts) { - StringBuilder rslt = new StringBuilder(); + StringBuilder result = new StringBuilder(); for (String part : parts) { - rslt.append(part); + result.append(part); if (!part.endsWith("/")) { // First part will be a directory - rslt.append("."); + result.append("."); } } - rslt.append("jsp"); // TODO: support more options + result.append("jsp"); // TODO: support more options - logger.debug("Calculated path '{}' for parts={}", rslt, parts); + logger.debug("Calculated path '{}' for parts={}", result, parts); - return rslt.toString(); + return result.toString(); } private void configureCacheHeaders(final HttpServletResponse res, final String module) { diff --git a/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/security/SoffitApiPreAuthenticatedProcessingFilter.java b/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/security/SoffitApiPreAuthenticatedProcessingFilter.java index 4aca2446c19..504113dcb7b 100644 --- a/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/security/SoffitApiPreAuthenticatedProcessingFilter.java +++ b/uPortal-soffit/uPortal-soffit-renderer/src/main/java/org/apereo/portal/soffit/security/SoffitApiPreAuthenticatedProcessingFilter.java @@ -94,10 +94,10 @@ protected Object getPreAuthenticatedPrincipal(HttpServletRequest request) { final List groupsClaim = claims.getBody().get("groups", List.class); final List groupsList = groupsClaim != null ? groupsClaim : Collections.emptyList(); - final UserDetails rslt = + final UserDetails result = new SoffitApiUserDetails(claims.getBody().getSubject(), groupsList); - request.setAttribute(USER_DETAILS_REQUEST_ATTRIBUTE, rslt); - return rslt; + request.setAttribute(USER_DETAILS_REQUEST_ATTRIBUTE, result); + return result; } catch (Exception e) { logger.info("The following Bearer token is unusable: '{}'", bearerToken); logger.debug("Failed to validate and/or parse the specified Bearer token", e); diff --git a/uPortal-spring/src/main/java/org/springframework/context/support/PortalPropertySourcesPlaceholderConfigurer.java b/uPortal-spring/src/main/java/org/springframework/context/support/PortalPropertySourcesPlaceholderConfigurer.java index 61a0dea21f2..353a37d5092 100644 --- a/uPortal-spring/src/main/java/org/springframework/context/support/PortalPropertySourcesPlaceholderConfigurer.java +++ b/uPortal-spring/src/main/java/org/springframework/context/support/PortalPropertySourcesPlaceholderConfigurer.java @@ -150,7 +150,7 @@ public PropertyResolver getPropertyResolver() { @Override protected Properties mergeProperties() throws IOException { - Properties rslt = null; + Properties result = null; /* * If properties file encryption is used in this deployment, the @@ -164,7 +164,7 @@ protected Properties mergeProperties() throws IOException { StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor(); encryptor.setPassword(encryptionKey); - rslt = new EncryptableProperties(encryptor); + result = new EncryptableProperties(encryptor); /* * BEGIN copied from PropertiesLoaderSupport.mergeProperties() @@ -172,18 +172,18 @@ protected Properties mergeProperties() throws IOException { if (this.localOverride) { // Load properties from file upfront, to let local properties override. - loadProperties(rslt); + loadProperties(result); } if (this.localProperties != null) { for (int i = 0; i < this.localProperties.length; i++) { - CollectionUtils.mergePropertiesIntoMap(this.localProperties[i], rslt); + CollectionUtils.mergePropertiesIntoMap(this.localProperties[i], result); } } if (!this.localOverride) { // Load properties from file afterwards, to let those properties override. - loadProperties(rslt); + loadProperties(result); } /* @@ -201,11 +201,11 @@ protected Properties mergeProperties() throws IOException { * The feature is not in use; defer to the Spring-provided * implementation of this method. */ - rslt = super.mergeProperties(); + result = super.mergeProperties(); } - honorClusterOverrides(rslt); - return rslt; + honorClusterOverrides(result); + return result; } public static void honorClusterOverrides(Properties properties) { diff --git a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/AbstractTenantOperationsListener.java b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/AbstractTenantOperationsListener.java index 2b3bc53d17a..5b1f0289bd3 100644 --- a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/AbstractTenantOperationsListener.java +++ b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/AbstractTenantOperationsListener.java @@ -89,7 +89,7 @@ public TenantOperationResponse onDelete(ITenant tenant) { /** @since 4.3 */ @Override - public Set getAvaialableActions() { + public Set getAvailableActions() { return Collections.emptySet(); } @@ -118,8 +118,8 @@ private Locale getCurrentUserLocale() { } private TenantOperationResponse getDefaultResponse() { - TenantOperationResponse rslt = + TenantOperationResponse result = new TenantOperationResponse(this, TenantOperationResponse.Result.IGNORE); - return rslt; + return result; } } diff --git a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ITenantManagementAction.java b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ITenantManagementAction.java index 7774e883874..cec5332c59c 100644 --- a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ITenantManagementAction.java +++ b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ITenantManagementAction.java @@ -26,11 +26,11 @@ public interface ITenantManagementAction { String getFname(); /** - * The key used with the Spring messageSurce to obtain the internationalized UI string for this + * The key used with the Spring messageSource to obtain the internationalized UI string for this * operation. */ String getMessageCode(); - /** Invoke the intended behavior on the specified tenent. */ + /** Invoke the intended behavior on the specified tenant. */ TenantOperationResponse invoke(ITenant tenant); } diff --git a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ITenantOperationsListener.java b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ITenantOperationsListener.java index ed4d6e9dcb1..0b97b008443 100644 --- a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ITenantOperationsListener.java +++ b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ITenantOperationsListener.java @@ -62,7 +62,7 @@ public interface ITenantOperationsListener { * * @since 4.3 */ - Set getAvaialableActions(); + Set getAvailableActions(); /** * Throws an exception if the specified value isn't allowable for the specified attribute. diff --git a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/JpaPersistenceTenantOperationsListener.java b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/JpaPersistenceTenantOperationsListener.java index 19c2674110d..cf32a29e4df 100644 --- a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/JpaPersistenceTenantOperationsListener.java +++ b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/JpaPersistenceTenantOperationsListener.java @@ -56,12 +56,12 @@ public TenantOperationResponse onCreate(final ITenant tenant) { FAILED_TO_CREATE_TENANT, new String[] {tenant.getName()})); return error; } - final TenantOperationResponse rslt = + final TenantOperationResponse result = new TenantOperationResponse(this, TenantOperationResponse.Result.SUCCESS); - rslt.addMessage( + result.addMessage( createLocalizedMessage( TENANT_CREATED_SUCCESSFULLY, new String[] {tenant.getName()})); - return rslt; + return result; } @Override @@ -77,12 +77,12 @@ public TenantOperationResponse onUpdate(final ITenant tenant) { FAILED_TO_UPDATE_TENANT, new String[] {tenant.getName()})); return error; } - final TenantOperationResponse rslt = + final TenantOperationResponse result = new TenantOperationResponse(this, TenantOperationResponse.Result.SUCCESS); - rslt.addMessage( + result.addMessage( createLocalizedMessage( TENANT_UPDATED_SUCCESSFULLY, new String[] {tenant.getName()})); - return rslt; + return result; } @Override @@ -98,11 +98,11 @@ public TenantOperationResponse onDelete(final ITenant tenant) { FAILED_TO_DELETE_TENANT, new String[] {tenant.getName()})); return error; } - final TenantOperationResponse rslt = + final TenantOperationResponse result = new TenantOperationResponse(this, TenantOperationResponse.Result.SUCCESS); - rslt.addMessage( + result.addMessage( createLocalizedMessage( TENANT_DELETED_SUCCESSFULLY, new String[] {tenant.getName()})); - return rslt; + return result; } } diff --git a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/JpaTenantDao.java b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/JpaTenantDao.java index 781088f5b62..1acbb7de5e5 100644 --- a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/JpaTenantDao.java +++ b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/JpaTenantDao.java @@ -46,11 +46,11 @@ public void afterPropertiesSet() throws Exception { new Function>() { @Override public CriteriaQuery apply(CriteriaBuilder cb) { - final CriteriaQuery rslt = + final CriteriaQuery result = cb.createQuery(JpaTenant.class); - Root root = rslt.from(JpaTenant.class); - rslt.orderBy(cb.asc(root.get(JpaTenant_.name))); - return rslt; + Root root = result.from(JpaTenant.class); + result.orderBy(cb.asc(root.get(JpaTenant_.name))); + return result; } }); tenantByNameQuery = @@ -58,11 +58,11 @@ public CriteriaQuery apply(CriteriaBuilder cb) { new Function>() { @Override public CriteriaQuery apply(CriteriaBuilder cb) { - final CriteriaQuery rslt = + final CriteriaQuery result = cb.createQuery(JpaTenant.class); - Root root = rslt.from(JpaTenant.class); - rslt.where(cb.equal(root.get(JpaTenant_.name), nameParameter)); - return rslt; + Root root = result.from(JpaTenant.class); + result.where(cb.equal(root.get(JpaTenant_.name), nameParameter)); + return result; } }); tenantByFNameQuery = @@ -70,11 +70,11 @@ public CriteriaQuery apply(CriteriaBuilder cb) { new Function>() { @Override public CriteriaQuery apply(CriteriaBuilder cb) { - final CriteriaQuery rslt = + final CriteriaQuery result = cb.createQuery(JpaTenant.class); - Root root = rslt.from(JpaTenant.class); - rslt.where(cb.equal(root.get(JpaTenant_.fname), fnameParameter)); - return rslt; + Root root = result.from(JpaTenant.class); + result.where(cb.equal(root.get(JpaTenant_.fname), fnameParameter)); + return result; } }); } @@ -123,13 +123,13 @@ public void createOrUpdateTenant(ITenant tenant) { // Assertions if (tenant instanceof JpaTenant) { - final ITenant persistantTenant; + final ITenant persistentTenant; if (entityManager.contains(tenant)) { - persistantTenant = tenant; + persistentTenant = tenant; } else { - persistantTenant = entityManager.merge(tenant); + persistentTenant = entityManager.merge(tenant); } - entityManager.persist(persistantTenant); + entityManager.persist(persistentTenant); } else { // This object is not supported by this DAO final String msg = diff --git a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ResetPasswordTenantOperationsListener.java b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ResetPasswordTenantOperationsListener.java index 8296d8e4bd4..64c90cd6d0c 100644 --- a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ResetPasswordTenantOperationsListener.java +++ b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/ResetPasswordTenantOperationsListener.java @@ -86,8 +86,8 @@ public TenantOperationResponse onUpdate(final ITenant tenant) { /** @since 4.3 */ @Override - public Set getAvaialableActions() { - ITenantManagementAction rslt = + public Set getAvailableActions() { + ITenantManagementAction result = new ITenantManagementAction() { @Override public String getFname() { @@ -104,7 +104,7 @@ public TenantOperationResponse invoke(final ITenant tenant) { return prepareResponse(tenant); } }; - return Collections.singleton(rslt); + return Collections.singleton(result); } @Override @@ -146,13 +146,13 @@ private TenantOperationResponse prepareResponse(final ITenant tenant) { new String[] {tenant.getAttribute(ADMIN_CONTACT_EMAIL)})); return error; } - final TenantOperationResponse rslt = + final TenantOperationResponse result = new TenantOperationResponse(this, TenantOperationResponse.Result.SUCCESS); - rslt.addMessage( + result.addMessage( createLocalizedMessage( TENANT_ADMIN_EMAIL_SENT, new String[] {tenant.getAttribute(ADMIN_CONTACT_EMAIL)})); - return rslt; + return result; } private void sendResetPasswordEmail(final ITenant tenant) { diff --git a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java index c3d92cdbc92..793744729ec 100644 --- a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java +++ b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TemplateDataTenantOperationsListener.java @@ -230,7 +230,7 @@ public TenantOperationResponse onDelete(final ITenant tenant) { return super.onDelete(tenant); } - TenantOperationResponse.Result result = TenantOperationResponse.Result.SUCCESS; // detault + TenantOperationResponse.Result result = TenantOperationResponse.Result.SUCCESS; // default // We will prepare a list of items that succeeded... final StringBuilder successfulEntitiesMessage = new StringBuilder(); @@ -287,17 +287,17 @@ public TenantOperationResponse onDelete(final ITenant tenant) { successfulEntitiesMessage.append("\n"); failedEntitiesMessage.append("\n"); - final TenantOperationResponse rslt = new TenantOperationResponse(this, result); + final TenantOperationResponse response = new TenantOperationResponse(this, result); // Did we succeed at all? if (didAtLeastOneCommandSucceed) { - rslt.addMessage(successfulEntitiesMessage.toString()); + response.addMessage(successfulEntitiesMessage.toString()); } switch (result) { // Did we fail at all? case FAIL: - rslt.addMessage(failedEntitiesMessage.toString()); + response.addMessage(failedEntitiesMessage.toString()); break; // Or succeed completely? default: @@ -305,7 +305,7 @@ public TenantOperationResponse onDelete(final ITenant tenant) { break; } - return rslt; + return response; } /* @@ -358,18 +358,18 @@ public TenantOperationResponse importWithResources( return error; } - TenantOperationResponse rslt = + TenantOperationResponse result = new TenantOperationResponse(this, TenantOperationResponse.Result.SUCCESS); - rslt.addMessage(finalizeImportReport(importReport)); - rslt.addMessage( + result.addMessage(finalizeImportReport(importReport)); + result.addMessage( createLocalizedMessage(TENANT_ENTITIES_IMPORTED, new String[] {tenant.getName()})); - return rslt; + return result; } /** Loads dom4j Documents and sorts the entity files into the proper order for Import. */ private Map> prepareImportQueue( final ITenant tenant, final Set templates) throws Exception { - final Map> rslt = new HashMap<>(); + final Map> result = new HashMap<>(); Resource rsc = null; try { for (Resource r : templates) { @@ -390,11 +390,11 @@ private Map> prepareImportQueue( // Found the right bucket... log.debug("Found PortalDataKey '{}' for data document {}", pdk, r.getURI()); atLeastOneMatchingDataKey = pdk; - Set bucket = rslt.get(atLeastOneMatchingDataKey); + Set bucket = result.get(atLeastOneMatchingDataKey); if (bucket == null) { // First of these we've seen; create the bucket; bucket = new HashSet<>(); - rslt.put(atLeastOneMatchingDataKey, bucket); + result.put(atLeastOneMatchingDataKey, bucket); } BucketTuple tuple = new BucketTuple(rsc, doc); bucket.add(tuple); @@ -419,7 +419,7 @@ private Map> prepareImportQueue( e); throw e; } - return rslt; + return result; } /** Imports the specified entities in the proper order. */ @@ -510,15 +510,15 @@ private boolean evaluatePortalDataKeyMatch(Document doc, PortalDataKey pdk) { private String createImportReportLineItem(PortalDataKey pdk, BucketTuple tuple) { final String versionPart = pdk.getVersion() != null ? " (" + pdk.getVersion() + ")" : ""; - StringBuilder rslt = new StringBuilder(); - rslt.append("\n
  • ") + StringBuilder result = new StringBuilder(); + result.append("\n
  • ") .append(pdk.getName().getLocalPart()) .append(versionPart) .append("") .append(" ") .append(tuple.getResource().getFilename()) .append("
  • "); - return rslt.toString(); + return result.toString(); } private String finalizeImportReport(StringBuilder message) { diff --git a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java index c468731eccd..139d9f86ce6 100644 --- a/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java +++ b/uPortal-tenants/src/main/java/org/apereo/portal/tenants/TenantService.java @@ -73,7 +73,7 @@ public void init() { if (listener.isOptional()) { optional.add(listener); } - for (ITenantManagementAction action : listener.getAvaialableActions()) { + for (ITenantManagementAction action : listener.getAvailableActions()) { map.put(action.getFname(), action); } } @@ -96,9 +96,9 @@ public ITenant getTenantByFName(final String fname) { * (alphabetically by name). */ public List getTenantsList() { - List rslt = new ArrayList(tenantDao.getAllTenants()); - Collections.sort(rslt); - return rslt; + List result = new ArrayList(tenantDao.getAllTenants()); + Collections.sort(result); + return result; } public ITenant createTenant( @@ -128,14 +128,14 @@ public ITenant createTenant( TENANT_FNAME_VALIDATOR_REGEX); // Create the concrete tenant object - final ITenant rslt = tenantDao.instantiate(); - rslt.setName(name); - rslt.setFname(fname); + final ITenant result = tenantDao.instantiate(); + result.setName(name); + result.setFname(fname); for (Map.Entry y : attributes.entrySet()) { - rslt.setAttribute(y.getKey(), y.getValue()); + result.setAttribute(y.getKey(), y.getValue()); } - log.info("Creating new tenant: {}", rslt.toString()); + log.info("Creating new tenant: {}", result.toString()); // Invoke the listeners for (ITenantOperationsListener listener : this.tenantOperationsListeners) { @@ -147,7 +147,7 @@ public ITenant createTenant( } TenantOperationResponse res = null; // default try { - res = listener.onCreate(rslt); + res = listener.onCreate(result); if (!TenantOperationResponse.Result.IGNORE.equals(res.getResult())) { responses.add(res); } @@ -156,14 +156,14 @@ public ITenant createTenant( "Error invoking ITenantOperationsListener '" + listener.toString() + "' for tenant: " - + rslt.toString(); + + result.toString(); throw new RuntimeException(msg, e); } if (res.getResult().equals(TenantOperationResponse.Result.ABORT)) { log.warn( "ITenantOperationsListener {} aborted the creation of tenant: ", listener.toString(), - rslt.toString()); + result.toString()); // TODO: Can we rollback somehow? break; } @@ -171,9 +171,9 @@ public ITenant createTenant( // Fire an appropriate PortalEvent final HttpServletRequest request = portalRequestUtils.getCurrentPortalRequest(); - tenantEventFactory.publishTenantCreatedTenantEvent(request, this, rslt); + tenantEventFactory.publishTenantCreatedTenantEvent(request, this, result); - return rslt; + return result; } public ITenant updateTenant( @@ -283,7 +283,7 @@ public List getOptionalOperationsListeners() { * * @since 4.3 */ - public Set getAllAvaialableActions() { + public Set getAllAvailableActions() { return new HashSet(operationsListenerAvailableActions.values()); } @@ -294,12 +294,12 @@ public ITenantManagementAction getAction(final String fname) { String msg = "Argument 'fname' cannot be blank"; throw new IllegalArgumentException(msg); } - ITenantManagementAction rslt = this.operationsListenerAvailableActions.get(fname); - if (rslt == null) { + ITenantManagementAction result = this.operationsListenerAvailableActions.get(fname); + if (result == null) { String msg = "Action not found: " + fname; throw new RuntimeException(msg); } - return rslt; + return result; } /** @@ -308,16 +308,16 @@ public ITenantManagementAction getAction(final String fname) { * @since 4.3 */ public boolean nameExists(final String name) { - boolean rslt = false; // default + boolean result = false; // default try { final ITenant tenant = this.tenantDao.getTenantByName(name); - rslt = tenant != null; + result = tenant != null; } catch (IllegalArgumentException iae) { // This exception is completely fine; it simply // means there is no tenant with this name. - rslt = false; + result = false; } - return rslt; + return result; } /** @@ -326,16 +326,16 @@ public boolean nameExists(final String name) { * @since 4.3 */ public boolean fnameExists(final String fname) { - boolean rslt = false; // default + boolean result = false; // default try { final ITenant tenant = getTenantByFName(fname); - rslt = tenant != null; + result = tenant != null; } catch (IllegalArgumentException iae) { // This exception is completely fine; it simply // means there is no tenant with this fname. - rslt = false; + result = false; } - return rslt; + return result; } /** diff --git a/uPortal-tools/src/main/java/org/apereo/portal/tools/dbloader/TableXmlHandler.java b/uPortal-tools/src/main/java/org/apereo/portal/tools/dbloader/TableXmlHandler.java index 238d79d7fa4..1ae951aab9d 100644 --- a/uPortal-tools/src/main/java/org/apereo/portal/tools/dbloader/TableXmlHandler.java +++ b/uPortal-tools/src/main/java/org/apereo/portal/tools/dbloader/TableXmlHandler.java @@ -34,7 +34,7 @@ /** * Builds an object model of Hibernate mapping objects for tables based on an XML definition file. - * Once parsing is complete the generated objects are availabe via {@link #getTables()} + * Once parsing is complete the generated objects are available via {@link #getTables()} */ public class TableXmlHandler extends BaseDbXmlHandler implements ITableDataProvider { private final Mappings mappings = new Configuration().createMappings(); diff --git a/uPortal-url/src/main/java/org/apereo/portal/url/BaseEncodedStringBuilder.java b/uPortal-url/src/main/java/org/apereo/portal/url/BaseEncodedStringBuilder.java index 68e8feef7fb..45d933c0e29 100644 --- a/uPortal-url/src/main/java/org/apereo/portal/url/BaseEncodedStringBuilder.java +++ b/uPortal-url/src/main/java/org/apereo/portal/url/BaseEncodedStringBuilder.java @@ -47,7 +47,7 @@ protected final String encode(String s) { throw new IllegalStateException( "Encoding '" + this.encoding - + "' is not supported. This should have been caught in the consructor.", + + "' is not supported. This should have been caught in the constructor.", e); } } diff --git a/uPortal-url/src/main/java/org/apereo/portal/url/PortalHttpServletRequestWrapper.java b/uPortal-url/src/main/java/org/apereo/portal/url/PortalHttpServletRequestWrapper.java index 3ada51f18a8..dbc83d28505 100644 --- a/uPortal-url/src/main/java/org/apereo/portal/url/PortalHttpServletRequestWrapper.java +++ b/uPortal-url/src/main/java/org/apereo/portal/url/PortalHttpServletRequestWrapper.java @@ -248,14 +248,14 @@ public boolean isUserInRole(String role) { final EntityIdentifier personEntityId = person.getEntityIdentifier(); final IGroupMember personGroupMember = GroupService.getGroupMember(personEntityId); - final boolean rslt = personGroupMember.isDeepMemberOf(groupForRole); + final boolean result = personGroupMember.isDeepMemberOf(groupForRole); logger.trace( "Answering {} for isUserInRole where user='{}', role='{}', and groupForRole='{}'", - rslt, + result, person.getUserName(), role, groupForRole.getName()); - return rslt; + return result; } /* (non-Javadoc) diff --git a/uPortal-url/src/main/java/org/apereo/portal/url/PortalRequestUtilsImpl.java b/uPortal-url/src/main/java/org/apereo/portal/url/PortalRequestUtilsImpl.java index 1f7e8843e4b..8b5d32ce2e4 100644 --- a/uPortal-url/src/main/java/org/apereo/portal/url/PortalRequestUtilsImpl.java +++ b/uPortal-url/src/main/java/org/apereo/portal/url/PortalRequestUtilsImpl.java @@ -45,7 +45,7 @@ public HttpServletRequest getPortletHttpRequest(PortletRequest portletRequest) { } throw new IllegalArgumentException( - "The orginal portlet HttpServletRequest is not available from the PortletRequest using attribute '" + "The original portlet HttpServletRequest is not available from the PortletRequest using attribute '" + PortletHttpServletRequestWrapper.ATTRIBUTE__HTTP_SERVLET_REQUEST + "'"); } @@ -113,7 +113,7 @@ public HttpServletResponse getOriginalPortalResponse(PortletRequest portletReque } throw new IllegalArgumentException( - "The orginal portal HttpServletResponse is not available from the PortletRequest using attribute '" + "The original portal HttpServletResponse is not available from the PortletRequest using attribute '" + PortalHttpServletRequestWrapper.ATTRIBUTE__HTTP_SERVLET_RESPONSE + "'"); } @@ -129,7 +129,7 @@ public HttpServletResponse getOriginalPortalResponse(HttpServletRequest portletR } throw new IllegalArgumentException( - "The orginal portal HttpServletResponse is not available from the HttpServletRequest using attribute '" + "The original portal HttpServletResponse is not available from the HttpServletRequest using attribute '" + PortalHttpServletRequestWrapper.ATTRIBUTE__HTTP_SERVLET_RESPONSE + "'"); } diff --git a/uPortal-url/src/main/java/org/apereo/portal/url/UrlCasParamAppenderFromPortalRequestCustomizer.java b/uPortal-url/src/main/java/org/apereo/portal/url/UrlCasParamAppenderFromPortalRequestCustomizer.java index 684fd451351..0d67ea02ae8 100644 --- a/uPortal-url/src/main/java/org/apereo/portal/url/UrlCasParamAppenderFromPortalRequestCustomizer.java +++ b/uPortal-url/src/main/java/org/apereo/portal/url/UrlCasParamAppenderFromPortalRequestCustomizer.java @@ -54,7 +54,7 @@ public static String getFullURL(HttpServletRequest request) { StringBuilder requestURL; HttpServletRequest portalRequest = request; - // Usefull in case of request passed from the xslt/portlet context, we don't have the portal + // Useful in case of request passed from the xslt/portlet context, we don't have the portal // request passed if (request instanceof HttpServletPortletRequestWrapper) { portalRequest = diff --git a/uPortal-url/src/main/java/org/apereo/portal/url/UrlState.java b/uPortal-url/src/main/java/org/apereo/portal/url/UrlState.java index d129012ae1c..0cb84a6c339 100644 --- a/uPortal-url/src/main/java/org/apereo/portal/url/UrlState.java +++ b/uPortal-url/src/main/java/org/apereo/portal/url/UrlState.java @@ -40,17 +40,17 @@ public String toLowercaseString() { return this.lowercase; } - public static UrlState valueOfIngoreCase(String name) { + public static UrlState valueOfIgnoreCase(String name) { return UrlState.valueOf(name.toUpperCase()); } - public static UrlState valueOfIngoreCase(String name, UrlState defaultValue) { + public static UrlState valueOfIgnoreCase(String name, UrlState defaultValue) { if (name == null) { return defaultValue; } try { - return valueOfIngoreCase(name); + return valueOfIgnoreCase(name); } catch (IllegalArgumentException e) { return defaultValue; } diff --git a/uPortal-url/src/main/java/org/apereo/portal/url/UrlType.java b/uPortal-url/src/main/java/org/apereo/portal/url/UrlType.java index ce9ca34e1f7..0d88f933ca8 100644 --- a/uPortal-url/src/main/java/org/apereo/portal/url/UrlType.java +++ b/uPortal-url/src/main/java/org/apereo/portal/url/UrlType.java @@ -79,17 +79,17 @@ public static UrlType fromPortletUrlType(TYPE t) { throw new IllegalStateException("Unknown TYPE: " + t); } - public static UrlType valueOfIngoreCase(String name) { + public static UrlType valueOfIgnoreCase(String name) { return UrlType.valueOf(name.toUpperCase()); } - public static UrlType valueOfIngoreCase(String name, UrlType defaultValue) { + public static UrlType valueOfIgnoreCase(String name, UrlType defaultValue) { if (name == null) { return defaultValue; } try { - return valueOfIngoreCase(name); + return valueOfIgnoreCase(name); } catch (IllegalArgumentException e) { return defaultValue; } diff --git a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ClusterLockServiceImpl.java b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ClusterLockServiceImpl.java index d175d0136c4..5b1db961ceb 100644 --- a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ClusterLockServiceImpl.java +++ b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ClusterLockServiceImpl.java @@ -193,7 +193,7 @@ public TryLockFunctionResult doInTryLock( // Return skipped result this.logger.trace( - "failed to aquire database lock due to DatabaseLockWorker not executing, returning notExecuted result for: {}", + "failed to acquire database lock due to DatabaseLockWorker not executing, returning notExecuted result for: {}", mutexName); return TryLockFunctionResultImpl.getSkippedInstance(LockStatus.SKIPPED_LOCKED); } @@ -202,7 +202,7 @@ public TryLockFunctionResult doInTryLock( if (mutex == null) { // Failed to get DB lock, stop now this.logger.trace( - "failed to aquire database lock, returning notExecuted result for: {}", + "failed to acquire database lock, returning notExecuted result for: {}", mutexName); return TryLockFunctionResultImpl.getSkippedInstance(LockStatus.SKIPPED_LOCKED); } diff --git a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/DatabaseMetaDataImpl.java b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/DatabaseMetaDataImpl.java index bfb0e1bdde9..84c123b489b 100644 --- a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/DatabaseMetaDataImpl.java +++ b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/jdbc/DatabaseMetaDataImpl.java @@ -128,7 +128,7 @@ private void releaseConnection(final Connection conn) { conn.close(); } } catch (Exception e) { - LOG.warn("An error occured while closing a connection.", e); + LOG.warn("An error occurred while closing a connection.", e); } } diff --git a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/ldap/ContextSourceLdapServerImpl.java b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/ldap/ContextSourceLdapServerImpl.java index 4bb356c3f14..5edf6392a27 100644 --- a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/ldap/ContextSourceLdapServerImpl.java +++ b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/ldap/ContextSourceLdapServerImpl.java @@ -77,7 +77,7 @@ public void releaseConnection(DirContext conn) { try { conn.close(); } catch (NamingException ne) { - this.logger.warn("An exception occured while closing DirContext='" + conn + "'", ne); + this.logger.warn("An exception occurred while closing DirContext='" + conn + "'", ne); } } } diff --git a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/LazyInitByDefaultBeanDefinitionDocumentReader.java b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/LazyInitByDefaultBeanDefinitionDocumentReader.java index 23b6d1ec25b..0558e93ac2d 100644 --- a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/LazyInitByDefaultBeanDefinitionDocumentReader.java +++ b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/LazyInitByDefaultBeanDefinitionDocumentReader.java @@ -21,7 +21,7 @@ /** * Extends the Spring DefaultBeanDefinitionDocumentReader to set the {@link - * BeanDefinitionParserDelegate#DEFAULT_LAZY_INIT_ATTRIBUTE} to true, usefull when loading a context + * BeanDefinitionParserDelegate#DEFAULT_LAZY_INIT_ATTRIBUTE} to true, useful when loading a context * during testing or with command line tools. */ public class LazyInitByDefaultBeanDefinitionDocumentReader diff --git a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/CacheManagementHelper.java b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/CacheManagementHelper.java index 2bc3ab73203..933eb3e2b11 100644 --- a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/CacheManagementHelper.java +++ b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/CacheManagementHelper.java @@ -33,9 +33,9 @@ */ @Service public class CacheManagementHelper { - private static final class CaseInsenstivieStringComparator implements Comparator { - public static final CaseInsenstivieStringComparator INSTANCE = - new CaseInsenstivieStringComparator(); + private static final class CaseInsensitiveStringComparator implements Comparator { + public static final CaseInsensitiveStringComparator INSTANCE = + new CaseInsensitiveStringComparator(); @Override public int compare(String o1, String o2) { @@ -55,7 +55,7 @@ public void setCacheManager(CacheManager cacheManager) { public Map getAllCacheStatistics() { final Map allCacheStatistics = - new TreeMap<>(CaseInsenstivieStringComparator.INSTANCE); + new TreeMap<>(CaseInsensitiveStringComparator.INSTANCE); for (final String cacheName : this.cacheManager.getCacheNames()) { final Cache cache = this.cacheManager.getCache(cacheName); diff --git a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/resource/CachingResourceLoaderImpl.java b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/resource/CachingResourceLoaderImpl.java index 0f3d836a701..e8c69e07972 100644 --- a/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/resource/CachingResourceLoaderImpl.java +++ b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/cache/resource/CachingResourceLoaderImpl.java @@ -78,7 +78,7 @@ public CachedResource getResource( Resource resource, Loader builder, long checkInterval) throws IOException { if (Included.PLAIN == this.resourcesElementsProvider.getDefaultIncludedType()) { this.logger.trace( - "Resoure Aggregation Disabled, ignoring resource cache and loading '" + "ReSource Aggregation Disabled, ignoring resource cache and loading '" + resource + "' directly"); return this.loadResource(resource, builder); diff --git a/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java b/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java index e4084f10443..06d2c37e415 100644 --- a/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java +++ b/uPortal-utils/uPortal-utils-jmx/src/main/java/org/apereo/portal/jmx/JavaManagementServerBean.java @@ -68,12 +68,12 @@ * *
    * - *

    IMPORTNANT NOTE Using this bean starts an RMI server. If this bean is used in a JVM - * that is long running and has any sort of generational garbage collector configured the system + *

    IMPORTANT NOTE Using this bean starts an RMI server. If this bean is used in a JVM that + * is long running and has any sort of generational garbage collector configured the system * properties sun.rmi.dgc.client.gcInterval and sun.rmi.dgc.server.gcInterval need to be set to some * high value. They configure how often the RMI server requests a full GC. To disable the RMI * induced GCs set the properties to '0x7ffffffffffffffe' Only do this if you can rely on the - * generational GC to reguarly clean up RMI objects. + * generational GC to regularly clean up RMI objects. */ public class JavaManagementServerBean { // System properties diff --git a/uPortal-web/src/main/java/org/apereo/portal/api/portlet/PortletDelegationLocator.java b/uPortal-web/src/main/java/org/apereo/portal/api/portlet/PortletDelegationLocator.java index 046193d0c72..2f3719b71c5 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/api/portlet/PortletDelegationLocator.java +++ b/uPortal-web/src/main/java/org/apereo/portal/api/portlet/PortletDelegationLocator.java @@ -24,7 +24,7 @@ */ public interface PortletDelegationLocator { /** The PortletDelegationLocator instance will be available in the request under this key */ - public static final String PORTLET_DELECATION_LOCATOR_ATTR = + public static final String PORTLET_DELEGATION_LOCATOR_ATTR = PortletDelegationLocator.class.getName(); /** diff --git a/uPortal-web/src/main/java/org/apereo/portal/portlet/container/services/LocalPortletContextManager.java b/uPortal-web/src/main/java/org/apereo/portal/portlet/container/services/LocalPortletContextManager.java index 0bd62e4e202..ae8729e5fe4 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/portlet/container/services/LocalPortletContextManager.java +++ b/uPortal-web/src/main/java/org/apereo/portal/portlet/container/services/LocalPortletContextManager.java @@ -280,7 +280,7 @@ private void fireRemoved(DriverPortletContext context) { /** * Retrieve the Portlet Application Deployment Descriptor for the given servlet context. Create - * it if it does not allready exist. + * it if it does not already exist. * * @param servletContext the servlet context. * @return The portlet application deployment descriptor. diff --git a/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaMarketplaceRatingDao.java b/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaMarketplaceRatingDao.java index d245de4a42d..d32bcab6f8e 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaMarketplaceRatingDao.java +++ b/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaMarketplaceRatingDao.java @@ -242,14 +242,14 @@ public CriteriaQuery apply( public void deleteRating(IMarketplaceRating marketplaceRatingImplementation) { Validate.notNull( marketplaceRatingImplementation, "marketplaceRatingImplementation can not be null"); - final IMarketplaceRating persistantMarketplaceRatingImpl; + final IMarketplaceRating persistentMarketplaceRatingImpl; final EntityManager entityManager = this.getEntityManager(); if (entityManager.contains(marketplaceRatingImplementation)) { - persistantMarketplaceRatingImpl = marketplaceRatingImplementation; + persistentMarketplaceRatingImpl = marketplaceRatingImplementation; } else { - persistantMarketplaceRatingImpl = entityManager.merge(marketplaceRatingImplementation); + persistentMarketplaceRatingImpl = entityManager.merge(marketplaceRatingImplementation); } - entityManager.remove(persistantMarketplaceRatingImpl); + entityManager.remove(persistentMarketplaceRatingImpl); } @Override diff --git a/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaPortletDefinitionDao.java b/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaPortletDefinitionDao.java index 339b96df282..7ef9129003b 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaPortletDefinitionDao.java +++ b/uPortal-web/src/main/java/org/apereo/portal/portlet/dao/jpa/JpaPortletDefinitionDao.java @@ -160,17 +160,17 @@ public IPortletDefinition getPortletDefinition(IPortletDefinitionId portletDefin public IPortletDefinition getPortletDefinition(String portletDefinitionIdString) { Validate.notNull(portletDefinitionIdString, "portletDefinitionIdString can not be null"); - PortletDefinitionImpl rslt = null; // default + PortletDefinitionImpl result = null; // default final Long internalPortletDefinitionId = getNativePortletDefinitionId(portletDefinitionIdString); if (internalPortletDefinitionId != null) { - rslt = + result = this.getEntityManager() .find(PortletDefinitionImpl.class, internalPortletDefinitionId); } - return rslt; + return result; } @Override @@ -277,14 +277,14 @@ private long getNativePortletDefinitionId(IPortletDefinitionId portletDefinition } private Long getNativePortletDefinitionId(String portletDefinitionId) { - Long rslt = null; // default + Long result = null; // default try { - rslt = Long.parseLong(portletDefinitionId); + result = Long.parseLong(portletDefinitionId); } catch (NumberFormatException nfe) { logger.warn( "The portletDefinitionId '{}' is not parsable to a valid portletId (long); null will be returned", portletDefinitionId); } - return rslt; + return result; } } diff --git a/uPortal-web/src/main/java/org/apereo/portal/portlet/delegation/jsp/RenderPortletTag.java b/uPortal-web/src/main/java/org/apereo/portal/portlet/delegation/jsp/RenderPortletTag.java index 7a4fb3b4e18..9c75cff610b 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/portlet/delegation/jsp/RenderPortletTag.java +++ b/uPortal-web/src/main/java/org/apereo/portal/portlet/delegation/jsp/RenderPortletTag.java @@ -121,7 +121,7 @@ public int doEndTag() throws JspException { final PortletDelegationLocator portletDelegationLocator = (PortletDelegationLocator) renderRequest.getAttribute( - PortletDelegationLocator.PORTLET_DELECATION_LOCATOR_ATTR); + PortletDelegationLocator.PORTLET_DELEGATION_LOCATOR_ATTR); final String sessionKey = this.sessionKeyPrefix + this.fname; diff --git a/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletEventCoordinatationService.java b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletEventCoordinatationService.java index fc29d5b3c26..602cf709073 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletEventCoordinatationService.java +++ b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletEventCoordinatationService.java @@ -427,7 +427,7 @@ protected Event unmarshall(IPortletWindow portletWindow, Event event) { // now test if object is jaxb final EventDefinition eventDefinitionDD = - getEventDefintion(portletWindow, event.getQName()); + getEventDefinition(portletWindow, event.getQName()); final PortletDefinition portletDefinition = portletWindow.getPlutoPortletWindow().getPortletDefinition(); @@ -475,7 +475,7 @@ protected Event unmarshall(IPortletWindow portletWindow, Event event) { } // TODO cache this resolution - protected EventDefinition getEventDefintion(IPortletWindow portletWindow, QName name) { + protected EventDefinition getEventDefinition(IPortletWindow portletWindow, QName name) { PortletApplicationDefinition appDD = portletWindow.getPlutoPortletWindow().getPortletDefinition().getApplication(); for (EventDefinition def : appDD.getEventDefinitions()) { diff --git a/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletExecutionManager.java b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletExecutionManager.java index c5b7e1cc134..ec0a33696e1 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletExecutionManager.java +++ b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletExecutionManager.java @@ -511,7 +511,7 @@ protected void waitForEventWorker( this.portletWindowRegistry.getPortletWindow(request, portletWindowId); logger.warn( portletWindow - + " threw an execption while executing an event. This chain of event handling will terminate.", + + " threw an exception while executing an event. This chain of event handling will terminate.", e); } diff --git a/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java index 0002ead19d5..b1c3713bec5 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java +++ b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java @@ -938,7 +938,7 @@ protected HttpServletRequest setupPortletRequest(HttpServletRequest httpServletR final PortletHttpServletRequestWrapper portletHttpServletRequestWrapper = new PortletHttpServletRequestWrapper(httpServletRequest); portletHttpServletRequestWrapper.setAttribute( - PortletDelegationLocator.PORTLET_DELECATION_LOCATOR_ATTR, + PortletDelegationLocator.PORTLET_DELEGATION_LOCATOR_ATTR, this.portletDelegationLocator); return portletHttpServletRequestWrapper; diff --git a/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/worker/PortletFailureExecutionWorker.java b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/worker/PortletFailureExecutionWorker.java index 8b2770aa4e0..4906d7637dd 100644 --- a/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/worker/PortletFailureExecutionWorker.java +++ b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/worker/PortletFailureExecutionWorker.java @@ -187,7 +187,7 @@ protected synchronized void renderError(long timeout) { } catch (Exception e) { doPostExecution(e); this.logger.error("Exception while dispatching to error handling portlet", e); - this.output = "Error Portlet Unavailable. Please contact your portal adminstrators."; + this.output = "Error Portlet Unavailable. Please contact your portal administrators."; } this.completed = System.currentTimeMillis(); diff --git a/uPortal-webapp/src/main/java/org/apereo/portal/PortalWebAppInitializer.java b/uPortal-webapp/src/main/java/org/apereo/portal/PortalWebAppInitializer.java index 5053c795d90..890fdc8fea1 100644 --- a/uPortal-webapp/src/main/java/org/apereo/portal/PortalWebAppInitializer.java +++ b/uPortal-webapp/src/main/java/org/apereo/portal/PortalWebAppInitializer.java @@ -25,7 +25,7 @@ * * } * - * This new approach allows us to dynamically update the servlet context programatically with + * This new approach allows us to dynamically update the servlet context programmatically with * Spring, which was needed in order support Spring Session handling as a feature that could be * enabled/disabled with configuration. */ diff --git a/uPortal-webapp/src/main/java/org/apereo/portal/context/persondir/PersonDirectoryConfiguration.java b/uPortal-webapp/src/main/java/org/apereo/portal/context/persondir/PersonDirectoryConfiguration.java index 2883ed1b034..b8e98eafcd7 100644 --- a/uPortal-webapp/src/main/java/org/apereo/portal/context/persondir/PersonDirectoryConfiguration.java +++ b/uPortal-webapp/src/main/java/org/apereo/portal/context/persondir/PersonDirectoryConfiguration.java @@ -98,16 +98,16 @@ public ICurrentUserProvider getCurrentUserProvider() { /** Provides the default username attribute to use to the rest of the DAOs. */ @Bean(name = "usernameAttributeProvider") public IUsernameAttributeProvider getUsernameAttributeProvider() { - final SimpleUsernameAttributeProvider rslt = new SimpleUsernameAttributeProvider(); - rslt.setUsernameAttribute(USERNAME_ATTRIBUTE); - return rslt; + final SimpleUsernameAttributeProvider result = new SimpleUsernameAttributeProvider(); + result.setUsernameAttribute(USERNAME_ATTRIBUTE); + return result; } @Bean(name = "userAttributeCacheKeyGenerator") public CacheKeyGenerator getUserAttributeCacheKeyGenerator() { - final PersonDirectoryCacheKeyGenerator rslt = new PersonDirectoryCacheKeyGenerator(); - rslt.setIgnoreEmptyAttributes(true); - return rslt; + final PersonDirectoryCacheKeyGenerator result = new PersonDirectoryCacheKeyGenerator(); + result.setIgnoreEmptyAttributes(true); + return result; } @Bean(name = "sessionScopeAdditionalDescriptors") @@ -130,22 +130,22 @@ public IAdditionalDescriptors getRequestScopeAdditionalDescriptors() { */ @Bean(name = "requestAdditionalDescriptors") public IAdditionalDescriptors getRequestAdditionalDescriptors() { - final MediatingAdditionalDescriptors rslt = new MediatingAdditionalDescriptors(); + final MediatingAdditionalDescriptors result = new MediatingAdditionalDescriptors(); final List delegateDescriptors = new ArrayList<>(); delegateDescriptors.add(getSessionScopeAdditionalDescriptors()); delegateDescriptors.add(getRequestScopeAdditionalDescriptors()); - rslt.setDelegateDescriptors(delegateDescriptors); - return rslt; + result.setDelegateDescriptors(delegateDescriptors); + return result; } /** Servlet filter that creates an attribute for the serverName */ @Bean(name = "requestAttributeSourceFilter") public Filter getRequestAttributeSourceFilter() { - final RequestAttributeSourceFilter rslt = new RequestAttributeSourceFilter(); - rslt.setAdditionalDescriptors(getRequestAdditionalDescriptors()); - rslt.setUsernameAttribute(REMOTE_USER_ATTRIBUTE); // Looks wrong, but correct - rslt.setRemoteUserAttribute(REMOTE_USER_ATTRIBUTE); - rslt.setServerNameAttribute(SERVER_NAME_ATTRIBUTE); + final RequestAttributeSourceFilter result = new RequestAttributeSourceFilter(); + result.setAdditionalDescriptors(getRequestAdditionalDescriptors()); + result.setUsernameAttribute(REMOTE_USER_ATTRIBUTE); // Looks wrong, but correct + result.setRemoteUserAttribute(REMOTE_USER_ATTRIBUTE); + result.setServerNameAttribute(SERVER_NAME_ATTRIBUTE); /* * The processing position should be set to BOTH for uPortal because the session-scoped bean @@ -155,15 +155,15 @@ public Filter getRequestAttributeSourceFilter() { * attributes to the session-scoped bean. See * http://permalink.gmane.org/gmane.comp.java.jasig.uportal/10771 for more information. */ - rslt.setProcessingPosition(RequestAttributeSourceFilter.ProcessingPosition.BOTH); + result.setProcessingPosition(RequestAttributeSourceFilter.ProcessingPosition.BOTH); Set userAgent = new HashSet<>(); userAgent.add(AGENT_DEVICE_ATTRIBUTE); Map> headerAttributeMapping = new HashMap<>(); headerAttributeMapping.put(USER_AGENT_KEY, userAgent); - rslt.setHeaderAttributeMapping(headerAttributeMapping); + result.setHeaderAttributeMapping(headerAttributeMapping); - return rslt; + return result; } /** @@ -183,24 +183,24 @@ public Map getSessionAttributesOverridesMap() { @Bean(name = "personAttributeDao") @Qualifier("personAttributeDao") public IPersonAttributeDao getPersonAttributeDao() { - final PortalRootPersonAttributeDao rslt = new PortalRootPersonAttributeDao(); - rslt.setDelegatePersonAttributeDao(getRequestAttributeMergingDao()); - rslt.setAttributeOverridesMap(getSessionAttributesOverridesMap()); - return rslt; + final PortalRootPersonAttributeDao result = new PortalRootPersonAttributeDao(); + result.setDelegatePersonAttributeDao(getRequestAttributeMergingDao()); + result.setAttributeOverridesMap(getSessionAttributesOverridesMap()); + return result; } /** Merges attributes from the request with those from other DAOs. */ @Bean(name = "requestAttributeMergingDao") @Qualifier("uPortalInternal") public IPersonAttributeDao getRequestAttributeMergingDao() { - final MergingPersonAttributeDaoImpl rslt = new MergingPersonAttributeDaoImpl(); - rslt.setUsernameAttributeProvider(getUsernameAttributeProvider()); - rslt.setMerger(new ReplacingAttributeAdder()); + final MergingPersonAttributeDaoImpl result = new MergingPersonAttributeDaoImpl(); + result.setUsernameAttributeProvider(getUsernameAttributeProvider()); + result.setMerger(new ReplacingAttributeAdder()); final List daos = new ArrayList<>(); daos.add(getRequestAttributesDao()); daos.add(getCachingPersonAttributeDao()); - rslt.setPersonAttributeDaos(daos); - return rslt; + result.setPersonAttributeDaos(daos); + return result; } /** @@ -210,12 +210,12 @@ public IPersonAttributeDao getRequestAttributeMergingDao() { @Bean(name = "requestAttributesDao") @Qualifier("uPortalInternal") public IPersonAttributeDao getRequestAttributesDao() { - final AdditionalDescriptorsPersonAttributeDao rslt = + final AdditionalDescriptorsPersonAttributeDao result = new AdditionalDescriptorsPersonAttributeDao(); - rslt.setDescriptors(getRequestAdditionalDescriptors()); - rslt.setUsernameAttributeProvider(getUsernameAttributeProvider()); - rslt.setCurrentUserProvider(getCurrentUserProvider()); - return rslt; + result.setDescriptors(getRequestAdditionalDescriptors()); + result.setUsernameAttributeProvider(getUsernameAttributeProvider()); + result.setCurrentUserProvider(getCurrentUserProvider()); + return result; } /** @@ -225,20 +225,20 @@ public IPersonAttributeDao getRequestAttributesDao() { @Bean(name = "cachingPersonAttributeDao") @Qualifier("uPortalInternal") public IPersonAttributeDao getCachingPersonAttributeDao() { - final CachingPersonAttributeDaoImpl rslt = new CachingPersonAttributeDaoImpl(); - rslt.setUsernameAttributeProvider(getUsernameAttributeProvider()); - rslt.setCacheNullResults(true); - rslt.setCacheKeyGenerator(getUserAttributeCacheKeyGenerator()); - rslt.setUserInfoCache(new MapCacheProvider<>(userInfoCache)); - rslt.setCachedPersonAttributesDao(getMergingPersonAttributeDao()); - return rslt; + final CachingPersonAttributeDaoImpl result = new CachingPersonAttributeDaoImpl(); + result.setUsernameAttributeProvider(getUsernameAttributeProvider()); + result.setCacheNullResults(true); + result.setCacheKeyGenerator(getUserAttributeCacheKeyGenerator()); + result.setUserInfoCache(new MapCacheProvider<>(userInfoCache)); + result.setCachedPersonAttributesDao(getMergingPersonAttributeDao()); + return result; } @Bean(name = "mergingPersonAttributeDao") @Qualifier("uPortalInternal") public IPersonAttributeDao getMergingPersonAttributeDao() { - final MergingPersonAttributeDaoImpl rslt = new MergingPersonAttributeDaoImpl(); - rslt.setUsernameAttributeProvider(getUsernameAttributeProvider()); + final MergingPersonAttributeDaoImpl result = new MergingPersonAttributeDaoImpl(); + result.setUsernameAttributeProvider(getUsernameAttributeProvider()); /* * This is a "first one wins" strategy. I.e. the first value found for any given result @@ -252,7 +252,7 @@ public IPersonAttributeDao getMergingPersonAttributeDao() { * - ReplacingAttributeAdder - "Last one wins" strategy. I.e. the opposite of * NoncollidingAttributeAdder. */ - rslt.setMerger(new NoncollidingAttributeAdder()); + result.setMerger(new NoncollidingAttributeAdder()); /* * NB: The beans in the innerMergedPersonAttributeDaoList -- together with adopter-defined @@ -260,7 +260,7 @@ public IPersonAttributeDao getMergingPersonAttributeDao() { * AdopterDataSourcesIncorporator. */ - return rslt; + return result; } /** @@ -269,11 +269,11 @@ public IPersonAttributeDao getMergingPersonAttributeDao() { */ @Bean(name = "innerMergedPersonAttributeDaoList") public List getInnerMergedPersonAttributeDaoList() { - final List rslt = new ArrayList<>(); - rslt.add(getImpersonationStatusPersonAttributeDao()); - rslt.add(getUPortalAccountUserSource()); - rslt.add(getUPortalJdbcUserSource()); - return rslt; + final List result = new ArrayList<>(); + result.add(getImpersonationStatusPersonAttributeDao()); + result.add(getUPortalAccountUserSource()); + result.add(getUPortalJdbcUserSource()); + return result; } /** @@ -294,24 +294,24 @@ public IPersonAttributeDao getImpersonationStatusPersonAttributeDao() { @Bean(name = "uPortalAccountUserSource") @Qualifier("uPortalInternal") public IPersonAttributeDao getUPortalAccountUserSource() { - final LocalAccountPersonAttributeDao rslt = new LocalAccountPersonAttributeDao(); - rslt.setLocalAccountDao(localAccountDao); - rslt.setUsernameAttributeProvider(getUsernameAttributeProvider()); + final LocalAccountPersonAttributeDao result = new LocalAccountPersonAttributeDao(); + result.setLocalAccountDao(localAccountDao); + result.setUsernameAttributeProvider(getUsernameAttributeProvider()); final Map queryAttributeMapping = new HashMap<>(); queryAttributeMapping.put(USERNAME_ATTRIBUTE, USERNAME_ATTRIBUTE); queryAttributeMapping.put(GIVEN_NAME_ATTRIBUTE, GIVEN_NAME_ATTRIBUTE); queryAttributeMapping.put(SIR_NAME_ATTRIBUTE, SIR_NAME_ATTRIBUTE); - rslt.setQueryAttributeMapping(queryAttributeMapping); + result.setQueryAttributeMapping(queryAttributeMapping); final Map> resultAttributeMapping = new HashMap<>(); resultAttributeMapping.put( USERNAME_ATTRIBUTE, Stream.of(USERNAME_ATTRIBUTE, UID_ATTRIBUTE, USER_LOGIN_ID_ATTRIBUTE) .collect(Collectors.toSet())); - rslt.setResultAttributeMapping(resultAttributeMapping); + result.setResultAttributeMapping(resultAttributeMapping); - return rslt; + return result; } /** @@ -323,17 +323,17 @@ public IPersonAttributeDao getUPortalAccountUserSource() { @Qualifier("uPortalInternal") public IPersonAttributeDao getUPortalJdbcUserSource() { final String sql = "SELECT USER_NAME FROM UP_USER WHERE {0}"; - final SingleRowJdbcPersonAttributeDao rslt = + final SingleRowJdbcPersonAttributeDao result = new SingleRowJdbcPersonAttributeDao(personDb, sql); - rslt.setUsernameAttributeProvider(getUsernameAttributeProvider()); - rslt.setQueryAttributeMapping( + result.setUsernameAttributeProvider(getUsernameAttributeProvider()); + result.setQueryAttributeMapping( Collections.singletonMap(USERNAME_ATTRIBUTE, USERNAME_COLUMN_NAME)); final Map> resultAttributeMapping = new HashMap<>(); resultAttributeMapping.put( USERNAME_COLUMN_NAME, Stream.of(USERNAME_ATTRIBUTE, UID_ATTRIBUTE, USER_LOGIN_ID_ATTRIBUTE) .collect(Collectors.toSet())); - rslt.setResultAttributeMapping(resultAttributeMapping); - return rslt; + result.setResultAttributeMapping(resultAttributeMapping); + return result; } } diff --git a/uPortal-webapp/src/main/java/org/apereo/portal/context/rendering/RenderingPipelineConfiguration.java b/uPortal-webapp/src/main/java/org/apereo/portal/context/rendering/RenderingPipelineConfiguration.java index 8c7bdd6ee25..4f29b5841f0 100644 --- a/uPortal-webapp/src/main/java/org/apereo/portal/context/rendering/RenderingPipelineConfiguration.java +++ b/uPortal-webapp/src/main/java/org/apereo/portal/context/rendering/RenderingPipelineConfiguration.java @@ -169,10 +169,10 @@ public IPortalRenderingPipeline getPortalRenderingPipeline() { branches.stream() .anyMatch( branchPoint -> { - final boolean rslt = + final boolean result = usedOderValues.contains(branchPoint.getOrder()); usedOderValues.add(branchPoint.getOrder()); - return rslt; + return result; }); if (hasCollision) { throw new RenderingPipelineConfigurationException( @@ -210,9 +210,9 @@ public void renderState(HttpServletRequest req, HttpServletResponse res) @Bean(name = "standardRenderingPipeline") public IPortalRenderingPipeline getStandardRenderingPipeline() { - final DynamicRenderingPipeline rslt = new DynamicRenderingPipeline(); - rslt.setPipeline(getAnalyticsIncorporationComponent()); - return rslt; + final DynamicRenderingPipeline result = new DynamicRenderingPipeline(); + result.setPipeline(getAnalyticsIncorporationComponent()); + return result; } @Bean(name = "userLayoutStoreComponent") @@ -222,13 +222,13 @@ public StAXPipelineComponent getUserLayoutStoreComponent() { @Bean(name = "postUserLayoutStoreLogger") public StAXPipelineComponent getPostUserLayoutStoreLogger() { - final LoggingStAXComponent rslt = new LoggingStAXComponent(); - rslt.setWrappedComponent(getUserLayoutStoreComponent()); - rslt.setLoggerName(POST_USER_LAYOUT_STORE_LOGGER_NAME); - rslt.setLogEvents(false); - rslt.setLogFullDocument(true); - rslt.setStepIdentifier(POST_USER_LAYOUT_STORE_LOGGER_STEP_IDENTIFIER); - return rslt; + final LoggingStAXComponent result = new LoggingStAXComponent(); + result.setWrappedComponent(getUserLayoutStoreComponent()); + result.setLoggerName(POST_USER_LAYOUT_STORE_LOGGER_NAME); + result.setLogEvents(false); + result.setLogFullDocument(true); + result.setStepIdentifier(POST_USER_LAYOUT_STORE_LOGGER_STEP_IDENTIFIER); + return result; } @Bean(name = "themeAttributeSource") @@ -238,10 +238,10 @@ public ThemeAttributeSource getThemeAttributeSource() { @Bean(name = "dashboardWindowStateSettingsStAXComponent") public StAXPipelineComponent getDashboardWindowStateSettingsStAXComponent() { - final WindowStateSettingsStAXComponent rslt = new WindowStateSettingsStAXComponent(); - rslt.setWrappedComponent(getPostUserLayoutStoreLogger()); - rslt.setStylesheetAttributeSource(getThemeAttributeSource()); - return rslt; + final WindowStateSettingsStAXComponent result = new WindowStateSettingsStAXComponent(); + result.setWrappedComponent(getPostUserLayoutStoreLogger()); + result.setStylesheetAttributeSource(getThemeAttributeSource()); + return result; } @Bean(name = "attributeSource") @@ -251,10 +251,11 @@ public PortletWindowAttributeSource getPortletWindowAttributeSource() { @Bean(name = "portletWindowAttributeIncorporationComponent") public StAXPipelineComponent getPortletWindowAttributeIncorporationComponent() { - final StAXAttributeIncorporationComponent rslt = new StAXAttributeIncorporationComponent(); - rslt.setWrappedComponent(getDashboardWindowStateSettingsStAXComponent()); - rslt.setAttributeSource(getPortletWindowAttributeSource()); - return rslt; + final StAXAttributeIncorporationComponent result = + new StAXAttributeIncorporationComponent(); + result.setWrappedComponent(getDashboardWindowStateSettingsStAXComponent()); + result.setAttributeSource(getPortletWindowAttributeSource()); + return result; } @Bean(name = "structureAttributeSource") @@ -264,21 +265,22 @@ public StructureAttributeSource getStructureAttributeSource() { @Bean(name = "structureAttributeIncorporationComponent") public StAXPipelineComponent getStructureAttributeIncorporationComponent() { - final StAXAttributeIncorporationComponent rslt = new StAXAttributeIncorporationComponent(); - rslt.setWrappedComponent(getPortletWindowAttributeIncorporationComponent()); - rslt.setAttributeSource(getStructureAttributeSource()); - return rslt; + final StAXAttributeIncorporationComponent result = + new StAXAttributeIncorporationComponent(); + result.setWrappedComponent(getPortletWindowAttributeIncorporationComponent()); + result.setAttributeSource(getStructureAttributeSource()); + return result; } @Bean(name = "preStructureTransformLogger") public StAXPipelineComponent getPreStructureTransformLogger() { - final LoggingStAXComponent rslt = new LoggingStAXComponent(); - rslt.setWrappedComponent(getStructureAttributeIncorporationComponent()); - rslt.setLoggerName(PRE_STRUCTURE_TRANSFORM_LOGGER_NAME); - rslt.setLogEvents(false); - rslt.setLogFullDocument(true); - rslt.setStepIdentifier(PRE_STRUCTURE_TRANSFORM_LOGGER_STEP_IDENTIFIER); - return rslt; + final LoggingStAXComponent result = new LoggingStAXComponent(); + result.setWrappedComponent(getStructureAttributeIncorporationComponent()); + result.setLoggerName(PRE_STRUCTURE_TRANSFORM_LOGGER_NAME); + result.setLogEvents(false); + result.setLogFullDocument(true); + result.setStepIdentifier(PRE_STRUCTURE_TRANSFORM_LOGGER_STEP_IDENTIFIER); + return result; } @Bean(name = "structureTransformSource") @@ -300,10 +302,10 @@ public TransformerSource getStructureTransformSource() { @Bean public TransformerConfigurationSource getStaticTransformerConfigurationSourceForStructure() { - final StaticTransformerConfigurationSource rslt = + final StaticTransformerConfigurationSource result = new StaticTransformerConfigurationSource(); - rslt.setParameters(Collections.singletonMap("version-UP_FRAMEWORK", uPortalVersion)); - return rslt; + result.setParameters(Collections.singletonMap("version-UP_FRAMEWORK", uPortalVersion)); + return result; } @Bean @@ -323,9 +325,9 @@ public ResourcesDao getResourcesDao() { /** This bean is not an element of the rendering pipeline. */ @Bean(name = "resourcesElementsProvider") public ResourcesElementsProvider getResourcesElementsProvider() { - ResourcesElementsProviderImpl rslt = new ResourcesElementsProviderImpl(); - rslt.setResourcesDao(getResourcesDao()); - return rslt; + ResourcesElementsProviderImpl result = new ResourcesElementsProviderImpl(); + result.setResourcesDao(getResourcesDao()); + return result; } /** A default empty bean that could be overriden by a custom one. */ @@ -339,9 +341,9 @@ public List getCustomSkinTr @Bean(name = "structureTransformComponent") public StAXPipelineComponentWrapper getStructureTransformComponent() { - final XSLTComponent rslt = new XSLTComponent(); - rslt.setWrappedComponent(getPreStructureTransformLogger()); - rslt.setTransformerSource(getStructureTransformSource()); + final XSLTComponent result = new XSLTComponent(); + result.setWrappedComponent(getPreStructureTransformLogger()); + result.setTransformerSource(getStructureTransformSource()); final List sources = new ArrayList<>(); sources.add(getStructureStylesheetDescriptorTransformerConfigurationSource()); if (customSkinsTransformers != null && !customSkinsTransformers.isEmpty()) { @@ -353,54 +355,55 @@ public StAXPipelineComponentWrapper getStructureTransformComponent() { final MergingTransformerConfigurationSource mtcs = new MergingTransformerConfigurationSource(); mtcs.setSources(sources); - rslt.setXsltParameterSource(mtcs); - return rslt; + result.setXsltParameterSource(mtcs); + return result; } @Bean(name = "postStructureTransformLogger") public StAXPipelineComponent getPostStructureTransformLogger() { - final LoggingStAXComponent rslt = new LoggingStAXComponent(); - rslt.setWrappedComponent(getStructureTransformComponent()); - rslt.setLoggerName(POST_STRUCTURE_TRANSFORM_LOGGER_NAME); - rslt.setLogEvents(false); - rslt.setLogFullDocument(true); - rslt.setStepIdentifier(POST_STRUCTURE_TRANSFORM_LOGGER_STEP_IDENTIFIER); - return rslt; + final LoggingStAXComponent result = new LoggingStAXComponent(); + result.setWrappedComponent(getStructureTransformComponent()); + result.setLoggerName(POST_STRUCTURE_TRANSFORM_LOGGER_NAME); + result.setLogEvents(false); + result.setLogFullDocument(true); + result.setStepIdentifier(POST_STRUCTURE_TRANSFORM_LOGGER_STEP_IDENTIFIER); + return result; } @Bean(name = "structureCachingComponent") public StAXPipelineComponent getStructureCachingComponent() { - final CachingStAXPipelineComponent rslt = new CachingStAXPipelineComponent(); - rslt.setWrappedComponent(getPostStructureTransformLogger()); - rslt.setCache(structureTransformCache); - return rslt; + final CachingStAXPipelineComponent result = new CachingStAXPipelineComponent(); + result.setWrappedComponent(getPostStructureTransformLogger()); + result.setCache(structureTransformCache); + return result; } @Bean(name = "portletRenderingInitiationComponent") public StAXPipelineComponentWrapper getPortletRenderingInitiationComponent() { - final PortletRenderingInitiationStAXComponent rslt = + final PortletRenderingInitiationStAXComponent result = new PortletRenderingInitiationStAXComponent(); - rslt.setWrappedComponent(getStructureCachingComponent()); - return rslt; + result.setWrappedComponent(getStructureCachingComponent()); + return result; } @Bean(name = "themeAttributeIncorporationComponent") public StAXPipelineComponent getThemeAttributeIncorporationComponent() { - final StAXAttributeIncorporationComponent rslt = new StAXAttributeIncorporationComponent(); - rslt.setWrappedComponent(getPortletRenderingInitiationComponent()); - rslt.setAttributeSource(getThemeAttributeSource()); - return rslt; + final StAXAttributeIncorporationComponent result = + new StAXAttributeIncorporationComponent(); + result.setWrappedComponent(getPortletRenderingInitiationComponent()); + result.setAttributeSource(getThemeAttributeSource()); + return result; } @Bean(name = "preThemeTransformLogger") public StAXPipelineComponent getPreThemeTransformLogger() { - final LoggingStAXComponent rslt = new LoggingStAXComponent(); - rslt.setWrappedComponent(getThemeAttributeIncorporationComponent()); - rslt.setLoggerName(PRE_THEME_TRANSFORM_LOGGER_NAME); - rslt.setLogEvents(false); - rslt.setLogFullDocument(true); - rslt.setStepIdentifier(PRE_THEME_TRANSFORM_LOGGER_STEP_IDENTIFIER); - return rslt; + final LoggingStAXComponent result = new LoggingStAXComponent(); + result.setWrappedComponent(getThemeAttributeIncorporationComponent()); + result.setLoggerName(PRE_THEME_TRANSFORM_LOGGER_NAME); + result.setLogEvents(false); + result.setLogFullDocument(true); + result.setStepIdentifier(PRE_THEME_TRANSFORM_LOGGER_STEP_IDENTIFIER); + return result; } @Bean(name = "themeTransformSource") @@ -458,12 +461,12 @@ public TransformerConfigurationSource getStaticTransformerConfigurationSourceFor cacheKeyExcludedParameters.add( org.apereo.portal.url.xml.XsltPortalUrlProvider.XSLT_PORTAL_URL_PROVIDER); - final StaticTransformerConfigurationSource rslt = + final StaticTransformerConfigurationSource result = new StaticTransformerConfigurationSource(); - rslt.setParameters(parameters); - rslt.setParameterExpressions(parameterExpressions); - rslt.setCacheKeyExcludedParameters(cacheKeyExcludedParameters); - return rslt; + result.setParameters(parameters); + result.setParameterExpressions(parameterExpressions); + result.setCacheKeyExcludedParameters(cacheKeyExcludedParameters); + return result; } @Bean @@ -478,9 +481,9 @@ public TransformerConfigurationSource getResourcesElementsXsltcHelper() { @Bean(name = "themeTransformComponent") public StAXPipelineComponentWrapper getThemeTransformComponent() { - final XSLTComponent rslt = new XSLTComponent(); - rslt.setWrappedComponent(getPreThemeTransformLogger()); - rslt.setTransformerSource(getThemeTransformerSource()); + final XSLTComponent result = new XSLTComponent(); + result.setWrappedComponent(getPreThemeTransformLogger()); + result.setTransformerSource(getThemeTransformerSource()); final List sources = new ArrayList<>(); sources.add(getThemeStylesheetDescriptorTransformerConfigurationSource()); if (customSkinsTransformers != null && !customSkinsTransformers.isEmpty()) { @@ -493,20 +496,20 @@ public StAXPipelineComponentWrapper getThemeTransformComponent() { final MergingTransformerConfigurationSource mtcs = new MergingTransformerConfigurationSource(); mtcs.setSources(sources); - rslt.setXsltParameterSource(mtcs); - return rslt; + result.setXsltParameterSource(mtcs); + return result; } @Bean(name = "postThemeTransformLogger") public StAXPipelineComponent getPostThemeTransformLogger() { - final LoggingStAXComponent rslt = new LoggingStAXComponent(); - rslt.setWrappedComponent(getThemeTransformComponent()); - rslt.setLoggerName(POST_THEME_TRANSFORM_LOGGER_NAME); - rslt.setLogEvents(false); - rslt.setLogFullDocument(true); - rslt.setLogFullDocumentAsHtml(true); - rslt.setStepIdentifier(POST_THEME_TRANSFORM_LOGGER_STEP_IDENTIFIER); - return rslt; + final LoggingStAXComponent result = new LoggingStAXComponent(); + result.setWrappedComponent(getThemeTransformComponent()); + result.setLoggerName(POST_THEME_TRANSFORM_LOGGER_NAME); + result.setLogEvents(false); + result.setLogFullDocument(true); + result.setLogFullDocumentAsHtml(true); + result.setStepIdentifier(POST_THEME_TRANSFORM_LOGGER_STEP_IDENTIFIER); + return result; } @Bean @@ -556,8 +559,8 @@ public CharacterEventSource getPortletLinkPlaceholderEventSource() { @Bean(name = "staxSerializingComponent") public CharacterPipelineComponent getStAXSerializingComponent() { - final StAXSerializingComponent rslt = new StAXSerializingComponent(); - rslt.setWrappedComponent(getPostThemeTransformLogger()); + final StAXSerializingComponent result = new StAXSerializingComponent(); + result.setWrappedComponent(getPostThemeTransformLogger()); final Map chunkingElements = new HashMap<>(); chunkingElements.put(IUserLayoutManager.CHANNEL, getPortletContentPlaceholderEventSource()); @@ -572,7 +575,7 @@ public CharacterPipelineComponent getStAXSerializingComponent() { chunkingElements.put( PageAnalyticsDataPlaceholderEventSource.PAGE_ANALYTICS_SCRIPT, getPageAnalyticsDataPlaceholderEventSource()); - rslt.setChunkingElements(chunkingElements); + result.setChunkingElements(chunkingElements); final Map chunkingPatterns = new HashMap<>(); chunkingPatterns.put(PORTLET_TITLE_PATTERN, getPortletTitlePlaceholderEventSource()); @@ -580,47 +583,48 @@ public CharacterPipelineComponent getStAXSerializingComponent() { chunkingPatterns.put( PORTLET_NEW_ITEM_COUNT_PATTERN, getPortletNewItemCountPlaceholderEventSource()); chunkingPatterns.put(PORTLET_LINK_PATTERN, getPortletLinkPlaceholderEventSource()); - rslt.setChunkingPatterns(chunkingPatterns); + result.setChunkingPatterns(chunkingPatterns); - return rslt; + return result; } @Bean(name = "postSerializerLogger") public CharacterPipelineComponent getPostSerializerLogger() { - final LoggingCharacterComponent rslt = new LoggingCharacterComponent(); - rslt.setWrappedComponent(getStAXSerializingComponent()); - rslt.setLoggerName("org.apereo.portal.rendering.LoggingCharacterComponent.POST_SERIALIZER"); - return rslt; + final LoggingCharacterComponent result = new LoggingCharacterComponent(); + result.setWrappedComponent(getStAXSerializingComponent()); + result.setLoggerName( + "org.apereo.portal.rendering.LoggingCharacterComponent.POST_SERIALIZER"); + return result; } @Bean(name = "themeCachingComponent") public CharacterPipelineComponent getThemeCachingComponent() { - final CachingCharacterPipelineComponent rslt = new CachingCharacterPipelineComponent(); - rslt.setWrappedComponent(getPostSerializerLogger()); - rslt.setCache(themeTransformCache); - return rslt; + final CachingCharacterPipelineComponent result = new CachingCharacterPipelineComponent(); + result.setWrappedComponent(getPostSerializerLogger()); + result.setCache(themeTransformCache); + return result; } @Bean(name = "portletRenderingInitiationCharacterComponent") public CharacterPipelineComponent getPortletRenderingInitiationCharacterComponent() { - final PortletRenderingInitiationCharacterComponent rslt = + final PortletRenderingInitiationCharacterComponent result = new PortletRenderingInitiationCharacterComponent(); - rslt.setWrappedComponent(getThemeCachingComponent()); - return rslt; + result.setWrappedComponent(getThemeCachingComponent()); + return result; } @Bean(name = "portletRenderingIncorporationComponent") public CharacterPipelineComponent getPortletRenderingIncorporationComponent() { - final PortletRenderingIncorporationComponent rslt = + final PortletRenderingIncorporationComponent result = new PortletRenderingIncorporationComponent(); - rslt.setWrappedComponent(getPortletRenderingInitiationCharacterComponent()); - return rslt; + result.setWrappedComponent(getPortletRenderingInitiationCharacterComponent()); + return result; } @Bean(name = "analyticsIncorporationComponent") public CharacterPipelineComponent getAnalyticsIncorporationComponent() { - final AnalyticsIncorporationComponent rslt = new AnalyticsIncorporationComponent(); - rslt.setWrappedComponent(getPortletRenderingIncorporationComponent()); - return rslt; + final AnalyticsIncorporationComponent result = new AnalyticsIncorporationComponent(); + result.setWrappedComponent(getPortletRenderingIncorporationComponent()); + return result; } } diff --git a/uPortal-webapp/src/main/resources/layout/theme/respondr/respondr.xsl b/uPortal-webapp/src/main/resources/layout/theme/respondr/respondr.xsl index 4621e8b7533..a64615a6264 100644 --- a/uPortal-webapp/src/main/resources/layout/theme/respondr/respondr.xsl +++ b/uPortal-webapp/src/main/resources/layout/theme/respondr/respondr.xsl @@ -502,24 +502,24 @@ innerColumnClassesFunction: function(column) { if (column > 100) { // Flex columns -- logic mirrors how they're drawn server-side - var rslt = 'up-grid up-matching-height up-constant-columns '; + var result = 'up-grid up-matching-height up-constant-columns '; switch(column) { case 106: - rslt += 'up-col-xs-2 up-col-sm-3 up-col-md-4 up-col-lg-6'; + result += 'up-col-xs-2 up-col-sm-3 up-col-md-4 up-col-lg-6'; break; case 104: - rslt += 'up-col-xs-1 up-col-sm-2 up-col-md-3 up-col-lg-4'; + result += 'up-col-xs-1 up-col-sm-2 up-col-md-3 up-col-lg-4'; break; case 103: - rslt += 'up-col-xs-1 up-col-sm-1 up-col-md-2 up-col-lg-3'; + result += 'up-col-xs-1 up-col-sm-1 up-col-md-2 up-col-lg-3'; break; default: // The only other officially supported value is 102, but // any other value over 100 will be treated as 102. - rslt += 'up-col-xs-1 up-col-sm-1 up-col-md-2 up-col-lg-2'; + result += 'up-col-xs-1 up-col-sm-1 up-col-md-2 up-col-lg-2'; break; } - return rslt; + return result; } else { // uPortal classic columns -- no innerColumnClasses used return false; diff --git a/uPortal-webapp/src/main/resources/org/apereo/portal/groups/smartldap/init.crn b/uPortal-webapp/src/main/resources/org/apereo/portal/groups/smartldap/init.crn index 62ab8439688..be0656a48a8 100644 --- a/uPortal-webapp/src/main/resources/org/apereo/portal/groups/smartldap/init.crn +++ b/uPortal-webapp/src/main/resources/org/apereo/portal/groups/smartldap/init.crn @@ -66,7 +66,7 @@ // Finally attempt to add this one to the collection of records. The // 'isNew' flag indicates whether we have seen this group before; - // if we have, there's no need to follow its tree of decendents. + // if we have, there's no need to follow its tree of descendants. boolean isNew = !GROUPS.contains(record); ScriptAttributes.RESPONSE.setAttribute('isNew', isNew); logger.debug("isNew: {}", isNew); diff --git a/uPortal-webapp/src/main/webapp/WEB-INF/jsp/PortletError/cookies.jsp b/uPortal-webapp/src/main/webapp/WEB-INF/jsp/PortletError/cookies.jsp index ec2a18b3fc4..7533f4cab2d 100644 --- a/uPortal-webapp/src/main/webapp/WEB-INF/jsp/PortletError/cookies.jsp +++ b/uPortal-webapp/src/main/webapp/WEB-INF/jsp/PortletError/cookies.jsp @@ -22,7 +22,7 @@ <% org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog("org.apereo.portal.jsp.Error"); %> -Portal: An error has occured +Portal: An error has occurred diff --git a/uPortal-webapp/src/main/webapp/error.jsp b/uPortal-webapp/src/main/webapp/error.jsp index ae158255166..a5f786e1c67 100644 --- a/uPortal-webapp/src/main/webapp/error.jsp +++ b/uPortal-webapp/src/main/webapp/error.jsp @@ -22,7 +22,7 @@ <% org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog("org.apereo.portal.jsp.Error"); %> -Portal: An error has occured +Portal: An error has occurred diff --git a/uPortal-webapp/src/test/groovy/org/apereo/portal/security/provider/AnyUnblockedGrantPermissionPolicyTest.groovy b/uPortal-webapp/src/test/groovy/org/apereo/portal/security/provider/AnyUnblockedGrantPermissionPolicyTest.groovy index 445510ebf6b..142a61a2aae 100644 --- a/uPortal-webapp/src/test/groovy/org/apereo/portal/security/provider/AnyUnblockedGrantPermissionPolicyTest.groovy +++ b/uPortal-webapp/src/test/groovy/org/apereo/portal/security/provider/AnyUnblockedGrantPermissionPolicyTest.groovy @@ -31,34 +31,34 @@ class AnyUnblockedGrantPermissionPolicyTest extends AnyUnblockedGrantPermissionP private static final long TWENTY_FOUR_HOURS_IN_MILLIS = 24L * 60L * 60L * 1000L; private IPermission activeGrantPermission = { - IPermission rslt = new PermissionImpl('UP_SYSTEM'); - rslt.setPrincipal('local.0'); - rslt.setActivity('CUSTOMIZE'); - rslt.setType('GRANT'); - return rslt; + IPermission result = new PermissionImpl('UP_SYSTEM'); + result.setPrincipal('local.0'); + result.setActivity('CUSTOMIZE'); + result.setType('GRANT'); + return result; }(); private IPermission activeDenyPermission = { - IPermission rslt = new PermissionImpl('UP_SYSTEM'); - rslt.setPrincipal('local.0'); - rslt.setActivity('CUSTOMIZE'); - rslt.setType('DENY'); - return rslt; + IPermission result = new PermissionImpl('UP_SYSTEM'); + result.setPrincipal('local.0'); + result.setActivity('CUSTOMIZE'); + result.setType('DENY'); + return result; }(); private IPermission expiredGrantPermission = { - IPermission rslt = new PermissionImpl('UP_SYSTEM'); - rslt.setPrincipal('local.0'); - rslt.setActivity('CUSTOMIZE'); - rslt.setType('GRANT'); - rslt.setExpires(new Date(System.currentTimeMillis() - TWENTY_FOUR_HOURS_IN_MILLIS)); - return rslt; + IPermission result = new PermissionImpl('UP_SYSTEM'); + result.setPrincipal('local.0'); + result.setActivity('CUSTOMIZE'); + result.setType('GRANT'); + result.setExpires(new Date(System.currentTimeMillis() - TWENTY_FOUR_HOURS_IN_MILLIS)); + return result; }(); private IPermission futureGrantPermission = { - IPermission rslt = new PermissionImpl('UP_SYSTEM'); - rslt.setPrincipal('local.0'); - rslt.setActivity('CUSTOMIZE'); - rslt.setType('GRANT'); - rslt.setEffective(new Date(System.currentTimeMillis() + TWENTY_FOUR_HOURS_IN_MILLIS)); - return rslt; + IPermission result = new PermissionImpl('UP_SYSTEM'); + result.setPrincipal('local.0'); + result.setActivity('CUSTOMIZE'); + result.setType('GRANT'); + result.setEffective(new Date(System.currentTimeMillis() + TWENTY_FOUR_HOURS_IN_MILLIS)); + return result; }(); @Test diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/concurrency/locking/ClusterLockServiceImplTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/concurrency/locking/ClusterLockServiceImplTest.java index d707ac606a4..7263f3e85d3 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/concurrency/locking/ClusterLockServiceImplTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/concurrency/locking/ClusterLockServiceImplTest.java @@ -64,7 +64,7 @@ public void teardown() { this.lockMonitorExecutorService.shutdownNow(); } - @Ignore // Breaks on move to Gradlde + @Ignore // Breaks on move to Gradle @Test public void testWithinLastRunDelay() throws InterruptedException { final String mutexName = "TEST"; @@ -143,7 +143,7 @@ public Boolean apply(ClusterMutex input) { assertTrue(result.isExecuted()); } - @Ignore // Breaks on move to Gradlde + @Ignore // Breaks on move to Gradle @Test public void testWithinServerBiasDelayDifferentServer() throws InterruptedException { final String mutexName = "TEST"; @@ -300,7 +300,7 @@ public Boolean apply(ClusterMutex input) { assertTrue(result.isExecuted()); } - @Ignore // Breaks on move to Gradlde + @Ignore // Breaks on move to Gradle @Test public void testLockThreadPoolDead() throws InterruptedException { final String mutexName = "TEST"; diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/events/JpaPortalEventStoreTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/events/JpaPortalEventStoreTest.java index b7f56da4ad1..815f9c42025 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/events/JpaPortalEventStoreTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/events/JpaPortalEventStoreTest.java @@ -53,7 +53,7 @@ public class JpaPortalEventStoreTest extends BaseRawEventsJpaDaoTest { @Autowired private IPortalEventDao portalEventDao; - @Ignore // Breaks on move to Gradlde + @Ignore // Breaks on move to Gradle @Test public void testStoreSingleEvents() throws Exception { final DateTime startDate = DateTime.now().minusDays(1); @@ -79,7 +79,7 @@ protected void callWithoutResult() { verifyAggregateEvents(Collections.emptyList(), startDate, endDate); } - @Ignore // Breaks on move to Gradlde + @Ignore // Breaks on move to Gradle @Test public void testStoreBatchEvents() throws Exception { final DateTime startDate = DateTime.now().minusDays(1); diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImplTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImplTest.java index 7a3f51c55c2..5e48640cca6 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImplTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/events/aggr/PortalEventDimensionPopulatorImplTest.java @@ -43,7 +43,7 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle @RunWith(MockitoJUnitRunner.class) public class PortalEventDimensionPopulatorImplTest { @InjectMocks diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/io/ImportTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/io/ImportTest.java index 6ce7d35cf48..1f5407eeef8 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/io/ImportTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/io/ImportTest.java @@ -27,7 +27,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.io.Resource; -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle public class ImportTest extends TestCase { // Instance Members. diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/CachingPortletOutputHandlerTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/CachingPortletOutputHandlerTest.java index 7bb4d2ff92f..2c4bc2401a4 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/CachingPortletOutputHandlerTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/CachingPortletOutputHandlerTest.java @@ -33,7 +33,7 @@ import org.mockito.junit.MockitoJUnitRunner; /** Test CachingPortletOutputHandler */ -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle @RunWith(MockitoJUnitRunner.class) public class CachingPortletOutputHandlerTest { @Mock private PortletOutputHandler portletOutputHandler; diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/CachingPortletResourceOutputHandlerTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/CachingPortletResourceOutputHandlerTest.java index bc87569f16b..3ec9430e949 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/CachingPortletResourceOutputHandlerTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/CachingPortletResourceOutputHandlerTest.java @@ -25,7 +25,7 @@ import org.mockito.junit.MockitoJUnitRunner; /** Test CachingPortletResourceOutputHandler */ -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle @RunWith(MockitoJUnitRunner.class) public class CachingPortletResourceOutputHandlerTest { @Mock private PortletResourceOutputHandler portletResourceOutputHandler; diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/HeaderSettingCacheControlTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/HeaderSettingCacheControlTest.java index 76d45e47f2d..0b511e3dcbd 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/HeaderSettingCacheControlTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/HeaderSettingCacheControlTest.java @@ -30,7 +30,7 @@ import org.mockito.junit.MockitoJUnitRunner; /** */ -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle @RunWith(MockitoJUnitRunner.class) public class HeaderSettingCacheControlTest { private HeaderSettingCacheControl headerSettingCacheControl; diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/PortletCacheControlServiceImplTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/PortletCacheControlServiceImplTest.java index 9620288102c..0c720c344f8 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/PortletCacheControlServiceImplTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/container/cache/PortletCacheControlServiceImplTest.java @@ -51,7 +51,7 @@ import org.springframework.mock.web.MockHttpSession; /** */ -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle @RunWith(MockitoJUnitRunner.class) public class PortletCacheControlServiceImplTest { @InjectMocks diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/rendering/PortletEventCoordinatationServiceTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/rendering/PortletEventCoordinatationServiceTest.java index 78ce8cbf55c..5f986c0f6b2 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/rendering/PortletEventCoordinatationServiceTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/rendering/PortletEventCoordinatationServiceTest.java @@ -39,7 +39,7 @@ import org.mockito.junit.MockitoJUnitRunner; /** */ -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle @RunWith(MockitoJUnitRunner.class) public class PortletEventCoordinatationServiceTest { @InjectMocks diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/rendering/PortletRendererImplTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/rendering/PortletRendererImplTest.java index cdc462669ba..6a17d2ec106 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/portlet/rendering/PortletRendererImplTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/portlet/rendering/PortletRendererImplTest.java @@ -61,7 +61,7 @@ import org.springframework.mock.web.MockHttpServletResponse; /** Tests for {@link PortletRendererImpl}. */ -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle @RunWith(MockitoJUnitRunner.class) public class PortletRendererImplTest { @InjectMocks private PortletRendererImpl portletRenderer = new PortletRendererImpl(); diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/security/provider/AuthorizationTester.java b/uPortal-webapp/src/test/java/org/apereo/portal/security/provider/AuthorizationTester.java index df093f71119..328d86de501 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/security/provider/AuthorizationTester.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/security/provider/AuthorizationTester.java @@ -36,7 +36,7 @@ import org.junit.Ignore; /** Tests the authorization framework. */ -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle public class AuthorizationTester extends TestCase { private String OWNER = "UP_FRAMEWORK"; private String TEST_TARGET = "Test_Target."; diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/spring/LazyPortalApplicationContextTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/spring/LazyPortalApplicationContextTest.java index 7eb99b153de..4fd8a394f8e 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/spring/LazyPortalApplicationContextTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/spring/LazyPortalApplicationContextTest.java @@ -18,7 +18,7 @@ import org.junit.Ignore; import org.junit.Test; -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle public class LazyPortalApplicationContextTest { @Test(expected = IllegalStateException.class) diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/test/PortalJpaInterceptor.java b/uPortal-webapp/src/test/java/org/apereo/portal/test/PortalJpaInterceptor.java index f672dc4e091..494cbe6a76b 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/test/PortalJpaInterceptor.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/test/PortalJpaInterceptor.java @@ -104,7 +104,7 @@ public Object invoke(MethodInvocation methodInvocation) throws Throwable { * *

    Default implementation delegates to the JpaDialect. May be overridden in subclasses. * - * @param ex runtime exception that occured, which may or may not be JPA-related + * @param ex runtime exception that occurred, which may or may not be JPA-related * @return the corresponding DataAccessException instance if wrapping should occur, otherwise * the raw exception * @see org.springframework.dao.support.DataAccessUtils#translateIfNecessary diff --git a/uPortal-webapp/src/test/java/org/apereo/portal/url/UrlSyntaxProviderImplTest.java b/uPortal-webapp/src/test/java/org/apereo/portal/url/UrlSyntaxProviderImplTest.java index 6601b11c4ff..483af326972 100644 --- a/uPortal-webapp/src/test/java/org/apereo/portal/url/UrlSyntaxProviderImplTest.java +++ b/uPortal-webapp/src/test/java/org/apereo/portal/url/UrlSyntaxProviderImplTest.java @@ -55,7 +55,7 @@ import org.springframework.mock.web.MockHttpServletRequest; /** Test harness for {@link UrlSyntaxProviderImpl}. */ -@Ignore // Breaks on move to Gradlde +@Ignore // Breaks on move to Gradle @RunWith(MockitoJUnitRunner.class) public class UrlSyntaxProviderImplTest { @InjectMocks private UrlSyntaxProviderImpl urlSyntaxProvider = new UrlSyntaxProviderImpl();