1<!-- 2 3 Licensed to the Apache Software Foundation (ASF) under one 4 or more contributor license agreements. See the NOTICE file 5 distributed with this work for additional information 6 regarding copyright ownership. The ASF licenses this file 7 to you under the Apache License, Version 2.0 (the 8 "License"); you may not use this file except in compliance 9 with the License. You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, 14 software distributed under the License is distributed on an 15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 KIND, either express or implied. See the License for the 17 specific language governing permissions and limitations 18 under the License. 19 20--> 21<!-- TODO: We should be putting findBugs exclusions --> 22<!-- as annotations in the source code. But that takes JDK 1.5+. --> 23 24<FindBugsFilter> 25 26 <!-- don't worry about deprecated things --> 27 <Match> 28 <Or> 29 <Package name="org.apache.velocity.app.tools"/> 30 <Package name="org.apache.velocity.anakia"/> 31 <Package name="org.apache.velocity.convert"/> 32 <Package name="org.apache.velocity.servlet"/> 33 <Package name="org.apache.velocity.texen"/> 34 </Or> 35 </Match> 36 37 <!-- ignore the JavaCC generated "bugs" --> 38 <Match> 39 <Package name="org.apache.velocity.runtime.parser"/> 40 <Or> 41 <Bug pattern="NM_METHOD_NAMING_CONVENTION"/> 42 <Bug pattern="EI_EXPOSE_REP2"/> 43 <Bug pattern="MS_PKGPROTECT"/> 44 <Bug pattern="MS_OOI_PKGPROTECT"/> 45 <Bug pattern="URF_UNREAD_FIELD"/> 46 <Bug pattern="MS_MUTABLE_ARRAY"/> 47 <Bug pattern="URF_UNREAD_FIELD"/> 48 <Bug pattern="BC_UNCONFIRMED_CAST"/> 49 <Bug pattern="DB_DUPLICATE_SWITCH_CLAUSES"/> 50 <Bug pattern="DLS_DEAD_LOCAL_STORE"/> 51 </Or> 52 </Match> 53 54 <!-- these just aren't worth changing right now --> 55 <Match> 56 <Class name="org.apache.velocity.app.event.ReferenceInsertionEventHandler$referenceInsertExecutor"/> 57 <Bug pattern="NM_CLASS_NAMING_CONVENTION"/> 58 </Match> 59 <Match> 60 <Or> 61 <Class name="org.apache.velocity.runtime.directive.VelocimacroProxy"/> 62 <Class name="org.apache.velocity.runtime.parser.ParseException"/> 63 <Class name="org.apache.velocity.runtime.parser.Parser"/> 64 <Class name="org.apache.velocity.util.introspection.SecureIntrospectorImpl"/> 65 </Or> 66 <Bug pattern="EI_EXPOSE_REP2"/> 67 </Match> 68 <Match> 69 <Class name="org.apache.velocity.runtime.parser.ParseException"/> 70 <Or> 71 <Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION"/> 72 <Bug pattern="SE_BAD_FIELD"/> 73 </Or> 74 </Match> 75 <Match> 76 <Class name="org.apache.velocity.runtime.RuntimeInstance"/> 77 <Bug pattern="UI_INHERITANCE_UNSAFE_GETRESOURCE"/> 78 </Match> 79 <Match> 80 <Class name="org.apache.velocity.util.StringUtils"/> 81 <Bug pattern="DM_CONVERT_CASE"/> 82 </Match> 83 84 <!-- there's actually good reason for these --> 85 <Match> 86 <Class name="org.apache.velocity.runtime.parser.node.ASTReference"/> 87 <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/> 88 </Match> 89 <Match> 90 <Class name="org.apache.velocity.util.introspection.ClassMap$MethodCache"/> 91 <Bug pattern="URF_UNREAD_FIELD"/> 92 </Match> 93 <Match> 94 <Class name="org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader"/> 95 <Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"/> 96 </Match> 97 <Match> 98 <Class name="org.apache.velocity.runtime.directive.Define$Block"/> 99 <Bug pattern="NP_TOSTRING_COULD_RETURN_NULL"/> 100 </Match> 101 <Match> 102 <Class name="org.apache.velocity.runtime.resource.loader.FileResourceLoader"/> 103 <Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE"/> 104 </Match> 105 <Match> 106 <Class name="org.apache.velocity.util.MapFactory"/> 107 <Or> 108 <Bug pattern="DE_MIGHT_IGNORE"/> 109 <Bug pattern="REC_CATCH_EXCEPTION"/> 110 </Or> 111 </Match> 112 <Match> 113 <Class name="org.apache.velocity.util.introspection.SecureUberspector"/> 114 <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/> 115 </Match> 116 <Match> 117 <Class name="org.apache.velocity.runtime.VelocimacroFactory"/> 118 <Bug pattern="IS2_INCONSISTENT_SYNC"/> 119 </Match> 120 121</FindBugsFilter> 122