Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 548363 - Update JNI code with "contains" instead of "indexOf"
Summary: Update JNI code with "contains" instead of "indexOf"
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.11   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.13 M1   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 548277
Blocks:
  Show dependency tree
 
Reported: 2019-06-18 03:12 EDT by Lars Vogel CLA
Modified: 2019-06-18 11:35 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2019-06-18 03:12:14 EDT
I noticed that the JNI code uses indexOf instead of contains. See https://git.eclipse.org/r/c/144213/2/bundles/org.eclipse.swt.tools/JNI+Generation/org/eclipse/swt/tools/internal/ASTField.java

Karsten Thoms hinted that this code is generated. Can you please update the generator?
Comment 1 Lars Vogel CLA 2019-06-18 03:13:08 EDT
Nikita, can you help here?
Comment 2 Nikita Nemkin CLA 2019-06-18 03:54:34 EDT
(In reply to Lars Vogel from comment #0)
> I noticed that the JNI code uses indexOf instead of contains. See
> https://git.eclipse.org/r/c/144213/2/bundles/org.eclipse.swt.tools/
> JNI+Generation/org/eclipse/swt/tools/internal/ASTField.java
> 
> Karsten Thoms hinted that this code is generated. Can you please update the
> generator?

That code isn't auto-generated, it's the code for the generator itself. Your change is safe.

Since we dropped 32-bit support, that particular chunk isn't necessary anymore and I'm going to remove it soon.
Comment 3 Lars Vogel CLA 2019-06-18 04:06:11 EDT
(In reply to Nikita Nemkin from comment #2)
> (In reply to Lars Vogel from comment #0)
> > I noticed that the JNI code uses indexOf instead of contains. See
> > https://git.eclipse.org/r/c/144213/2/bundles/org.eclipse.swt.tools/
> > JNI+Generation/org/eclipse/swt/tools/internal/ASTField.java
> > 
> > Karsten Thoms hinted that this code is generated. Can you please update the
> > generator?
> 
> That code isn't auto-generated, it's the code for the generator itself. Your
> change is safe.
> 
> Since we dropped 32-bit support, that particular chunk isn't necessary
> anymore and I'm going to remove it soon.

Thanks. Will recreate the for the JNI code changes and add you as reviewer after you merged https://git.eclipse.org/r/c/144040/ to avoid conflicts.
Comment 4 Eclipse Genie CLA 2019-06-18 08:57:56 EDT
New Gerrit change created: https://git.eclipse.org/r/144355