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 - NB 7.3.1 org.openide.util.CharSequencesTest::testSizes fails on JDK 8 due to improvement of JDK
Summary: NB 7.3.1 org.openide.util.CharSequencesTest::testSizes fails on JDK 8 due to...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.3.1
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2013-08-20 13:45 UTC by AlexanderIoffe
Modified: 2013-08-21 11:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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