SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Java problems   Raw type parameters     Working with the Java compiler     Logging         Static analysis




                                          CS/SE Individual Practical


                                                      Stephen Gilmore
                                                     November 11, 2011
                                      School of Informatics, University of Edinburgh




                                                                         CS/SE Individual Practical
                                                                                                      1 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Java problems


                Common Java problems: raw types




                                                                       CS/SE Individual Practical
                                                                                                    2 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Java problems


                Quick fix: a bad suggestion




                                                                       CS/SE Individual Practical
                                                                                                    3 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Java problems


                Check the constructor documentation




                                                                       CS/SE Individual Practical
                                                                                                    4 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Java problems


                Check the class documentation




                                                                       CS/SE Individual Practical
                                                                                                    5 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Java problems


                What type of array are we adapting?




                                                                       CS/SE Individual Practical
                                                                                                    6 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Java problems


                Type parameter added




                                                                       CS/SE Individual Practical
                                                                                                    7 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                Raw type in method header




                                                                       CS/SE Individual Practical
                                                                                                    8 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                Consult the Java documentation




                                                                       CS/SE Individual Practical
                                                                                                    9 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                Adapter doesn’t work here




                                                                       CS/SE Individual Practical
                                                                                                    10 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                Adapter is an interface




                                                                       CS/SE Individual Practical
                                                                                                    11 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                T is not a class




                                                                       CS/SE Individual Practical
                                                                                                    12 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                Object: the goto class




                                                                       CS/SE Individual Practical
                                                                                                    13 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                T extends Adapter doesn’t work




                                                                       CS/SE Individual Practical
                                                                                                    14 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                “?” — the wild card parameter




                                                                       CS/SE Individual Practical
                                                                                                    15 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                “Quick fix” would have worked here




                                                                       CS/SE Individual Practical
                                                                                                    16 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Raw type parameters


                Same result




                                                                       CS/SE Individual Practical
                                                                                                    17 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Working with the Java compiler


                Setting Java compiler preferences




                                                                       CS/SE Individual Practical
                                                                                                    18 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Working with the Java compiler


                Changing defaults




                                                                       CS/SE Individual Practical
                                                                                                    19 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Working with the Java compiler


                Potential programming problems




                                                                       CS/SE Individual Practical
                                                                                                    20 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Working with the Java compiler


                Tighter checking




                                                                       CS/SE Individual Practical
                                                                                                    21 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Working with the Java compiler


                Bug found




                                                                       CS/SE Individual Practical
                                                                                                    22 / 24
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                    Logging


                    Don’t forget to add logging . . .




                                                                           CS/SE Individual Practical
                                                                                                        23 / 24
.41.02.png
Java problems   Raw type parameters   Working with the Java compiler     Logging         Static analysis
                Static analysis


                Deeper analysis (resource leaks . . . )




                                                                       CS/SE Individual Practical
                                                                                                    24 / 24

Contenu connexe

En vedette

Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Md Hossen
 
Overview of Cloud Storage Enablement and Intelligent Storage Clouds
Overview of Cloud Storage Enablement and Intelligent Storage CloudsOverview of Cloud Storage Enablement and Intelligent Storage Clouds
Overview of Cloud Storage Enablement and Intelligent Storage CloudsTwinStrata
 
cloud computing and android
cloud computing and androidcloud computing and android
cloud computing and androidMohit Singh
 
Seminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant GuptaSeminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant GuptaPrashant Gupta
 
Cloud computing simple ppt
Cloud computing simple pptCloud computing simple ppt
Cloud computing simple pptAgarwaljay
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computingRkrishna Mishra
 

En vedette (8)

Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
 
Overview of Cloud Storage Enablement and Intelligent Storage Clouds
Overview of Cloud Storage Enablement and Intelligent Storage CloudsOverview of Cloud Storage Enablement and Intelligent Storage Clouds
Overview of Cloud Storage Enablement and Intelligent Storage Clouds
 
cloud computing and android
cloud computing and androidcloud computing and android
cloud computing and android
 
Seminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant GuptaSeminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant Gupta
 
Cloud computing simple ppt
Cloud computing simple pptCloud computing simple ppt
Cloud computing simple ppt
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computing
 
