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 155987 Details for
Bug 236385
[compiler] Warn for potential programming problem if an object is created but not used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix for unused anonymous types
patch_236385_2.txt (text/plain), 1.43 KB, created by
Olivier Thomann
on 2010-01-13 10:29:00 EST
(
hide
)
Description:
Proposed fix for unused anonymous types
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-01-13 10:29:00 EST
Size:
1.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java,v >retrieving revision 1.97 >diff -u -r1.97 QualifiedAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 25 Nov 2009 04:56:02 -0000 1.97 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 13 Jan 2010 15:27:58 -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 >@@ -104,6 +104,8 @@ > } > > public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) { >+ if (!valueRequired) >+ currentScope.problemReporter().unusedObjectAllocation(this); > int pc = codeStream.position; > MethodBinding codegenBinding = this.binding.original(); > ReferenceBinding allocatedType = codegenBinding.declaringClass;
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 236385
:
110739
|
111358
|
153869
|
155923
|
155983
|
155987
|
155989
|
156030