Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328717

Summary: Refactor virtually identical code blocks in 3 DatasourceCall.translate methods into one
Product: z_Archived Reporter: Michael OBrien <michael.f.obrien>
Component: EclipselinkAssignee: Project Inbox <eclipselink.foundation-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipselink.foundation-inbox, michael.f.obrien
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 284884    
Bug Blocks:    

Description Michael OBrien CLA 2010-10-26 10:00:02 EDT
>The code in the following code blocks is virtually identical - this is a good candidate for reuse.
DAtasourceCall.java
 translateCustomQuery():364
 translateQueryString():657 // virtually identical to 364 above
 translatePureSQLCustomQuery():452 // slight diff

>See the while block in each starting with

            while (lastIndex != -1) {
                int tokenIndex = queryString.indexOf(argumentMarker(), lastIndex);
                String token;
                if (tokenIndex == -1) {
                    token = queryString.substring(lastIndex, queryString.length());
                    lastIndex = -1;
                } else {
>                    if (this.shouldProcessTokenInQuotes) {


>Does not block bug # 325167 but it may affect or be affected by it.
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:04:21 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink