/**
   * Merge with another validation report
   *
   * @param other the report to merge with
   */
  public void mergeWith(final ValidationReport other) {
    if (fatal) return;

    if (other.fatal) {
      msgMap.clear();
      fatal = true;
    }

    msgMap.putAll(other.msgMap);
  }
 private void leaveCompilationUnit() {
   if (!hasNativeMethod) {
     for (ClassTree classTree : classes) {
       checkClassFields(classTree);
     }
   }
   classes.clear();
   assignments.clear();
   hasNativeMethod = false;
 }
  /**
   * Add one validation message to the report
   *
   * @param message the message
   * @return true if the added message is fatal, or if {@link #fatal} is already {@code true}
   */
  public boolean addMessage(final Message message) {
    if (fatal) return true;

    if (message.isFatal()) {
      fatal = true;
      msgMap.clear();
    }
    msgMap.put(path, message);
    return fatal;
  }
Exemple #4
0
 @After
 public void cleanup() throws Exception {
   fs.delete(baseDir, true);
   originalData.clear();
 }
 @Override
 public void clear() {
   backingMap.clear();
 }
 @Override
 protected void tearDown() throws Exception {
   nodesByType.clear();
   OuterReferenceResolver.cleanup();
 }
 /**
  * Sets this BindsConfig to be identical to other
  *
  * @param other The BindsConfig to copy
  */
 public void setBinds(BindsConfig other) {
   data.clear();
   data.putAll(other.data);
 }