specialpurpose - oagis
---------------------- Key: OFBIZ-3599 URL: https://issues.apache.org/jira/browse/OFBIZ-3599 Project: OFBiz Issue Type: Sub-task Reporter: Bob Morley -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bob Morley resolved OFBIZ-3599. ------------------------------- Resolution: Fixed Fix Version/s: SVN trunk > specialpurpose - oagis > ---------------------- > > Key: OFBIZ-3599 > URL: https://issues.apache.org/jira/browse/OFBIZ-3599 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bob Morley > Fix For: SVN trunk > > Attachments: OFBIZ-3599_ResolveJavaWarningsOagis.patch > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bob Morley updated OFBIZ-3599: ------------------------------ Attachment: OFBIZ-3599_ResolveJavaWarningsOagis.patch There were a particularly large number of warnings across the three service implementation classes in this component. Almost all of them came down to non-generic context, results from a dispatch call, or storage of error messages. There was one example where the same result (a List<String>) was being used to store a Map and a String so this was resolved. Lots of examples of changing from explicitly using an Iterator to the standard for (Object x : x-list) { ... } construct. > specialpurpose - oagis > ---------------------- > > Key: OFBIZ-3599 > URL: https://issues.apache.org/jira/browse/OFBIZ-3599 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bob Morley > Fix For: SVN trunk > > Attachments: OFBIZ-3599_ResolveJavaWarningsOagis.patch > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bob Morley reopened OFBIZ-3599: ------------------------------- > specialpurpose - oagis > ---------------------- > > Key: OFBIZ-3599 > URL: https://issues.apache.org/jira/browse/OFBIZ-3599 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bob Morley > Fix For: SVN trunk > > Attachments: OFBIZ-3599_ResolveJavaWarningsOagis.patch > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-3599. ---------------------------------- Assignee: Jacques Le Roux Resolution: Fixed Thanks Bob, I committed your patch in trunk at r932681 I have 2 remarks. I understand why you changed this line. But I did not check the logic, did you? Else I'd appreciate if someone acquainted with this code could have a look - String serialNumber = (String) serialNumberIter.next(); + String serialNumber = serialNumberList.get(0); Also I wondered why you casted logicalId (which is a String) to an Object in the line below. - omiPkMap = UtilMisc.toMap("logicalId", logicalId, "component", component, "task", task, "referenceId", referenceId); + omiPkMap = UtilMisc.toMap("logicalId", (Object) logicalId, "component", component, "task", task, "referenceId", referenceId); Also is it really needed to have omiPkMap defined as Map<String, Object>, would not Map<String, String> be better? I finally compiled with Map<String, String> and as it was ok committed with it. Please let me know if you see any issues with that > specialpurpose - oagis > ---------------------- > > Key: OFBIZ-3599 > URL: https://issues.apache.org/jira/browse/OFBIZ-3599 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bob Morley > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: OFBIZ-3599_ResolveJavaWarningsOagis.patch > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bob Morley reopened OFBIZ-3599: ------------------------------- > specialpurpose - oagis > ---------------------- > > Key: OFBIZ-3599 > URL: https://issues.apache.org/jira/browse/OFBIZ-3599 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bob Morley > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: OFBIZ-3599_ResolveJavaWarningsOagis.patch > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bob Morley updated OFBIZ-3599: ------------------------------ Attachment: OFBIZ-3599_FixBadSerialNumberRetrieval.patch This fixes the problem Jacques has found in his review -- I had missed the loop and thought that it was only using the first serial number; as a result I was getting the 0th index in the list. The code originally had an iterator that I got away from using. The for loop that this is used in is doing it from the Oagis feed which reports the quantity and determines the maximum number based on what was provided, so we should not get an index violation here as this quantity is based on the maximum number of serial numbers that would be in the list (that is consistent with what the original code was doing). As for the cast -- in general I was creating the inputs to adhere to the parameter for the delegator.findByPrimaryKey -- in this case it expects a Map<String, Object>. In my mind I would have had to check each parameter to ensure it was a String; in reality the compiler would have handled that. At any rate, I generally code it as Map<String, Object> for consistency and casting the first String to a Object tricks the compiler into having the UtilValidate method return a Map<String, Object>. In fact, this is our typical internal compile error -- in Eclipse it will allow Map<String, Object> x = UtilValidate.toMap("a", "b"); but when compiling from the command-line it will fail. At any rate, if we can just correct the one mistake I am think we are good. :) > specialpurpose - oagis > ---------------------- > > Key: OFBIZ-3599 > URL: https://issues.apache.org/jira/browse/OFBIZ-3599 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bob Morley > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: OFBIZ-3599_FixBadSerialNumberRetrieval.patch, OFBIZ-3599_ResolveJavaWarningsOagis.patch > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-3599. ---------------------------------- Resolution: Fixed Thanks Bob, Committed at r932750 > specialpurpose - oagis > ---------------------- > > Key: OFBIZ-3599 > URL: https://issues.apache.org/jira/browse/OFBIZ-3599 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bob Morley > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: OFBIZ-3599_FixBadSerialNumberRetrieval.patch, OFBIZ-3599_ResolveJavaWarningsOagis.patch > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |