Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(118)

Issue 13047: Use JUEL for expressions instead of home-brewed version (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
17 years ago by awiner
Modified:
16 years, 6 months ago
Reviewers:
Base URL:
http://svn.apache.org/repos/asf/incubator/shindig/trunk/
Visibility:
Public.

Description

Kill off the custom implementation of ${} expressions in favor of JUEL, a JavaEE 5.0-compliant implementation. This gives us much broader support for expression syntax. (The prior implementation supported only '.' syntax.) Two losses: - There's no support for escaping ".", so instead of: ${foo.some\.property} you use ${foo['some.property']} - You can't use [] at the top-level, so instead of : ${some\.property.foo} for config, I've introduced "current", so this becomes ${current['some.property'].foo} Micro-benchmarks show this implementation running ca. 10% slower than the hand-coded version for straight evaluation. Parsing wasn't tested, but JUEL includes a configurable cache, so I expect it'll be faster. Improved tests for some of the config-fetching code; and fixed a bug that I think should have caused JsonContainerConfig.getList("${....}") to always return an empty list.

Patch Set 1 #

Patch Set 2 : Second patch set #

Total comments: 10

Patch Set 3 : Addressing feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1021 lines, -924 lines) Patch
java/common/pom.xml View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/config/AbstractContainerConfig.java View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/config/ContainerConfigELResolver.java View 1 2 1 chunk +131 lines, -0 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/config/ContainerConfigExpressionContext.java View 1 2 1 chunk +0 lines, -49 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/config/DynamicConfigProperty.java View 1 2 1 chunk +15 lines, -15 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/config/JsonContainerConfig.java View 1 2 6 chunks +35 lines, -26 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/expressions/ElException.java View 1 2 1 chunk +0 lines, -36 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/expressions/Expression.java View 1 2 1 chunk +0 lines, -34 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/expressions/ExpressionContext.java View 1 2 1 chunk +0 lines, -31 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/expressions/Expressions.java View 1 2 1 chunk +139 lines, -212 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/expressions/JsonELResolver.java View 1 2 1 chunk +131 lines, -0 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/expressions/RootELResolver.java View 1 1 chunk +104 lines, -0 lines 0 comments Download
java/common/src/test/java/org/apache/shindig/config/ContainerConfigExpressionContextTest.java View 1 2 1 chunk +0 lines, -71 lines 0 comments Download
java/common/src/test/java/org/apache/shindig/config/JsonContainerConfigTest.java View 1 2 8 chunks +28 lines, -9 lines 0 comments Download
java/common/src/test/java/org/apache/shindig/expressions/ExpressionsTest.java View 1 2 1 chunk +49 lines, -101 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/GadgetELResolver.java View 1 2 1 chunk +127 lines, -0 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/GadgetExpressionContext.java View 1 2 1 chunk +0 lines, -74 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/process/Processor.java View 1 2 1 chunk +1 line, -1 line 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/PipelinedData.java View 1 2 17 chunks +69 lines, -81 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/GadgetELResolverTest.java View 1 chunk +100 lines, -0 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/GadgetExpressionContextTest.java View 1 2 1 chunk +0 lines, -101 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/process/ProcessorTest.java View 1 2 5 chunks +11 lines, -31 lines 0 comments Download
java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityHandler.java View 1 2 2 chunks +6 lines, -9 lines 0 comments Download
java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/PersonHandler.java View 1 2 2 chunks +6 lines, -8 lines 0 comments Download
java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityHandlerTest.java View 1 2 6 chunks +28 lines, -18 lines 0 comments Download
java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/PersonHandlerTest.java View 1 2 4 chunks +26 lines, -15 lines 0 comments Download
pom.xml View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 6
awiner
17 years ago (2009-02-05 00:30:20 UTC) #1
awiner
Second patch set
17 years ago (2009-02-05 01:10:53 UTC) #2
louiscryan
Looks great http://codereview.appspot.com/13047/diff/1013/1026 File java/common/src/main/java/org/apache/shindig/expressions/JsonELResolver.java (right): http://codereview.appspot.com/13047/diff/1013/1026#newcode117 Line 117: if (property instanceof Number) { any ...
17 years ago (2009-02-05 02:11:00 UTC) #3
levik
http://codereview.appspot.com/13047/diff/1013/1029 File java/common/src/main/java/org/apache/shindig/config/ContainerConfigELResolver.java (right): http://codereview.appspot.com/13047/diff/1013/1029#newcode36 Line 36: public static final String CURRENT_CONFIG_KEY = "current"; Templates ...
17 years ago (2009-02-05 16:49:26 UTC) #4
awiner
Thanks for the review. I'll probably submit later today pending any other feedback. http://codereview.appspot.com/13047/diff/1013/1029 File ...
17 years ago (2009-02-05 18:27:28 UTC) #5
awiner
17 years ago (2009-02-05 18:27:53 UTC) #6
Addressing feedback
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b