PMD Results

The following document contains the results of PMD 5.3.2.

Files

Async::Async Market::EJB - ejava/examples/asyncmarket/ejb/AuctionMgmtEJB.java

Violation Line
Avoid unused imports such as 'java.util.concurrent.ExecutionException' 10
Avoid unused imports such as 'javax.ejb.AsyncResult' 15
Avoid empty catch blocks 205

Async::Async Market::EJB - ejava/examples/asyncmarket/ejb/AuctionMgmtRemote.java

Violation Line
Avoid unused imports such as 'java.util.Date' 3
Avoid unused imports such as 'java.util.concurrent.Future' 4

Async::Async Market::EJB - ejava/examples/asyncmarket/ejb/BuyerEJB.java

Violation Line
Avoid unused method parameters such as 'bid'. 174
Avoid unused method parameters such as 'order'. 198

Async::Async Market::EJB - ejava/examples/asyncmarket/ejb/SellerEJB.java

Violation Line
Avoid empty catch blocks 251

Async::Async Market::WAR - ejava/examples/asyncmarket/web/AuctionAdminHandlerServlet.java

Violation Line
Avoid unused local variables such as 'ctx'. 60

Async::Async Market::WAR - ejava/examples/asyncmarket/web/BuyerHandlerServlet.java

Violation Line
Avoid unused local variables such as 'ctx'. 68

Async::Async Market::WAR - ejava/examples/asyncmarket/web/JNDIHelper.java

Violation Line
Avoid unused imports such as 'ejava.examples.asyncmarket.ejb.AuctionMgmtLocal' 18
Avoid unused imports such as 'ejava.examples.asyncmarket.ejb.BuyerLocal' 20
Avoid unused imports such as 'ejava.examples.asyncmarket.ejb.SellerLocal' 22
Avoid unused imports such as 'ejava.examples.asyncmarket.ejb.UserMgmtLocal' 24
Avoid unused method parameters such as 'lazz'. 99

Async::Async Market::WAR - ejava/examples/asyncmarket/web/SellerHandlerServlet.java

Violation Line
An empty statement (semicolon) not part of a loop 52
Avoid unused local variables such as 'ctx'. 62

Async::JMS (Topic) Notifier - ejava/examples/jmsnotifier/Subscriber.java

Violation Line
Avoid empty catch blocks 95
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 181

Common::Ejava Utilities - ejava/util/jndi/JNDIUtil.java

Violation Line
Avoid empty catch blocks 90
Avoid empty catch blocks 124

EJB::CDI Example::WAR - info/ejava/examples/ejb/cdisales/dao/ProductCatalogDAO.java

Violation Line
Avoid unused imports such as 'javax.enterprise.inject.Alternative' 10

EJB::CDI Example::WAR - info/ejava/examples/ejb/cdisales/dao/UserMgmtDAO.java

Violation Line
Avoid unused imports such as 'javax.enterprise.inject.Vetoed' 11

EJB::Config Example::ENC EJB - ejava/ejb/examples/encconfig/ejb/AnnotatedEJB.java

Violation Line
Avoid unused private fields such as 'ctx'. 28
Useless parentheses. 105
Useless parentheses. 106

EJB::Config Example::ENC EJB - ejava/ejb/examples/encconfig/ejb/JNDIReader.java

Violation Line
Useless parentheses. 57
Useless parentheses. 65
Useless parentheses. 66

EJB::Config Example::ENC EJB - ejava/ejb/examples/encconfig/ejb/XMLConfiguredEJB.java

Violation Line
Useless parentheses. 92
Useless parentheses. 93

EJB::ENC Config Lab::Exercise:EJB - org/myorg/encconfig/ejb/ConfigBeanEJB.java

Violation Line
Avoid unused imports such as 'javax.ejb.Stateless' 4

EJB::ENC Config Lab::Exercise:EJB - org/myorg/encconfig/ejb/ENCAuditorEJB.java

Violation Line
Avoid unused imports such as 'javax.annotation.PostConstruct' 3
Avoid unused imports such as 'javax.annotation.Resource' 4
Avoid unused imports such as 'javax.persistence.PersistenceContext' 9
Overriding method merely calls super 6264

EJB::ENC Config Lab::Exercise:EJB - org/myorg/encconfig/ejb/JNDIAuditorEJB.java

Violation Line
Avoid unused imports such as 'javax.annotation.PostConstruct' 3
Avoid unused private fields such as 'ctx'. 26
Overriding method merely calls super 7375

EJB::ENC Config Lab::Exercise:EJB - org/myorg/encconfig/ejb/LookupAuditorEJB.java

