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 18440 Details for
Bug 87042
Passing null as first vararg makes parameter null (3.1M4)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Pass null when its the only argument
Statement.patch (text/plain), 861 bytes, created by
Michael Fraenkel
on 2005-03-03 10:56:02 EST
(
hide
)
Description:
Pass null when its the only argument
Filename:
MIME Type:
Creator:
Michael Fraenkel
Created:
2005-03-03 10:56:02 EST
Size:
861 bytes
patch
obsolete
>Index: Statement.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java,v >retrieving revision 1.33 >diff -u -r1.33 Statement.java >--- Statement.java 23 Feb 2005 02:47:28 -0000 1.33 >+++ Statement.java 3 Mar 2005 15:53:25 -0000 >@@ -63,7 +63,7 @@ > if (argLength >= paramLength) { > // right number of arguments - could be inexact - pass argument as is > TypeBinding lastType = arguments[varArgIndex].resolvedType; >- if (lastType == NullBinding >+ if ((lastType == NullBinding && (argLength - varArgIndex) == 1) > || (varArgsType.dimensions() == lastType.dimensions() > && lastType.isCompatibleWith(varArgsType))) { > // foo(1, new int[]{2, 3}) or foo(1, null) --> last arg is passed as-is
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 87042
: 18440