cloud computing ppt
cloud computing pptcloud computing ppt
cloud computing ppt
 

Plus de Stephen Gilmore

Feedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLPFeedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLPStephen Gilmore
 
Feedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large PracticalFeedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large PracticalStephen Gilmore
 
More Stochastic Simulation Examples
More Stochastic Simulation ExamplesMore Stochastic Simulation Examples
More Stochastic Simulation ExamplesStephen Gilmore
 
Testing Android apps with Robotium
Testing Android apps with RobotiumTesting Android apps with Robotium
Testing Android apps with RobotiumStephen Gilmore
 
Common Java problems when developing with Android
Common Java problems when developing with AndroidCommon Java problems when developing with Android
Common Java problems when developing with AndroidStephen Gilmore
 
Quick quiz on Objective-C
Quick quiz on Objective-CQuick quiz on Objective-C
Quick quiz on Objective-CStephen Gilmore
 
Getting started with Xcode
Getting started with XcodeGetting started with Xcode
Getting started with XcodeStephen Gilmore
 
Working with databases in Android
Working with databases in AndroidWorking with databases in Android
Working with databases in AndroidStephen Gilmore
 
Crash Course in Objective-C
Crash Course in Objective-CCrash Course in Objective-C
Crash Course in Objective-CStephen Gilmore
 
SELP: Debugging, AVDs and Manifests
SELP: Debugging, AVDs and ManifestsSELP: Debugging, AVDs and Manifests
SELP: Debugging, AVDs and ManifestsStephen Gilmore
 
The Stochastic Simulation Algorithm
The Stochastic Simulation AlgorithmThe Stochastic Simulation Algorithm
The Stochastic Simulation AlgorithmStephen Gilmore
 
Beginning Android Development
Beginning Android DevelopmentBeginning Android Development
Beginning Android DevelopmentStephen Gilmore
 
Computer Science Large Practical coursework
Computer Science Large Practical courseworkComputer Science Large Practical coursework
Computer Science Large Practical courseworkStephen Gilmore
 
Software Engineering Large Practical coursework
Software Engineering Large Practical courseworkSoftware Engineering Large Practical coursework
Software Engineering Large Practical courseworkStephen Gilmore
 
Introduction to the CSLP and the SELP
Introduction to the CSLP and the SELPIntroduction to the CSLP and the SELP
Introduction to the CSLP and the SELPStephen Gilmore
 
Feedback on Part 1 of the Individual Practical
Feedback on Part 1 of the Individual PracticalFeedback on Part 1 of the Individual Practical
Feedback on Part 1 of the Individual PracticalStephen Gilmore
 
Creating and working with databases in Android
Creating and working with databases in AndroidCreating and working with databases in Android
Creating and working with databases in AndroidStephen Gilmore
 
Continuing Android development
Continuing Android developmentContinuing Android development
Continuing Android developmentStephen Gilmore
 
Project management for the individual practical
Project management for the individual practicalProject management for the individual practical
Project management for the individual practicalStephen Gilmore
 

Plus de Stephen Gilmore (20)

Feedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLPFeedback on Part 1 of the CSLP
Feedback on Part 1 of the CSLP
 
Feedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large PracticalFeedback on Part 1 of the Software Engineering Large Practical
Feedback on Part 1 of the Software Engineering Large Practical
 
Arrays in Objective-C
Arrays in Objective-CArrays in Objective-C
Arrays in Objective-C
 
More Stochastic Simulation Examples
More Stochastic Simulation ExamplesMore Stochastic Simulation Examples
More Stochastic Simulation Examples
 
Testing Android apps with Robotium
Testing Android apps with RobotiumTesting Android apps with Robotium
Testing Android apps with Robotium
 
Common Java problems when developing with Android
Common Java problems when developing with AndroidCommon Java problems when developing with Android
Common Java problems when developing with Android
 
Quick quiz on Objective-C
Quick quiz on Objective-CQuick quiz on Objective-C
Quick quiz on Objective-C
 
Getting started with Xcode
Getting started with XcodeGetting started with Xcode
Getting started with Xcode
 
Working with databases in Android
Working with databases in AndroidWorking with databases in Android
Working with databases in Android
 
