scala - Methods in trait become volatile methods when mixed in concrete classes in 2.9.0-1 but not 2.8.1 -


i noticed breaking (for me using ognl) change in 2.9.0-1:

i find that, in 2.9, methods declared in trait become volatile when mixed in class:

example in 2.9.0-1

import java.lang.reflect.modifier  trait supertrait {     def getknoll = "kanutten" }  class klasswithknoll extends supertrait {     def getknall = "mars"  }  val qsc = classof[klasswithknoll] val knollgetter = qsc.getdeclaredmethod("getknoll") println("isvolatile: " + modifier.isvolatile(knollgetter.getmodifiers())) 

this prints out

isvolatile: true 

but in 2.8.1:

it prints out

isvolatile: false 

this breaking change me ognl refuses execute volatile (why don't know) in expressions.

so - question is; why change made?

there's no such thing volatile method. seeing 0x0040 flag set, acc_volatile fields, acc_bridge methods. since modifier.isvolatile method takes int, can't tell you're asking not meaningful.


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

php - Time zone issue -

iphone - Using nested NSDictionary with Picker -