Violation Line
Avoid unused imports such as 'javax.annotation.PostConstruct' 3
Avoid unused imports such as 'javax.annotation.Resource' 5
Avoid unused imports such as 'javax.persistence.PersistenceContext' 10
Overriding method merely calls super 6365

EJB::ENC Config Lab::Exercise:EJB - org/myorg/encconfig/ejb/XMLInjectAuditorEJB.java

Violation Line
Overriding method merely calls super 4446

EJB::ENC Config Lab::Solution::EJB - org/myorg/encconfig/ejb/ENCAuditorEJB.java

Violation Line
Overriding method merely calls super 5759

EJB::ENC Config Lab::Solution::EJB - org/myorg/encconfig/ejb/JNDIAuditorEJB.java

Violation Line
Overriding method merely calls super 6870

EJB::ENC Config Lab::Solution::EJB - org/myorg/encconfig/ejb/LookupAuditorEJB.java

Violation Line
Overriding method merely calls super 5759

EJB::ENC Config Lab::Solution::EJB - org/myorg/encconfig/ejb/XMLInjectAuditorEJB.java

Violation Line
Overriding method merely calls super 4648

EJB::Interceptors Example::EJB - info/ejava/examples/ejb/interceptor/bo/Contact.java

Violation Line
Avoid unused private methods such as 'normalizeName()'. 56

EJB::Interceptors Example::EJB - info/ejava/examples/ejb/interceptor/interceptors/ContactsNormalizerInterceptor.java

Violation Line
Avoid empty finally blocks 5254

EJB::Interceptors Example::EJB - info/ejava/examples/ejb/interceptor/interceptors/ValidatorInterceptor.java

Violation Line
Avoid empty finally blocks 5860

EJB::JPA Example::WAR - info/ejava/examples/ejb/ejbjpa/ejb/HotelInitEJB.java

Violation Line
Avoid empty finally blocks 74
Avoid empty finally blocks 101

EJB::JPA Tickets Lab::Exercise::EJB - org/myorg/jpatickets/ejb/EventMgmtEJB.java

Violation Line
Avoid unused imports such as 'javax.persistence.PersistenceContext' 13
Avoid unused imports such as 'org.myorg.jpatickets.bo.Seat' 19

EJB::JPA Tickets Lab::Exercise::EJB - org/myorg/jpatickets/ejb/VenueMgmtEJB.java

Violation Line
Avoid unused imports such as 'javax.persistence.PersistenceContext' 8

EJB::JPA Tickets Lab::Exercise::Impl - org/myorg/jpatickets/bo/Address.java

Violation Line
Useless parentheses. 76
Useless parentheses. 77
Useless parentheses. 78
Useless parentheses. 79

EJB::JPA Tickets Lab::Exercise::Impl - org/myorg/jpatickets/bo/Event.java

Violation Line
Avoid unused imports such as 'java.io.Serializable' 3

EJB::JPA Tickets Lab::Exercise::Impl - org/myorg/jpatickets/bo/Seat.java

Violation Line
Useless parentheses. 52
Useless parentheses. 53
Useless parentheses. 54
Useless parentheses. 55

EJB::JPA Tickets Lab::Exercise::Impl - org/myorg/jpatickets/bo/SeatPK.java

Violation Line
Useless parentheses. 51
Useless parentheses. 52
Useless parentheses. 53
Useless parentheses. 54

EJB::JPA Tickets Lab::Exercise::Impl - org/myorg/jpatickets/bo/TicketPK.java

Violation Line
Useless parentheses. 36
Useless parentheses. 37

EJB::JPA Tickets Lab::Exercise::Impl - org/myorg/jpatickets/bo/Venue.java

Violation Line
Useless parentheses. 59
Useless parentheses. 60

EJB::JPA Tickets Lab::Solution::EJB - org/myorg/jpatickets/ejb/EventMgmtEJB.java

Violation Line
Avoid unused imports such as 'org.myorg.jpatickets.bo.Seat' 19

EJB::JPA Tickets Lab::Solution::Impl - org/myorg/jpatickets/bo/Address.java

Violation Line
Useless parentheses. 76
Useless parentheses. 77
Useless parentheses. 78
Useless parentheses. 79

EJB::JPA Tickets Lab::Solution::Impl - org/myorg/jpatickets/bo/Seat.java

Violation Line
Useless parentheses. 52
Useless parentheses. 53
Useless parentheses. 54
Useless parentheses. 55

EJB::JPA Tickets Lab::Solution::Impl - org/myorg/jpatickets/bo/SeatPK.java

Violation Line
Useless parentheses. 51
Useless parentheses. 52
Useless parentheses. 53
Useless parentheses. 54

EJB::JPA Tickets Lab::Solution::Impl - org/myorg/jpatickets/bo/TicketPK.java

