-
Bug
-
Resolution: Fixed
-
P3
-
8u40, 9
-
None
-
b30
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085707 | emb-9 | Attila Szegedi | P3 | Resolved | Fixed | team |
JDK-8064211 | 8u45 | Attila Szegedi | P3 | Resolved | Fixed | b01 |
JDK-8057831 | 8u40 | Attila Szegedi | P3 | Resolved | Fixed | b06 |
JDK-8070448 | emb-8u47 | Attila Szegedi | P3 | Resolved | Fixed | team |
This bug report is derived from this email to nashorn-dev alias:
http://mail.openjdk.java.net/pipermail/nashorn-dev/2014-August/003345.html
File: atomic.js
x = new java.util.concurrent.atomic.AtomicInteger()
x.incrementAndGet()
print(x + '\n')
function getAtomic() {
return new java.util.concurrent.atomic.AtomicInteger()
}
x = getAtomic()
x.incrementAndGet()
print(x + '\n')
Expected output:
1
1
Output seen with jdk8u20:
1
1
Output seen with jdk8u-dev and jdk9-dev:
1
atomic.js:10 TypeError: 0 has no such function "incrementAndGet"
Output with --optimistic-types=false option:
1
1
http://mail.openjdk.java.net/pipermail/nashorn-dev/2014-August/003345.html
File: atomic.js
x = new java.util.concurrent.atomic.AtomicInteger()
x.incrementAndGet()
print(x + '\n')
function getAtomic() {
return new java.util.concurrent.atomic.AtomicInteger()
}
x = getAtomic()
x.incrementAndGet()
print(x + '\n')
Expected output:
1
1
Output seen with jdk8u20:
1
1
Output seen with jdk8u-dev and jdk9-dev:
1
atomic.js:10 TypeError: 0 has no such function "incrementAndGet"
Output with --optimistic-types=false option:
1
1
- backported by
-
JDK-8057831 AtomicInteger is treated as primitive number with optimistic compilation
-
- Resolved
-
-
JDK-8064211 AtomicInteger is treated as primitive number with optimistic compilation
-
- Resolved
-
-
JDK-8070448 AtomicInteger is treated as primitive number with optimistic compilation
-
- Resolved
-
-
JDK-8085707 AtomicInteger is treated as primitive number with optimistic compilation
-
- Resolved
-