This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256761

Summary: OQLEngineTest.testMap() fails
Product: profiler Reporter: Tomas Hurka <thurka>
Component: BaseAssignee: Tomas Hurka <thurka>
Status: NEW ---    
Severity: normal Keywords: JDK_8
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Tomas Hurka 2015-11-24 12:35:07 UTC
OQLEngineTest.testMap() fails with:

Testcase: testMap(org.netbeans.modules.profiler.oql.engine.api.impl.OQLEngineTest):	FAILED
expected:
<...UID=3010773665991815[67]
tmpdir=null
counter...> 
but was:
<...UID=3010773665991815[70]
tmpdir=null
counter...>
Comment 1 Tomas Hurka 2015-11-24 12:35:46 UTC
This is JDK 8 only bug, JDK 7 works fine.
Comment 2 Tomas Hurka 2015-11-24 12:36:40 UTC
The problem can be demonstrated on the following simple javascript expression:
java.lang.Long.valueOf("301077366599181567").toString()

On JDK 8 the output is this:
~/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/bin/jrunscript 
nashorn> java.lang.Long.valueOf("301077366599181567").toString()
301077366599181570
nashorn> 

(last two numbers are 7,0 instead of 6,7)

The exact same expression works fine in JDK 7:
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/jrunscript 
js> java.lang.Long.valueOf("301077366599181567").toString()
301077366599181567
js>
Comment 3 Tomas Hurka 2015-11-24 12:37:39 UTC
JDK bug filed: https://bugs.openjdk.java.net/browse/JDK-8143896
Comment 4 Quality Engineering 2015-11-30 19:09:10 UTC
Integrated into 'main-silver', will be available in build *201511301649* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9f08d563b837
User: Tomas Hurka <thurka@netbeans.org>
Log: workaround for bug #256761, use incorrect number till JDK bug #8143896 is fixed
Comment 5 Tomas Hurka 2016-01-28 08:59:00 UTC
JDK-8143896 will be fixed in JDK 8u76.