Crash Course in Objective-C
Crash Course in Objective-CCrash Course in Objective-C
Crash Course in Objective-C
 
SELP: Debugging, AVDs and Manifests
SELP: Debugging, AVDs and ManifestsSELP: Debugging, AVDs and Manifests
SELP: Debugging, AVDs and Manifests
 
The Stochastic Simulation Algorithm
The Stochastic Simulation AlgorithmThe Stochastic Simulation Algorithm
The Stochastic Simulation Algorithm
 
Beginning Android Development
Beginning Android DevelopmentBeginning Android Development
Beginning Android Development
 
Computer Science Large Practical coursework
Computer Science Large Practical courseworkComputer Science Large Practical coursework
Computer Science Large Practical coursework
 
Software Engineering Large Practical coursework
Software Engineering Large Practical courseworkSoftware Engineering Large Practical coursework
Software Engineering Large Practical coursework
 
Introduction to the CSLP and the SELP
Introduction to the CSLP and the SELPIntroduction to the CSLP and the SELP
Introduction to the CSLP and the SELP
 
Feedback on Part 1 of the Individual Practical
Feedback on Part 1 of the Individual PracticalFeedback on Part 1 of the Individual Practical
Feedback on Part 1 of the Individual Practical
 
Creating and working with databases in Android
Creating and working with databases in AndroidCreating and working with databases in Android
Creating and working with databases in Android
 
Continuing Android development
Continuing Android developmentContinuing Android development
Continuing Android development
 
Project management for the individual practical
Project management for the individual practicalProject management for the individual practical
Project management for the individual practical
 

Dernier

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Dernier (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Fixing errors in Android Java applications

  • 1. Java problems Raw type parameters Working with the Java compiler Logging Static analysis CS/SE Individual Practical Stephen Gilmore November 11, 2011 School of Informatics, University of Edinburgh CS/SE Individual Practical 1 / 24
  • 2. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Java problems Common Java problems: raw types CS/SE Individual Practical 2 / 24
  • 3. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Java problems Quick fix: a bad suggestion CS/SE Individual Practical 3 / 24
  • 4. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Java problems Check the constructor documentation CS/SE Individual Practical 4 / 24
  • 5. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Java problems Check the class documentation CS/SE Individual Practical 5 / 24
  • 6. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Java problems What type of array are we adapting? CS/SE Individual Practical 6 / 24
  • 7. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Java problems Type parameter added CS/SE Individual Practical 7 / 24
  • 8. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters Raw type in method header CS/SE Individual Practical 8 / 24
  • 9. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters Consult the Java documentation CS/SE Individual Practical 9 / 24
  • 10. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters Adapter doesn’t work here CS/SE Individual Practical 10 / 24
  • 11. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters Adapter is an interface CS/SE Individual Practical 11 / 24
  • 12. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters T is not a class CS/SE Individual Practical 12 / 24
  • 13. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters Object: the goto class CS/SE Individual Practical 13 / 24
  • 14. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters T extends Adapter doesn’t work CS/SE Individual Practical 14 / 24
  • 15. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters “?” — the wild card parameter CS/SE Individual Practical 15 / 24
  • 16. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters “Quick fix” would have worked here CS/SE Individual Practical 16 / 24
  • 17. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Raw type parameters Same result CS/SE Individual Practical 17 / 24
  • 18. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Working with the Java compiler Setting Java compiler preferences CS/SE Individual Practical 18 / 24
  • 19. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Working with the Java compiler Changing defaults CS/SE Individual Practical 19 / 24
  • 20. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Working with the Java compiler Potential programming problems CS/SE Individual Practical 20 / 24
  • 21. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Working with the Java compiler Tighter checking CS/SE Individual Practical 21 / 24
  • 22. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Working with the Java compiler Bug found CS/SE Individual Practical 22 / 24
  • 23. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Logging Don’t forget to add logging . . . CS/SE Individual Practical 23 / 24 .41.02.png
  • 24. Java problems Raw type parameters Working with the Java compiler Logging Static analysis Static analysis Deeper analysis (resource leaks . . . ) CS/SE Individual Practical 24 / 24