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 286012 Details for
Bug 570670
Optimisations for GarbageCleaner
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
2b_fix_ensure_readdirect_multithreaded.patch
2b_fix_ensure_readdirect_multithreaded.patch (text/plain), 1.64 KB, created by
Jason Koch
on 2021-04-01 00:20:25 EDT
(
hide
)
Description:
2b_fix_ensure_readdirect_multithreaded.patch
Filename:
MIME Type:
Creator:
Jason Koch
Created:
2021-04-01 00:20:25 EDT
Size:
1.64 KB
patch
obsolete
>diff --git a/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/io/SimpleBufferedRandomAccessInputStream.java b/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/io/SimpleBufferedRandomAccessInputStream.java >index 649db6cb..9545bcbd 100644 >--- a/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/io/SimpleBufferedRandomAccessInputStream.java >+++ b/plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/io/SimpleBufferedRandomAccessInputStream.java >@@ -3,8 +3,8 @@ > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License 2.0 > * which accompanies this distribution, and is available at >- * https://www.eclipse.org/legal/epl-2.0/ >- * >+ * https://www.eclipse.org/legal/epl-2.0/ >+ * > * SPDX-License-Identifier: EPL-2.0 > * > * Contributors: >@@ -49,17 +49,20 @@ public class SimpleBufferedRandomAccessInputStream extends InputStream > > public final byte[] readDirect(long position, int length) throws IOException > { >+ byte[] buff = new byte[length]; >+ ByteBuffer bb = ByteBuffer.wrap(buff); > int totalRead = 0; > while (totalRead < length) > { >- int read += raf.getChannel().read(buffer, position); >+ int read = raf.getChannel().read(bb, position); > if (read < 0) > { > throw new IOException("incomplete read while performing read on buffer"); > } > totalRead += read; >+ position += read; > } >- return buffer.array(); >+ return buff; > } > > public final int read() throws IOException
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
Actions:
View
|
Diff
Attachments on
bug 570670
:
285390
|
285391
|
285392
|
285393
|
285394
|
285395
| 286012 |
286013
|
286014
|
286359
|
286512