Bug 328717 - Refactor virtually identical code blocks in 3 DatasourceCall.translate methods into one
Summary: Refactor virtually identical code blocks in 3 DatasourceCall.translate method...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 284884
Blocks:
  Show dependency tree
 
Reported: 2010-10-26 10:00 EDT by Michael OBrien CLA
Modified: 2022-06-09 10:04 EDT (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 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