
|
If you were logged in you would be able to see more operations.
|
|
|
OGNL
Created: 08/Sep/07 12:45 PM
Updated: 21/Jan/08 11:38 AM
|
|
| Component/s: |
None
|
| Affects Version/s: |
2.6.9
|
| Fix Version/s: |
2.7.2
|
|
|
SimpleNode#evaluateGetValueBody(OgnlContext, Object) might return null.
I have a patch that resolves the issue for version 2.6.9. Same issue might be in the above vesions.
{noformat}
Index: C:/User/Work/workspace/ognl/src/java/ognl/SimpleNode.java
===================================================================
--- C:/User/Work/workspace/ognl/src/java/ognl/SimpleNode.java (revision 139)
+++ C:/User/Work/workspace/ognl/src/java/ognl/SimpleNode.java (working copy)
@@ -44,7 +44,7 @@
protected OgnlParser parser;
private boolean constantValueCalculated;
- private boolean hasConstantValue;
+ private volatile boolean hasConstantValue;
private Object constantValue;
public SimpleNode(int i) {
@@ -162,10 +162,11 @@
context.setCurrentNode(this);
if (!constantValueCalculated) {
constantValueCalculated = true;
- hasConstantValue = isConstant(context);
- if (hasConstantValue) {
+ boolean constant = isConstant(context);
+ if (constant) {
constantValue = getValueBody(context, source);
}
+ hasConstantValue = constant;
}
return hasConstantValue ? constantValue : getValueBody(context, source);
}
{noformat}
|
|
Description
|
SimpleNode#evaluateGetValueBody(OgnlContext, Object) might return null.
I have a patch that resolves the issue for version 2.6.9. Same issue might be in the above vesions.
{noformat}
Index: C:/User/Work/workspace/ognl/src/java/ognl/SimpleNode.java
===================================================================
--- C:/User/Work/workspace/ognl/src/java/ognl/SimpleNode.java (revision 139)
+++ C:/User/Work/workspace/ognl/src/java/ognl/SimpleNode.java (working copy)
@@ -44,7 +44,7 @@
protected OgnlParser parser;
private boolean constantValueCalculated;
- private boolean hasConstantValue;
+ private volatile boolean hasConstantValue;
private Object constantValue;
public SimpleNode(int i) {
@@ -162,10 +162,11 @@
context.setCurrentNode(this);
if (!constantValueCalculated) {
constantValueCalculated = true;
- hasConstantValue = isConstant(context);
- if (hasConstantValue) {
+ boolean constant = isConstant(context);
+ if (constant) {
constantValue = getValueBody(context, source);
}
+ hasConstantValue = constant;
}
return hasConstantValue ? constantValue : getValueBody(context, source);
}
{noformat} |
Show » |
| There are no comments yet on this issue.
|
|