Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 380116 - [getter setter] TUR4.2: Field I and Field Dotless I generate the same getter and setter.
Summary: [getter setter] TUR4.2: Field I and Field Dotless I generate the same getter ...
Status: VERIFIED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.3 M1   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL: https://git.eclipse.org/r/#/c/7112
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 05:15 EDT by Masaihko Maedera CLA
Modified: 2012-08-07 11:56 EDT (History)
8 users (show)

See Also:


Attachments
DotlessI_Fıeld.java (213 bytes, application/octet-stream)
2012-05-21 05:17 EDT, Masaihko Maedera CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masaihko Maedera CLA 2012-05-21 05:15:21 EDT
Build Identifier: I20120503-1800

Description:
When the Java class has Field I and Field Dotless I at the same time,
Java Editor generates the getter and the setter with the same name.
It causes compiling errors.

OS: Red Hat Linux 6.2
JDK: JRE 1.7.0 IBM
Locale:Turkish

Reproducible: Always

Steps to Reproduce:
1. Create a Java project with UTF-8 encoding.
2. Import DotlessI_Field.java, attached to this report, into the Java project.
3. Menu [Source] -> [Generate Getters and Setters]
4. Select both of Field I and Field Dotless I.
5. Eclipse generates the same getter and setter names for both.
6. It causes compiling errors
Comment 1 Masaihko Maedera CLA 2012-05-21 05:17:08 EDT
Created attachment 215940 [details]
DotlessI_Fıeld.java
Comment 2 Dani Megert CLA 2012-05-21 07:29:11 EDT
This is a bug in IBM's and Oracle's JRE (String.equalsIgnoreCase(...).
Comment 3 Dani Megert CLA 2012-05-22 06:43:34 EDT
(In reply to comment #2)
> This is a bug in IBM's and Oracle's JRE (String.equalsIgnoreCase(...).

Actually, that is not the problem here. The problem is that JDT Core uses Character.toUpper/LowerCase(char) instead of String.toUpper/LowerCase().
Comment 4 Dani Megert CLA 2012-05-22 06:44:02 EDT
Not a regression.
Comment 5 Ayushman Jain CLA 2012-07-25 13:29:14 EDT
Tom, can you take a look at this, time permitting.
Comment 6 Tomasz Zarna CLA 2012-08-06 08:57:02 EDT
A fix proposal pushed to Gerrit as https://git.eclipse.org/r/#/c/7112
Comment 7 Markus Keller CLA 2012-08-06 10:07:30 EDT
Sorry I didn't realize this before, but I don't think there's anything to do for us.

We follow the JavaBeans conventions here (bug 154823 comment 5), and java.beans.Introspector#decapitalize(String) also ignores the locale.

The name conflict is therefore expected and should stay.
Comment 8 Tomasz Zarna CLA 2012-08-07 10:38:04 EDT
(In reply to comment #7)
> Sorry I didn't realize this before, but I don't think there's anything to do for
> us.

No worries. Closing as WONTFIX.