@Test public void testGetHardcodeSearchPattern() throws Exception { Pattern p = HardcodedStackVersionPropertiesCheck.getHardcodeSearchPattern(currentVersion); assertEquals(p.pattern(), "(?<!-Dhdp\\.version=)2\\.3\\.4\\.0-1234"); }
public static Pattern getHardcodeSearchPattern(String hdpVersion) { return Pattern.compile("(?<!-Dhdp\\.version=)" + hdpVersion.replace(".", "\\.")); }
HardcodedStackVersionPropertiesCheck extends AbstractCheckDescriptor { public static Pattern getHardcodeSearchPattern(String hdpVersion) { return Pattern.compile("(?<!-Dhdp\\.version=)" + hdpVersion.replace(".", "\\.")); } }
HardcodedStackVersionPropertiesCheck extends AbstractCheckDescriptor { public static Pattern getHardcodeSearchPattern(String hdpVersion) { return Pattern.compile("(?<!-Dhdp\\.version=)" + hdpVersion.replace(".", "\\.")); } HardcodedStackVersionPropertiesCheck(); }
HardcodedStackVersionPropertiesCheck extends AbstractCheckDescriptor { public static Pattern getHardcodeSearchPattern(String hdpVersion) { return Pattern.compile("(?<!-Dhdp\\.version=)" + hdpVersion.replace(".", "\\.")); } HardcodedStackVersionPropertiesCheck(); @Override void perform(PrerequisiteCheck prerequisiteCheck, PrereqCheckRequest request); static Pattern getHardcodeSearchPattern(String hdpVersion); static boolean stringContainsVersionHardcode(String string, Pattern searchPattern); }
HardcodedStackVersionPropertiesCheck extends AbstractCheckDescriptor { public static Pattern getHardcodeSearchPattern(String hdpVersion) { return Pattern.compile("(?<!-Dhdp\\.version=)" + hdpVersion.replace(".", "\\.")); } HardcodedStackVersionPropertiesCheck(); @Override void perform(PrerequisiteCheck prerequisiteCheck, PrereqCheckRequest request); static Pattern getHardcodeSearchPattern(String hdpVersion); static boolean stringContainsVersionHardcode(String string, Pattern searchPattern);  }