1 package org.unicode.cldr.test; 2 3 import java.util.List; 4 import org.unicode.cldr.test.CheckCLDR.CheckStatus.Subtype; 5 import org.unicode.cldr.util.CldrUtility; 6 7 public class CheckForInheritanceMarkers extends CheckCLDR { 8 9 @Override handleCheck( String path, String fullPath, String value, Options options, List<CheckStatus> result)10 public CheckCLDR handleCheck( 11 String path, String fullPath, String value, Options options, List<CheckStatus> result) { 12 if (value == null) { 13 return this; 14 } 15 if (!accept(result)) return this; 16 17 if (value.contains(CldrUtility.INHERITANCE_MARKER)) { 18 result.add( 19 new CheckStatus() 20 .setCause(this) 21 .setMainType(CheckStatus.errorType) 22 .setSubtype(Subtype.inheritanceMarkerNotAllowed) 23 .setMessage( 24 "Inheritance marker " 25 + CldrUtility.INHERITANCE_MARKER 26 + " not allowed in a data value.")); 27 } 28 return this; 29 } 30 } 31