Violation Line
Useless parentheses. 36
Useless parentheses. 37

EJB::JPA Tickets Lab::Solution::Impl - org/myorg/jpatickets/bo/Venue.java

Violation Line
Useless parentheses. 59
Useless parentheses. 60

EJB::Security::Secure Ping Client::EJB - info/ejava/examples/secureping/ejb/SecurePingClientEJB.java

Violation Line
No need to import a type that lives in the same package 3

EJB::Transactions Example::EJB - info/ejava/examples/ejb/tx/ejb/BmtCreateEJB.java

Violation Line
Avoid unused imports such as 'javax.transaction.HeuristicMixedException' 16
Avoid unused imports such as 'javax.transaction.HeuristicRollbackException' 17
Avoid unused imports such as 'javax.transaction.NotSupportedException' 18
Avoid unused imports such as 'javax.transaction.RollbackException' 19
Avoid unused imports such as 'javax.transaction.Status' 20
Avoid unused imports such as 'javax.transaction.SystemException' 21

EJB::Transactions Example::EJB - info/ejava/examples/ejb/tx/ejb/GetEJB.java

Violation Line
Avoid unused imports such as 'javax.persistence.Tuple' 17
Avoid unused imports such as 'javax.persistence.TypedQuery' 18

EJB::Session EJB Bank::EJB - ejava/examples/ejbsessionbank/ejb/TellerEJB.java

Violation Line
Avoid empty if statements 268270

EJB::Session EJB Bank::WAR - ejava/examples/ejbsessionbank/web/TellerHandlerServlet.java

Violation Line
Avoid empty catch blocks 139

EJB::Java EE Tx::Tx Hotel::BLImpl - ejava/examples/txagent/blimpl/AgentSessionImpl.java

Violation Line
Avoid unnecessary temporaries when converting primitives to Strings 60
Avoid empty finally blocks 7981

EJB::Java EE Tx::Tx Hotel::BLImpl - ejava/examples/txhotel/blimpl/HotelReservationImpl.java

Violation Line
Avoid unnecessary temporaries when converting primitives to Strings 89

EJB::Web-oriented EJB::JAX-RS Inventory WAR - ejava/examples/ejbwar/inventory/bo/Categories.java

Violation Line
No need to import a type that lives in the same package 13
No need to import a type that lives in the same package 14

EJB::Web-oriented EJB::JAX-RS Inventory WAR - ejava/examples/ejbwar/inventory/bo/Products.java

Violation Line
No need to import a type that lives in the same package 14

EJB::Web-oriented EJB::JAX-RS Inventory WAR - ejava/examples/ejbwar/inventory/rs/PrettyPrinter.java

Violation Line
Avoid empty finally blocks 81

EJB::Web-oriented EJB::Customer EJB - ejava/examples/ejbwar/customer/CustomerResources.java

Violation Line
No need to import a type that lives in the same package 7

Web-Tier::Data Access - ejava/examples/webtier/dao/StudentDAO.java

Violation Line
Avoid modifiers which are implied by the context 9
Avoid modifiers which are implied by the context 10
Avoid modifiers which are implied by the context 11
Avoid modifiers which are implied by the context 12
Avoid modifiers which are implied by the context 13
Avoid modifiers which are implied by the context 1415
Avoid modifiers which are implied by the context 1618

Web-Tier::JPA - ejava/examples/webtier/jpa/JPAUtil.java

Violation Line
Useless parentheses. 49

Web Tier::WAR - ejava/examples/webtier/web/JPAFilter.java

Violation Line
Avoid empty catch blocks 121

Web Tier::WAR - ejava/examples/webtier/web/RegistrarHandlerServlet.java

Violation Line
Avoid empty if statements 4345
Avoid empty if statements 4648
Avoid empty catch blocks 121
Useless parentheses. 191

JPA::DAO::Examples - ejava/examples/daoex/dao/JDBCBookDAOImpl.java

Violation Line
Avoid empty catch blocks 55
Avoid empty catch blocks 56

JPA::EntityManager::Example - ejava/examples/daoex/AuthorDAO.java

Violation Line
Avoid modifiers which are implied by the context 7
Avoid modifiers which are implied by the context 9
Avoid modifiers which are implied by the context 11
Avoid modifiers which are implied by the context 13
Avoid modifiers which are implied by the context 15
Avoid modifiers which are implied by the context 17

JPA::Query::Examples - ejava/jpa/examples/query/Sale.java

Violation Line
Dont create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) 26

JPA::Query::Legacy Examples/Slides - ejava/examples/orm/ejbql/annotated/Sale.java

Violation Line
Dont create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) 15

