The Artima Developer Community
Sponsored Link

Java Buzz Forum
Some clever new PMD rules - watch out for Collection.toArray()!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Tom Copeland

Posts: 486
Nickname: tcopeland
Registered: Nov, 2004

Tom Copeland is a junior developer.
Some clever new PMD rules - watch out for Collection.toArray()! Posted: Nov 29, 2005 8:59 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Tom Copeland.
Original Post: Some clever new PMD rules - watch out for Collection.toArray()!
Feed Title: Junior developer: Java
Feed URL: http://tomcopeland.blogs.com/juniordeveloper/index-java.rdf
Feed Description: System.out.println("Hello world!");
Latest Java Buzz Posts
Latest Java Buzz Posts by Tom Copeland
Latest Posts From Junior developer: Java

Advertisement
Fabio Insaccanebbia contributed some nifty new PMD rules in the past day or two. The first one catches code like this: void bar() { Collection c=new ArrayList(); c.add(Integer obj=new Integer(1)); Integer[] a=(Integer [])c.toArray(); // oops! } See the problem? Collection.toArray()...

Read: Some clever new PMD rules - watch out for Collection.toArray()!

Topic: [Nov 17, 2005 14:38 PST] 9 Links Previous Topic   Next Topic Topic: Raw Hits to DrunkAndRetired.com [Flickr]

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use