@@ -71,12 +71,18 @@ public boolean isIgnored(final DiffNode node)
7171 private boolean isIncluded (final DiffNode node )
7272 {
7373 // Patched : Check if there are inclusions before browsing all included elements
74- if (hasInclusions ()) {
75- if (node .isRootNode ()) {
74+ if (hasInclusions ())
75+ {
76+ if (node .isRootNode ())
77+ {
7678 return true ;
77- } else if (isIncludedByPath (node ) || isIncludedByCategory (node )) {
79+ }
80+ else if (isIncludedByPath (node ) || isIncludedByCategory (node ))
81+ {
7882 return true ;
79- } else if (isIncludedByType (node ) || isIncludedByPropertyName (node )) {
83+ }
84+ else if (isIncludedByType (node ) || isIncludedByPropertyName (node ))
85+ {
8086 return true ;
8187 }
8288 return false ;
@@ -87,30 +93,31 @@ private boolean isIncluded(final DiffNode node)
8793 private boolean isExcluded (final DiffNode node )
8894 {
8995 // Patched : Check if there are exclusions before browsing all excluded elements
90- if (hasExclusions ()) {
91- if (isExcludedByPath (node ) || isExcludedByCategory (node )) {
96+ if (hasExclusions ())
97+ {
98+ if (isExcludedByPath (node ) || isExcludedByCategory (node ))
99+ {
92100 return true ;
93- } else if (isExcludedByType (node ) || isExcludedByPropertyName (node )) {
101+ }
102+ else if (isExcludedByType (node ) || isExcludedByPropertyName (node ))
103+ {
94104 return true ;
95105 }
96106 }
97107 return false ;
98108 }
99109
100- private boolean hasInclusions () {
110+ private boolean hasInclusions ()
111+ {
101112 // Patched : Now return if inclusions have been configured
102113 return nodePathInclusion || categoryInclusion || typeInclusion || propertyNameInclusion ;
103114 }
104-
105- private boolean hasExclusions () {
106- // Patched (New method) : Now return if exclusions have been configured
107- return nodePathExclusion || categoryExclusion || typeExclusion || propertyNameExclusion ;
108- }
109115
110116 private boolean isIncludedByPath (final DiffNode node )
111117 {
112118 // Patched : First check if nodePath inclusions have been configured
113- if (nodePathInclusion && nodeInclusions .getNodeForPath (node .getPath ()).isIncluded ()) {
119+ if (nodePathInclusion && nodeInclusions .getNodeForPath (node .getPath ()).isIncluded ())
120+ {
114121 return true ;
115122 }
116123 return false ;
@@ -119,7 +126,8 @@ private boolean isIncludedByPath(final DiffNode node)
119126 private boolean isIncludedByCategory (final DiffNode node )
120127 {
121128 // Patched : First check if category inclusions have been configured
122- if (categoryInclusion && hasCategoryWithInclusion (node , INCLUDED )) {
129+ if (categoryInclusion && hasCategoryWithInclusion (node , INCLUDED ))
130+ {
123131 return true ;
124132 }
125133 return false ;
@@ -128,7 +136,8 @@ private boolean isIncludedByCategory(final DiffNode node)
128136 private boolean isIncludedByType (final DiffNode node )
129137 {
130138 // Patched : First check if type inclusions have been configured
131- if (typeInclusion && typeInclusions .get (node .getValueType ()) == INCLUDED ) {
139+ if (typeInclusion && typeInclusions .get (node .getValueType ()) == INCLUDED )
140+ {
132141 return true ;
133142 }
134143 return false ;
@@ -137,22 +146,34 @@ private boolean isIncludedByType(final DiffNode node)
137146 private boolean isIncludedByPropertyName (final DiffNode node )
138147 {
139148 // Patched : First check if property name inclusions have been configured
140- if (propertyNameInclusion ) {
141- if (isIncludedByOwnPropertyName (node )) {
149+ if (propertyNameInclusion )
150+ {
151+ if (isIncludedByOwnPropertyName (node ))
152+ {
142153 return true ;
143- } else if (isIncludedByParentPropertyName (node )) {
154+ }
155+ else if (isIncludedByParentPropertyName (node ))
156+ {
144157 return true ;
145158 }
146159 }
147160 return false ;
148161 }
149162
163+ private boolean hasExclusions ()
164+ {
165+ // Patched (New method) : Now return if exclusions have been configured
166+ return nodePathExclusion || categoryExclusion || typeExclusion || propertyNameExclusion ;
167+ }
168+
150169 private boolean isExcludedByPath (final DiffNode node )
151170 {
152171 // Patched : First check if node path exclusions have been configured
153- if (nodePathExclusion ) {
172+ if (nodePathExclusion )
173+ {
154174 final InclusionNode valueNode = nodeInclusions .getNodeForPath (node .getPath ());
155- if (valueNode .isExcluded () && !valueNode .containsValue (INCLUDED )) {
175+ if (valueNode .isExcluded () && !valueNode .containsValue (INCLUDED ))
176+ {
156177 return true ;
157178 }
158179 }
@@ -162,7 +183,8 @@ private boolean isExcludedByPath(final DiffNode node)
162183 private boolean isExcludedByCategory (final DiffNode node )
163184 {
164185 // Patched : First check if category exclusions have been configured
165- if (categoryExclusion && hasCategoryWithInclusion (node , EXCLUDED )) {
186+ if (categoryExclusion && hasCategoryWithInclusion (node , EXCLUDED ))
187+ {
166188 return true ;
167189 }
168190 return false ;
@@ -171,7 +193,8 @@ private boolean isExcludedByCategory(final DiffNode node)
171193 private boolean isExcludedByType (final DiffNode node )
172194 {
173195 // Patched : First check if type exclusions have been configured
174- if (typeExclusion && node .getValueType () != null ) {
196+ if (typeExclusion && node .getValueType () != null )
197+ {
175198 return typeInclusions .get (node .getValueType ()) == EXCLUDED ;
176199 }
177200 return false ;
@@ -180,9 +203,11 @@ private boolean isExcludedByType(final DiffNode node)
180203 private boolean isExcludedByPropertyName (final DiffNode node )
181204 {
182205 // Patched : First check if property name exclusions have been configured
183- if (propertyNameExclusion ) {
206+ if (propertyNameExclusion )
207+ {
184208 final String propertyName = node .getPropertyName ();
185- if (propertyName != null ) {
209+ if (propertyName != null )
210+ {
186211 return propertyNameInclusions .get (propertyName ) == EXCLUDED ;
187212 }
188213 }
0 commit comments