Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 185767 Details for
Bug 329227
Usage of broken quicksort algorithm in jdt.internal.compiler.util.Util
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch to commit
patch3292227.txt (text/plain), 4.13 KB, created by
Ayushman Jain
on 2010-12-23 08:11:57 EST
(
hide
)
Description:
patch to commit
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2010-12-23 08:11:57 EST
Size:
4.13 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/util/Util.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java,v >retrieving revision 1.79 >diff -u -r1.79 Util.java >--- compiler/org/eclipse/jdt/internal/compiler/util/Util.java 29 Jun 2010 01:03:42 -0000 1.79 >+++ compiler/org/eclipse/jdt/internal/compiler/util/Util.java 23 Dec 2010 12:16:21 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * daolaf@gmail.com - Contribution for bug 3292227 > *******************************************************************************/ > package org.eclipse.jdt.internal.compiler.util; > >@@ -677,7 +678,7 @@ > public static void reverseQuickSort(char[][] list, int left, int right) { > int original_left= left; > int original_right= right; >- char[] mid= list[(right + left) / 2]; >+ char[] mid= list[left + ((right-left)/2)]; > do { > while (CharOperation.compareTo(list[left], mid) > 0) { > left++; >@@ -703,7 +704,7 @@ > public static void reverseQuickSort(char[][] list, int left, int right, int[] result) { > int original_left= left; > int original_right= right; >- char[] mid= list[(right + left) / 2]; >+ char[] mid= list[left + ((right-left)/2)]; > do { > while (CharOperation.compareTo(list[left], mid) > 0) { > left++; >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor.java,v >retrieving revision 1.12 >diff -u -r1.12 CompletionTestsRequestor.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor.java 28 Apr 2009 17:46:10 -0000 1.12 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor.java 23 Dec 2010 12:16:23 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -184,7 +184,7 @@ > protected String[] quickSort(String[] collection, int left, int right) { > int original_left = left; > int original_right = right; >- String mid = collection[ (left + right) / 2]; >+ String mid = collection[left + ((right - left)/2)]; > do { > while (mid.compareTo(collection[left]) > 0) > // s[left] >= mid >Index: src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor2.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor2.java,v >retrieving revision 1.32 >diff -u -r1.32 CompletionTestsRequestor2.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor2.java 16 Jan 2009 14:29:34 -0000 1.32 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor2.java 23 Dec 2010 12:16:23 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004, 2009 IBM Corporation and others. >+ * Copyright (c) 2004, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -492,7 +492,7 @@ > protected CompletionProposal[] quickSort(CompletionProposal[] collection, int left, int right) { > int original_left = left; > int original_right = right; >- CompletionProposal mid = collection[ (left + right) / 2]; >+ CompletionProposal mid = collection[left + ((right - left)/2)]; > do { > while (compare(mid, collection[left]) > 0) > // s[left] >= mid
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
amj87.iitr
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 329227
:
182179
| 185767