protected void validatePatch(List<SchemaPatch> patches, SchemaPatch testPatch) { if (testPatch.getPriorVersion() > testPatch.getNextVersion()) { throw new TajoInternalError("Prior version cannot proceed to next version of patch."); } for (SchemaPatch patch : patches) { if (testPatch.equals(patch)) { continue; } if (testPatch.getPriorVersion() == patch.getPriorVersion()) { LOG.warn("It has the same prior version (" + testPatch.getPriorVersion() + ") of patch."); if (testPatch.getNextVersion() == patch.getNextVersion()) { throw new TajoInternalError( "Duplicate versions of patch found. It will terminate Catalog Store. "); } } if (testPatch.getNextVersion() == patch.getNextVersion()) { LOG.warn("It has the same next version (" + testPatch.getPriorVersion() + ") of patch."); } } }