Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for Bad Cast #3

Closed
GoogleCodeExporter opened this issue Jul 20, 2015 · 4 comments
Closed

False positive for Bad Cast #3

GoogleCodeExporter opened this issue Jul 20, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Run FindBugs GUI on the "mail" module of Project GlassFish
(http://glassfish.dev.java.net).

There are several instances of code such as the following:

        if (message instanceof SMTPMessage)
            from = ((SMTPMessage)message).getEnvelopeFrom();


What is the expected output? What do you see instead?

Complains about an unchecked cast.


What version of the product are you using? On what operating system?

FindBugs 1.1.1, JDK 1.5.0_07, Solaris 10


Please provide any additional information below.


Original issue reported on code.google.com by bs00...@gmail.com on 23 Oct 2006 at 8:11

@GoogleCodeExporter
Copy link
Author

Darn, how do I fix the summary for this issue?

Original comment by bs00...@gmail.com on 23 Oct 2006 at 8:12

@GoogleCodeExporter
Copy link
Author

I need some more information to understand this report. Ideally, a sample Java 
file and an XML report generated 
by FindBugs.

Alternatively, just give me the specific file and line number within Glassfish 
where you are getting this false 
positive.

Original comment by bill.p...@gmail.com on 16 Dec 2006 at 8:54

  • Changed title: False positive for Bad Cast
  • Changed state: NeedInfo
  • Added labels: Type-FalsePositive
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

This occurs in com.sun.mail.smtp.SMTPTransport, in method mailFrom, about line 
750:
https://glassfish.dev.java.net/source/browse/glassfish/mail/src/java/com/sun/mai
l/smtp/SMTPTransport.java?view=markup
It complains about the cast to SMTPMessage, even though it's checked with 
instanceof
the line before.

Original comment by bs00...@gmail.com on 20 Jan 2007 at 1:58

@GoogleCodeExporter
Copy link
Author

Thanks for the report, but please report this bug at sourceforge bug tracker 
again. This tracker is not used / monitored.

Original comment by iloveeclipse on 23 Nov 2011 at 10:05

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant