Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366202 - No value error fired when you type a string in an integer property field
Summary: No value error fired when you type a string in an integer property field
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-09 10:14 EST by Etienne Beaumont CLA
Modified: 2021-11-19 09:21 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Etienne Beaumont CLA 2011-12-09 10:14:24 EST
Build Identifier: M20110909-1335

No value error fired when you type a string in an integer property field.

The decorator doesn't change;

Reproducible: Always

Steps to Reproduce:
1. Open sapphire-gallery.xml (Sapphire Samples 0.4)
2. Navigate to node "value properties/numbers/integer"
3. type "abc" in any of the three fields
Comment 1 Konstantin Komissarchik CLA 2011-12-09 11:16:25 EST
Could you specify the exact error that you are seeing. I did not run into any issues following your steps.
Comment 2 Etienne Beaumont CLA 2011-12-09 11:29:12 EST
(In reply to comment #1)
> Could you specify the exact error that you are seeing. I did not run into any
> issues following your steps.

My bad, I didn't see the NullPointerException in my developpement instance of eclipse. It seems like I can't load the integer class

java.lang.NullPointerException
	at org.eclipse.sapphire.modeling.localization.ClassLocalizationService.load(ClassLocalizationService.java:54)

I guess it's my configuration... I'll try to fix it myself, and if I can't you might see me again on the forums.

I see that you deal with locale in the ClassLocalizationService and my locale is french.

Sorry for polluting bugzilla, I can't understand how I missed the exception but I did...
Comment 3 Konstantin Komissarchik CLA 2011-12-09 11:32:12 EST
It could be an issue with locales. I will try switching my locale later today to see what happens.
Comment 4 Etienne Beaumont CLA 2011-12-09 12:21:15 EST
After debugging a little it seems like it's not a locale issue but a classloader one.

In ClassLocalizationService
//final InputStream stream = this.cl.getClassLoader().getResourceAsStream( resPath );

getClassLoader returns "null" when cl is an Integer, BigInteger, etc.

Take a look at getClassLoader javadoc :

// public ClassLoader getClassLoader()
//
// Returns the class loader for the class. Some implementations may use null to 
// represent the bootstrap class loader. This method will return null in such
// implementations if this class was loaded by the bootstrap class loader. 

I guess that's why it throws the exception
Comment 5 Konstantin Komissarchik CLA 2011-12-09 12:37:51 EST
What JVM are you using?
Comment 6 Etienne Beaumont CLA 2011-12-12 04:02:27 EST
(In reply to comment #5)
> What JVM are you using?

java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode, sharing)
Comment 7 Konstantin Komissarchik CLA 2012-01-23 16:43:09 EST
I have reproduced this problem when launching Eclipse on Oracle JVM with non-English locale. Working on a fix.
Comment 8 Konstantin Komissarchik CLA 2012-02-01 18:13:13 EST
I have fixed the problem. Sorry for the delay. Please verify.
Comment 9 Etienne Beaumont CLA 2012-06-01 08:52:08 EDT
Sorry for the delay. Bug fixed in 0.5.
Comment 10 Konstantin Komissarchik CLA 2012-06-01 09:31:57 EDT
Thanks. Closing.