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 202725 Details for
Bug 337935
Test failures when run as an IDE (org.eclipse.sdk.ide)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
improved fix
Bug_337935_v3.patch (text/plain), 3.67 KB, created by
Stephan Herrmann
on 2011-09-04 17:50:36 EDT
(
hide
)
Description:
improved fix
Filename:
MIME Type:
Creator:
Stephan Herrmann
Created:
2011-09-04 17:50:36 EDT
Size:
3.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java,v >retrieving revision 1.53 >diff -u -r1.53 ClassFileWorkingCopy.java >--- model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java 27 Jun 2008 16:03:51 -0000 1.53 >+++ model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java 4 Sep 2011 21:39:46 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2011 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 >@@ -81,21 +81,18 @@ > protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { > > // create buffer >- IBuffer buffer = this.owner.createBuffer(this); >- if (buffer == null) return null; >+ IBuffer buffer = BufferManager.createBuffer(this); > > // set the buffer source >- if (buffer.getCharacters() == null) { >- IBuffer classFileBuffer = this.classFile.getBuffer(); >- if (classFileBuffer != null) { >- buffer.setContents(classFileBuffer.getCharacters()); >- } else { >- // Disassemble >- IClassFileReader reader = ToolFactory.createDefaultClassFileReader(this.classFile, IClassFileReader.ALL); >- Disassembler disassembler = new Disassembler(); >- String contents = disassembler.disassemble(reader, Util.getLineSeparator("", getJavaProject()), ClassFileBytesDisassembler.WORKING_COPY); //$NON-NLS-1$ >- buffer.setContents(contents); >- } >+ IBuffer classFileBuffer = this.classFile.getBuffer(); >+ if (classFileBuffer != null) { >+ buffer.setContents(classFileBuffer.getCharacters()); >+ } else { >+ // Disassemble >+ IClassFileReader reader = ToolFactory.createDefaultClassFileReader(this.classFile, IClassFileReader.ALL); >+ Disassembler disassembler = new Disassembler(); >+ String contents = disassembler.disassemble(reader, Util.getLineSeparator("", getJavaProject()), ClassFileBytesDisassembler.WORKING_COPY); //$NON-NLS-1$ >+ buffer.setContents(contents); > } > > // add buffer to buffer cache >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/WorkingCopyTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyTests.java,v >retrieving revision 1.46 >diff -u -r1.46 WorkingCopyTests.java >--- src/org/eclipse/jdt/core/tests/model/WorkingCopyTests.java 28 Apr 2009 17:49:28 -0000 1.46 >+++ src/org/eclipse/jdt/core/tests/model/WorkingCopyTests.java 4 Sep 2011 21:39:48 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2011 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 >@@ -202,8 +202,9 @@ > > /** > * Test creating a working copy on a class file with a customized buffer. >+ * As of https://bugs.eclipse.org/337935 this test is no longer valid. > */ >-public void testOnClassFile() throws JavaModelException, IOException { >+public void _testOnClassFile() throws JavaModelException, IOException { > // ensure the external JCL is copied > setupExternalJCL("jclMin"); >
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 337935
:
201477
|
201644
| 202725