Author: jleroux
Date: Sat Apr 17 22:25:40 2010 New Revision: 935269 URL: http://svn.apache.org/viewvc?rev=935269&view=rev Log: A patch from Bob Morley "Resolve java warnings exposed in Eclipse (Party part of OFBIZ-3100)" https://issues.apache.org/jira/browse/OFBIZ-3589 - OFBIZ-3589 Party was very clean; only a few minor changes - also added a @SupressWarnings("serial") in framework's MimeMessageWrapper (noticed when fixing iteration from this in Party). Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=935269&r1=935268&r2=935269&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Sat Apr 17 22:25:40 2010 @@ -641,7 +641,6 @@ public class CommunicationEventServices * @param context * @return */ - @SuppressWarnings("unchecked") public static Map<String, Object> storeIncomingEmail(DispatchContext dctx, Map<String, ? extends Object> context) { Delegator delegator = dctx.getDelegator(); @@ -850,7 +849,7 @@ public class CommunicationEventServices // Populate the CommunicationEvent.headerString field with the email headers StringBuilder headerString = new StringBuilder(); - Enumeration headerLines = wrapper.getMessage().getAllHeaderLines(); + Enumeration<?> headerLines = wrapper.getMessage().getAllHeaderLines(); while (headerLines.hasMoreElements()) { headerString.append(System.getProperty("line.separator")); headerString.append(headerLines.nextElement()); Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java?rev=935269&r1=935268&r2=935269&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java Sat Apr 17 22:25:40 2010 @@ -25,7 +25,6 @@ import java.util.Locale; import java.util.Map; import javax.servlet.ServletRequest; -import javax.servlet.jsp.PageContext; import javolution.util.FastList; import javolution.util.FastMap; @@ -40,6 +39,7 @@ import org.ofbiz.entity.GenericEntityExc import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityConditionList; +import org.ofbiz.entity.condition.EntityExpr; import org.ofbiz.entity.condition.EntityFunction; import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.model.ModelEntity; @@ -313,7 +313,6 @@ public class PartyWorker { if (UtilValidate.isNotEmpty(validFound)) { for (GenericValue partyAndAddr: validFound) { String partyId = partyAndAddr.getString("partyId"); - String cmId = partyAndAddr.getString("contactMechId"); if (UtilValidate.isNotEmpty(partyId)) { GenericValue p = delegator.findByPrimaryKey("Person", UtilMisc.toMap("partyId", partyId)); if (p != null) { @@ -325,11 +324,9 @@ public class PartyWorker { if (mName != null && middleName != null) { if (mName.toUpperCase().equals(middleName.toUpperCase())) { returnList.add(partyAndAddr); - //return new String[] { partyId, cmId }; } } else if (middleName == null) { returnList.add(partyAndAddr); - //return new String[] { partyId, cmId }; } } } @@ -372,7 +369,7 @@ public class PartyWorker { List<GenericValue> partyList = FastList.newInstance(); List<String> partyIds = null; try { - EntityConditionList baseExprs = EntityCondition.makeCondition(UtilMisc.toList( + EntityConditionList<EntityExpr> baseExprs = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("partyIdFrom", partyIdFrom), EntityCondition.makeCondition("partyRelationshipTypeId", partyRelationshipTypeId)), EntityOperator.AND); List<GenericValue> associatedParties = delegator.findList("PartyRelationship", baseExprs, null, null, null, true); @@ -380,7 +377,7 @@ public class PartyWorker { while (UtilValidate.isNotEmpty(associatedParties)) { List<GenericValue> currentAssociatedParties = FastList.newInstance(); for (GenericValue associatedParty : associatedParties) { - EntityConditionList innerExprs = EntityCondition.makeCondition(UtilMisc.toList( + EntityConditionList<EntityExpr> innerExprs = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("partyIdFrom", associatedParty.get("partyIdTo")), EntityCondition.makeCondition("partyRelationshipTypeId", partyRelationshipTypeId)), EntityOperator.AND); List<GenericValue> associatedPartiesChilds = delegator.findList("PartyRelationship", innerExprs, null, null, null, true); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java?rev=935269&r1=935268&r2=935269&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java Sat Apr 17 22:25:40 2010 @@ -42,6 +42,7 @@ import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralRuntimeException; import org.ofbiz.base.util.UtilDateTime; +@SuppressWarnings("serial") public class MimeMessageWrapper implements java.io.Serializable { public static final String module = MimeMessageWrapper.class.getName(); |
Free forum by Nabble | Edit this page |