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 190734 Details for
Bug 339250
[null] Incorrect redundant null check warning on a String
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
possible fix
patch339250.txt (text/plain), 1.87 KB, created by
Ayushman Jain
on 2011-03-09 03:03:36 EST
(
hide
)
Description:
possible fix
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-03-09 03:03:36 EST
Size:
1.87 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java,v >retrieving revision 1.60 >diff -u -r1.60 CompoundAssignment.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 22 Jul 2009 17:08:54 -0000 1.60 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 9 Mar 2011 07:57:58 -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 >@@ -42,7 +42,17 @@ > if (this.resolvedType.id != T_JavaLangString) { > this.lhs.checkNPE(currentScope, flowContext, flowInfo); > } >- return ((Reference) this.lhs).analyseAssignment(currentScope, flowContext, flowInfo, this, true).unconditionalInits(); >+ flowInfo = ((Reference) this.lhs).analyseAssignment(currentScope, flowContext, flowInfo, this, true).unconditionalInits(); >+ if (this.resolvedType.id == T_JavaLangString) { >+ LocalVariableBinding local = this.lhs.localVariableBinding(); >+ if (local != null && this.resolvedType.id == T_JavaLangString) { >+ // compound assignment results in a definitely non null value for String >+ flowInfo.markAsDefinitelyNonNull(local); >+ if (flowContext.initsOnFinally != null) >+ flowContext.initsOnFinally.markAsDefinitelyNonNull(local); >+ } >+ } >+ return flowInfo; > } > > public boolean checkCastCompatibility() {
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 339250
:
190734
|
190741