@@ -232,10 +232,6 @@ private FieldEvaluator buildField(
232
232
return fieldEvaluator ;
233
233
}
234
234
235
- private boolean shouldSkip (FieldConstraints constraints ) {
236
- return constraints .getIgnore () == Ignore .IGNORE_ALWAYS ;
237
- }
238
-
239
235
private static boolean shouldIgnoreEmpty (FieldConstraints constraints ) {
240
236
return constraints .getIgnore () == Ignore .IGNORE_IF_UNPOPULATED
241
237
|| constraints .getIgnore () == Ignore .IGNORE_IF_DEFAULT_VALUE ;
@@ -250,6 +246,11 @@ private void buildValue(
250
246
FieldConstraints fieldConstraints ,
251
247
ValueEvaluator valueEvaluator )
252
248
throws CompilationException {
249
+
250
+ if (fieldConstraints .getIgnore () == Ignore .IGNORE_ALWAYS ) {
251
+ return ;
252
+ }
253
+
253
254
processIgnoreEmpty (fieldDescriptor , fieldConstraints , valueEvaluator );
254
255
processFieldExpressions (fieldDescriptor , fieldConstraints , valueEvaluator );
255
256
processEmbeddedMessage (fieldDescriptor , fieldConstraints , valueEvaluator );
@@ -371,7 +372,6 @@ private void processEmbeddedMessage(
371
372
ValueEvaluator valueEvaluatorEval )
372
373
throws CompilationException {
373
374
if (fieldDescriptor .getJavaType () != FieldDescriptor .JavaType .MESSAGE
374
- || shouldSkip (fieldConstraints )
375
375
|| fieldDescriptor .isMapField ()
376
376
|| (fieldDescriptor .isRepeated () && !valueEvaluatorEval .hasNestedRule ())) {
377
377
return ;
@@ -388,7 +388,6 @@ private void processWrapperConstraints(
388
388
ValueEvaluator valueEvaluatorEval )
389
389
throws CompilationException {
390
390
if (fieldDescriptor .getJavaType () != FieldDescriptor .JavaType .MESSAGE
391
- || shouldSkip (fieldConstraints )
392
391
|| fieldDescriptor .isMapField ()
393
392
|| (fieldDescriptor .isRepeated () && !valueEvaluatorEval .hasNestedRule ())) {
394
393
return ;
0 commit comments