[jira] [Commented] (LANG-1444) NumberUtils.createNumber() does not create BigDecimal for decimal fractions tending to zero
[ https://issues.apache.org/jira/browse/LANG-1444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442523#comment-17442523 ] asha somayajula commented on LANG-1444: --- Can a PR be created for this? > NumberUtils.createNumber() does not create BigDecimal for decimal fractions > tending to zero > --- > > Key: LANG-1444 > URL: https://issues.apache.org/jira/browse/LANG-1444 > Project: Commons Lang > Issue Type: Bug > Components: lang.math.* >Affects Versions: 3.8.1 >Reporter: Costa Theodosiou >Priority: Major > Time Spent: 1h 50m > Remaining Estimate: 0h > > The following code demonstrates the issue: > {{System.out.println(NumberUtils.createNumber("1.1").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.001").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.1").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.001").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.1").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.001").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.1").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.001").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.1").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.001").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.1").getClass().getName());}} > {{System.out.println(NumberUtils.createNumber("1.001").getClass().getName());}} > will print: > {{java.lang.Float}} > {{java.lang.Float}} > {{java.lang.Float}} > {{java.lang.Float}} > {{java.lang.Double}} > {{java.lang.Double}} > {{java.lang.Double}} > {{java.lang.Double}} > {{java.lang.Float}} > {{java.lang.Float}} > {{java.lang.Float}} > {{java.lang.Float}} > It seems the problem is towards the bottom of the createNumber method that > compares the float to double string representation: > f.toString().equals(d.toString()) > For the misbehaving tests, the string "1.0".equals("1.0") -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (LANG-1666) Add ObjectUtils.equalsAny
[ https://issues.apache.org/jira/browse/LANG-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442522#comment-17442522 ] asha somayajula commented on LANG-1666: --- Can this be worked or is the PR intended to be merged? > Add ObjectUtils.equalsAny > - > > Key: LANG-1666 > URL: https://issues.apache.org/jira/browse/LANG-1666 > Project: Commons Lang > Issue Type: New Feature >Reporter: Felix Hagemans >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > I think an {{equalsAny}} utility method would be a nice simple addition to > the ObjectUtils class. For example: > {code:java}if (valueA.equals(someObject.getSomeGetter()) || > valueB.equals(someObject.getSomeGetter()) { ... }{code} > could be written a lot cleaner: > {code:java}if (ObjectUtils.equalsAny(someObject.getSomeGetter(), valueA, > valueB) { ... }{code} > It would work similar to the already existing StringUtils.equalsAny method. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (COLLECTIONS-700) Add a ConcurrentWeakHashMap
[ https://issues.apache.org/jira/browse/COLLECTIONS-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442441#comment-17442441 ] asha somayajula commented on COLLECTIONS-700: - Can I work this issue? If yes, is there a good place to start? My first really here on Jira and on commons Thanks, Asha > Add a ConcurrentWeakHashMap > --- > > Key: COLLECTIONS-700 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-700 > Project: Commons Collections > Issue Type: New Feature > Components: Map >Reporter: Gary D. Gregory >Assignee: Gary D. Gregory >Priority: Major > > Add a {{ConcurrentWeakHashMap}}: A concurrent > {{[WeakHashMap|https://docs.oracle.com/javase/8/docs/api/java/util/WeakHashMap.html]}}. > A need for this was found to best support BeanUtils's BEANUTILS-509 > This issue is looking for a volunteer. -- This message was sent by Atlassian Jira (v8.20.1#820001)