JPA::Query::Exercise::Solution - myorg/queryex/Actor.java

Violation Line
Avoid unused private fields such as 'id'. 24

JPA::Query::Exercise::Solution - myorg/queryex/Director.java

Violation Line
Avoid unused private fields such as 'id'. 13

JPA::Query::Exercise::Solution - myorg/queryex/Person.java

Violation Line
Useless parentheses. 67
Useless parentheses. 68
Useless parentheses. 69

JPA::Relation::Inheritance Examples - ejava/examples/orm/inheritance/annotated/Album.java

Violation Line
Overriding method merely calls super 2628

JPA::Relation::Inheritance Examples - ejava/examples/orm/inheritance/annotated/Shape.java

Violation Line
Overriding method merely calls super 22

JPA::Relation::Inheritance Examples - ejava/examples/orm/inheritance/annotated/ToothPaste.java

Violation Line
Overriding method merely calls super 1820

JPA::Relation::Examples - ejava/examples/orm/rel/annotated/Photo.java

Violation Line
Avoid unnecessary temporaries when converting primitives to Strings 43

JPA::Relation::Examples - ejava/examples/orm/rel/composite/Room.java

Violation Line
Avoid unused private fields such as 'houseId'. 17

JPA::Relation::Exercise Solution - myorg/relex/collection/Ship.java

Violation Line
Ensure you override both equals() and hashCode() 64

JPA::Relation::Exercise Solution - myorg/relex/collection/ShipByBusinessId.java

Violation Line
Ensure you override both equals() and hashCode() 21

JPA::Relation::Exercise Solution - myorg/relex/collection/ShipByDefault.java

Violation Line
Ensure you override both equals() and hashCode() 19

JPA::Relation::Exercise Solution - myorg/relex/collection/ShipByPK.java

Violation Line
Ensure you override both equals() and hashCode() 21

JPA::Relation::Exercise Solution - myorg/relex/collection/ShipBySwitch.java

Violation Line
Ensure you override both equals() and hashCode() 22

JPA::Relation::Exercise Solution - myorg/relex/one2manybi/SaleItem.java

Violation Line
Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal 49

JPA::Relation::Exercise Solution - myorg/relex/one2one/BoxOffice.java

Violation Line
Avoid unused private fields such as 'pk'. 18

JPA::Relation::Exercise Solution - myorg/relex/one2one/Coach.java

Violation Line
Avoid unused private fields such as 'id'. 15

JPA::Relation::Exercise Solution - myorg/relex/one2one/Employee.java

Violation Line
Avoid unused private fields such as 'id'. 15

JPA::Relation::Exercise Solution - myorg/relex/one2one/ShowTickets.java

Violation Line
Avoid unused private fields such as 'date'. 20
Avoid unused private fields such as 'time'. 24

JPA::Tuning::Example - ejava/jpa/examples/tuning/bo/Actor.java

Violation Line
Avoid unused private fields such as 'id'. 23

JPA::Tuning::Example - ejava/jpa/examples/tuning/bo/Director.java

Violation Line
Avoid unused private fields such as 'id'. 13

JPA::Tuning::Example - ejava/jpa/examples/tuning/bo/Movie.java

Violation Line
Avoid unused private methods such as 'fromDB()'. 53

JPA::Tuning::Example - ejava/jpa/examples/tuning/bo/Person.java

Violation Line
Useless parentheses. 81
Useless parentheses. 82
Useless parentheses. 83
Useless parentheses. 84

JPA::Tuning::Example - ejava/jpa/examples/tuning/dao/MovieDAOImpl.java

Violation Line
Useless parentheses. 273

JPA::Validation::Examples - ejava/jpa/example/validation/CityStateOrZipValidator.java

Violation Line
Useless parentheses. 19

JPA::Validation::Examples - ejava/jpa/example/validation/Purchase.java

Violation Line
Dont create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) 57
An operation on an Immutable object (String, BigDecimal or BigInteger) wont change the object itself 59

Projects::eMarket::eSales Data::DTO - ejava/projects/esales/xml/ESalesParser.java

Violation Line
Useless parentheses. 117

Projects::eMarket::eSales::BLImpl - ejava/projects/esales/blimpl/AccountMgmtImpl.java

Violation Line
An empty statement (semicolon) not part of a loop 20

Projects::eMarket::eSales::DAO - ejava/projects/esales/jdbc/JDBCAccountDAO.java

Violation Line
Always check the return of one of the navigation method (next,previous,first,last) of a ResultSet. 32
Avoid empty catch blocks 82
Avoid empty catch blocks 83
Avoid empty catch blocks 84
Avoid empty catch blocks 85
Avoid empty catch blocks 86