[
https://issues.apache.org/jira/browse/LANG-1409?focusedWorklogId=527065&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-527065
]
ASF GitHub Bot logged work on LANG-1409:
----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Dec/20 05:33
Start Date: 22/Dec/20 05:33
Worklog Time Spent: 10m
Work Description: garydgregory edited a comment on pull request #676:
URL: https://github.com/apache/commons-lang/pull/676#issuecomment-749119583
Hi @subhamgupta26
Thank you for your PR.
While this change fixes 2 NPEs, it leaves the rest of Commons Lang to treat
null Locales inconsistently, some null Locales work for APIs you updated, but
others will still fail.
Please see git master for updates to treat null Locales as the default
Locale consistently throughout the code base.
If you think there is more to do, then please feel free to rebase your PR on
master and further update it. If the code base satisfies your use cases, then
please close it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 527065)
Time Spent: 0.5h (was: 20m)
> Crashes when testing StringUtils and CharSequenceUtils
> ------------------------------------------------------
>
> Key: LANG-1409
> URL: https://issues.apache.org/jira/browse/LANG-1409
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.7
> Environment: Ubuntu 16.04.4 LTS, and McOs High Sierra-10.13.5
> Junit-4.12
> Reporter: Mozhan Soltani
> Priority: Major
> Labels: test
> Attachments: CharSequenceUtilsTests.java, StringUtilsTests.java
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The attached test suites for {{org.apache.commons.lang3.StringUtils.java}}
> and {{org.apache.commons.lang3.CharSequenceUtils.java}} come from a prototype
> I have been working on which combines static analysis and automated test
> generation.
> The prototype analyses a specified dependency of a project to identify risky
> API calls which may potentially lead to runtime exceptions. Runtime
> exceptions may occur either because
> # an API lacks sufficient documentation,or
> # usage of the API does not conform to the specification, or
> # API wrapper does not indicate the API specification as part of its own
> specification.
> The prototype then automatically generates test cases which show how such
> exceptions may be triggered.
> *Observation:*
> For {{commons-lang}}, {{JDK APIs}} were analyzed. It seems that the failing
> methods do not handle the potential runtime exceptions which may or may not
> have been declared/documented for the JDK APIs they invoke.
> *Possible fixes:*
> # The failing methods under test could add internal checks on the values
> they forward to the {{JDK APIs}}.
> # The failing methods could handle the exceptions by adding relevant
> try/catch blocks.
> # The failing methods under test could specify the potential exceptions by
> adding {{@throws}} in their documentation/method signatures.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)