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 173672 Details for
Bug 318134
NPE in ElementImpl.hashCode (again)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
bug318134-patch.txt (text/plain), 3.15 KB, created by
Walter Harley
on 2010-07-07 12:00:00 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Walter Harley
Created:
2010-07-07 12:00:00 EDT
Size:
3.15 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.compiler.apt >Index: src/org/eclipse/jdt/internal/compiler/apt/model/ElementImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementImpl.java,v >retrieving revision 1.18 >diff -u -r1.18 ElementImpl.java >--- src/org/eclipse/jdt/internal/compiler/apt/model/ElementImpl.java 22 Jun 2007 15:09:48 -0000 1.18 >+++ src/org/eclipse/jdt/internal/compiler/apt/model/ElementImpl.java 7 Jul 2010 15:57:11 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 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 >@@ -41,6 +41,9 @@ > public final Binding _binding; > > protected ElementImpl(BaseProcessingEnvImpl env, Binding binding) { >+ if (null == binding) { >+ throw new NullPointerException("Cannot pass null binding to ElementImpl c'tor"); //$NON-NLS-1$ >+ } > _env = env; > _binding = binding; > } >Index: src/org/eclipse/jdt/internal/compiler/apt/model/ErrorTypeElement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ErrorTypeElement.java,v >retrieving revision 1.3 >diff -u -r1.3 ErrorTypeElement.java >--- src/org/eclipse/jdt/internal/compiler/apt/model/ErrorTypeElement.java 13 May 2008 07:00:29 -0000 1.3 >+++ src/org/eclipse/jdt/internal/compiler/apt/model/ErrorTypeElement.java 7 Jul 2010 15:57:11 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2008 IBM Corporation and others. >+ * Copyright (c) 2007, 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 >@@ -27,6 +27,7 @@ > import javax.lang.model.type.TypeMirror; > > import org.eclipse.jdt.internal.compiler.apt.dispatch.BaseProcessingEnvImpl; >+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; > import org.eclipse.jdt.internal.compiler.util.Util; > > /** >@@ -34,9 +35,19 @@ > */ > public class ErrorTypeElement extends TypeElementImpl { > >+ /** >+ * The parent ElementImpl type won't permit a null binding; it has too >+ * many methods that assume binding is non-null. So we use a fake binding. >+ */ >+ private static class NullBinding extends ReferenceBinding { >+ } >+ > ErrorTypeElement(BaseProcessingEnvImpl env) { >- super(env, null, null); >+ // each ErrorTypeElement gets its own NullBinding so that distinct >+ // elements are not .equals() to each other. >+ super(env, new NullBinding(), null); > } >+ > /* (non-Javadoc) > * @see javax.lang.model.element.TypeElement#getInterfaces() > */
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 318134
: 173672