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 234656

Summary: NB 7.3.1 org.openide.util.CharSequencesTest::testSizes fails on JDK 8 due to improvement of JDK
Product: platform Reporter: AlexanderIoffe
Component: -- Other --Assignee: Vladimir Voskresensky <vv159170>
Status: RESOLVED FIXED    
Severity: normal CC: alexvsimon, jskrivanek
Priority: P3 Keywords: JDK_SPECIFIC
Version: 7.3.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description AlexanderIoffe 2013-08-20 13:45:48 UTC
test fails because size of String "Русский текст" is also 56 as for NB CharSequence

String object is smaSller than our char sequence

junit.framework.AssertionFailedError: string object is smaller than our char sequence
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.assertTrue(Assert.java:20)
at org.openide.util.CharSequencesTest.testSizes(CharSequencesTest.java:273)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at junit.framework.TestCase.runTest(TestCase.java:168)
at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:97)
at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:431)
at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:357)
at java.lang.Thread.run(Thread.java:724)
Comment 1 AlexanderIoffe 2013-08-20 13:47:14 UTC
Suggest to exclude test or use <= instaed of <

Replace
268: assertSize("Size is too big for " + rusText, 56, rusText);

with
268: assertSize("Size is too big for " + rusText, 55, rusText);
Comment 2 Vladimir Voskresensky 2013-08-21 11:09:23 UTC
http://hg.netbeans.org/cnd-main/rev/852088be789d