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 171674 Details for
Bug 316330
NPE hovering in JS editor - "Unexpected runtime error while computing a text hover"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch - added null checks
patchFor316330 (text/plain), 3.16 KB, created by
Chris Jaun
on 2010-06-10 17:26:00 EDT
(
hide
)
Description:
patch - added null checks
Filename:
MIME Type:
Creator:
Chris Jaun
Created:
2010-06-10 17:26:00 EDT
Size:
3.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.jsdt.core >Index: src/org/eclipse/wst/jsdt/internal/compiler/lookup/ArrayBinding.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsdt/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ArrayBinding.java,v >retrieving revision 1.15 >diff -u -r1.15 ArrayBinding.java >--- src/org/eclipse/wst/jsdt/internal/compiler/lookup/ArrayBinding.java 10 Jul 2009 18:27:39 -0000 1.15 >+++ src/org/eclipse/wst/jsdt/internal/compiler/lookup/ArrayBinding.java 10 Jun 2010 21:25:28 -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 >@@ -199,42 +199,62 @@ > } > > public FieldBinding[] availableFields() { >- return referenceBinding.availableFields(); >+ if(referenceBinding != null) >+ return referenceBinding.availableFields(); >+ return new FieldBinding[0]; > } > > public MethodBinding[] availableMethods() { >- return referenceBinding.availableMethods(); >+ if(referenceBinding != null) >+ return referenceBinding.availableMethods(); >+ return new MethodBinding[0]; > } > > public int fieldCount() { >- return referenceBinding.fieldCount(); >+ if(referenceBinding != null) >+ return referenceBinding.fieldCount(); >+ return 0; > } > > public FieldBinding[] fields() { >- return referenceBinding.fields(); >+ if(referenceBinding != null) >+ return referenceBinding.fields(); >+ return new FieldBinding[0]; > } > > public InferredType getInferredType() { >- return referenceBinding.getInferredType(); >+ if(referenceBinding != null) >+ return referenceBinding.getInferredType(); >+ return null; > } > > public MethodBinding[] getMethods(char[] selector) { >- return referenceBinding.getMethods(selector); >+ if(referenceBinding != null) >+ return referenceBinding.getMethods(selector); >+ return new MethodBinding[0]; > } > > boolean implementsMethod(MethodBinding method) { >- return referenceBinding.implementsMethod(method); >+ if(referenceBinding != null) >+ return referenceBinding.implementsMethod(method); >+ return false; > } > > public MethodBinding[] methods() { >- return referenceBinding.methods(); >+ if(referenceBinding != null) >+ return referenceBinding.methods(); >+ return new MethodBinding[0]; > } > public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) { >- return referenceBinding.getExactMethod(selector, argumentTypes, refScope); >+ if(referenceBinding != null) >+ return referenceBinding.getExactMethod(selector, argumentTypes, refScope); >+ return null; > } > > public FieldBinding getField(char[] fieldName, boolean needResolve) { >- return referenceBinding.getField(fieldName, needResolve); >+ if(referenceBinding != null) >+ return referenceBinding.getField(fieldName, needResolve); >+ return null; > } > > }
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 316330
:
171542
| 171674