Commits

jkuh...@d4b077e3-5828-0410-b394-cb2b42183085  committed ba8249c

One more improvement for OGNL-115 constant modification bug handling in ASTConst class itself.

  • Participants
  • Parent commits 3fdd153

Comments (0)

Files changed (1)

File src/java/ognl/ASTConst.java

 // --------------------------------------------------------------------------
 package ognl;
 
+import ognl.enhance.UnsupportedCompilationException;
+
 import java.math.BigDecimal;
 import java.math.BigInteger;
 
 
     public String toSetSourceString(OgnlContext context, Object target)
     {
+        if (_parent == null)
+            throw new UnsupportedCompilationException("Can't modify constant values.");
+        
         return toGetSourceString(context, target);
     }
 }