Skip to content

Added BigDecimal capabilities to SpEl numeric operators - #54

Closed
giovannidalloglio wants to merge 3 commits into
spring-projects:masterfrom
giovannidalloglio:master
Closed

giovannidalloglio wants to merge 3 commits into
spring-projects:masterfrom
giovannidalloglio:master

Conversation

@giovannidalloglio

Copy link
Copy Markdown
Contributor

Hi.

Some time ago, we found that the BigDecimals was not considered in the supported operations by Expression Language. I also opened an issue: https://jira.springsource.org/browse/SPR-8716

If you are interested, we'd like to share our enhancement.

The updated operators are:

  • gt
  • ge
  • lt
  • le
  • eq
  • ne
  • plus
  • minus
  • divide
  • multiply
  • power
  • modulus

* gt
* ge
* lt
* le
* eq
* ne
* plus
* minus
* divide
* multiply
* power
* modulus

This should cover the issue
https://jira.springsource.org/browse/SPR-8716
@cbeams

cbeams commented Mar 7, 2012

Copy link
Copy Markdown
Contributor

@aclement, please take a look.

On Mar 7, 2012, at 5:09 PM, [email protected] wrote:

Hi.

Some time ago, we found that the BigDecimals was not considered in the supported operations by Expression Language. I also opened an issue: https://jira.springsource.org/browse/SPR-8716

If you are interested, we'd like to share our enhancement.

The updated operators are:

  • gt
  • ge
  • lt
  • le
  • eq
  • ne
  • plus
  • minus
  • divide
  • multiply
  • power
  • modulus

You can merge this Pull Request by running:

git pull https://github.com/giovannidalloglio/spring-framework master

Or you can view, comment on it, or merge it online at:

#54

-- Commit Summary --

  • Added BigDecimal capabilities to SpEl numeric operators

-- File Changes --

M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpDivide.java (13)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpEQ.java (15)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpGE.java (14)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpGT.java (14)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpLE.java (14)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpLT.java (14)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMinus.java (14)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpModulus.java (9)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java (9)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpNE.java (14)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OpPlus.java (12)
M spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorPower.java (10)
M spring-expression/src/test/java/org/springframework/expression/spel/OperatorTests.java (183)

-- Patch Links --

https://github.com/SpringSource/spring-framework/pull/54.patch
https://github.com/SpringSource/spring-framework/pull/54.diff


Reply to this email directly or view it on GitHub:
#54

@cbeams

cbeams commented May 14, 2012

Copy link
Copy Markdown
Contributor

Giovanni, could you please indicate that you've signed the CLA per the contributor guidelines?

Also please check that there are no conflicts with some recent changes that were made to OpPlus. You can rebase against the latest SpringSource/master and do a force push to update this branch. Ideally, you should actually submit the pull request from a branch named SPR-8716, instead of your master branch. This is also covered in the guidelines.

Thanks!

@giovannidalloglio

Copy link
Copy Markdown
Contributor Author

It seems that I made a mess!

Please, forgive me: I'm not used to Git, and I'm trying to repare...

@cbeams

cbeams commented May 15, 2012

Copy link
Copy Markdown
Contributor

No problem. Git takes a little time to get used to, but it's worth it! Feel free to simply create a new pull request with the cleaned-up commits.

@giovannidalloglio

Copy link
Copy Markdown
Contributor Author

Following your suggestion, i'm closing this pull request, to create a new with cleaned-up commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants