Examples of CircularReferenceException


Examples of de.danielbechler.diff.circular.CircularReferenceDetector.CircularReferenceException

  }

  @SuppressWarnings("unchecked")
  private void given_the_delegated_node_is_circular(final NodePath circularStartPath)
  {
    doThrow(new CircularReferenceException(circularStartPath)).when(circularReferenceDetector)
        .push(any(), any(NodePath.class));

    when(instances.getSourceAccessor()).thenReturn(RootAccessor.getInstance());
    when(instances.getType()).then(returnType(Object.class));
    when(instances.getWorking()).thenReturn("");
View Full Code Here

Examples of gov.nist.scap.xccdf.CircularReferenceException

      // Check if the this Profile is on the visited stack
      int position = visitedProfiles.search(this);
      if (position != -1) {
        // This profile is in the stack, throw an exception
        CircularReferenceException e = new CircularReferenceException(
            "circular reference via profile extension");
        // Cast to List to allow the type to be cast to
        // List<Identifiable>
        List<? extends AbstractProfile> visited
            = visitedProfiles.subList(
                visitedProfiles.size() - position,
                visitedProfiles.size());
        e.setReferenceList(visited);
        throw e;
      }

      final ProfileImpl extendedProfile = document.lookupExtendedProfile(data.getExtends());
View Full Code Here

Examples of gov.nist.scap.xccdf.CircularReferenceException

    if (data.isSetExtends()) {
      log.info("resolving item extension for rule: " + getId());

      int position = visitedItems.search(this);
      if (position != -1) {
        CircularReferenceException e = new CircularReferenceException(
            "circular reference via item extension");
        // Cast to List to allow the type to be cast to
        // List<Identifiable>
        List<RuleImpl> visited = visitedItems.subList(visitedItems
            .size()
            - position, visitedItems.size());
        e.setReferenceList(visited);
        throw (e);
      }

      final RuleImpl extended = parent.getDocument().lookupExtendedItem(data.getExtends());
      if (extended == null)
View Full Code Here

Examples of gov.nist.scap.xccdf.CircularReferenceException

    if (data.isSetExtends()) {
      log.info("resolving item extension for value: " + getId());

      int position = visitedItems.search(this);
      if (position != -1) {
        CircularReferenceException e = new CircularReferenceException(
            "circular reference via item extension");
        // Cast to List to allow the type to be cast to
        // List<Identifiable>
        List<ValueImpl> visited = visitedItems.subList(visitedItems
            .size()
            - position, visitedItems.size());
        e.setReferenceList(visited);
        throw (e);
      }

      final ValueImpl extended = parent.getDocument().lookupExtendedItem(
          data.getExtends());
View Full Code Here

Examples of gov.nist.scap.xccdf.CircularReferenceException

    if (data.isSetExtends()) {
      log.info("resolving item extension for rule: " + getId());

      int position = visitedItems.search(this);
      if (position != -1) {
        CircularReferenceException e = new CircularReferenceException(
            "circular reference via item extension");
        // Cast to List to allow the type to be cast to
        // List<Identifiable>
        List<RuleImpl> visited = visitedItems.subList(visitedItems
            .size()
            - position, visitedItems.size());
        e.setReferenceList(visited);
        throw (e);
      }

      final RuleImpl extended = parent.getDocument().lookupExtendedItem(data.getExtends());
      if (extended == null)
View Full Code Here

Examples of gov.nist.scap.xccdf.CircularReferenceException

    if (data.isSetExtends()) {
      log.info("resolving item extension for group: " + getId());

      int position = visitedItems.search(this);
      if (position != -1) {
        CircularReferenceException e = new CircularReferenceException(
            "circular reference via item extension");
        // Cast to List to allow the type to be cast to
        // List<Identifiable>
        List<GroupImpl> visited = visitedItems.subList(visitedItems
            .size()
            - position, visitedItems.size());
        e.setReferenceList(visited);
        throw (e);
      }

      final GroupImpl extended = getDocument().lookupExtendedItem(data.getExtends());
      if (extended == null)
View Full Code Here

Examples of gov.nist.scap.xccdf.CircularReferenceException

      // Check if the this Profile is on the visited stack
      int position = visitedProfiles.search(this);
      if (position != -1) {
        // This profile is in the stack, throw an exception
        CircularReferenceException e = new CircularReferenceException(
            "circular reference via profile extension");
        // Cast to List to allow the type to be cast to
        // List<Identifiable>
        List<? extends AbstractProfile> visited
            = visitedProfiles.subList(
                visitedProfiles.size() - position,
                visitedProfiles.size());
        e.setReferenceList(visited);
        throw e;
      }

      final ProfileImpl extendedProfile = document.lookupProfile(data.getExtends());
View Full Code Here

Examples of gov.nist.scap.xccdf.CircularReferenceException

    if (data.isSetExtends()) {
      log.info("resolving item extension for value: " + getId());

      int position = visitedItems.search(this);
      if (position != -1) {
        CircularReferenceException e = new CircularReferenceException(
            "circular reference via item extension");
        // Cast to List to allow the type to be cast to
        // List<Identifiable>
        List<ValueImpl> visited = visitedItems.subList(visitedItems
            .size()
            - position, visitedItems.size());
        e.setReferenceList(visited);
        throw (e);
      }

      final ValueImpl extended = parent.getDocument().lookupExtendedItem(data.getExtends());
      if (extended == null)
View Full Code Here

Examples of gov.nist.scap.xccdf.CircularReferenceException

    if (data.isSetExtends()) {
      log.info("resolving item extension for group: " + getId());

      int position = visitedItems.search(this);
      if (position != -1) {
        CircularReferenceException e = new CircularReferenceException(
            "circular reference via item extension");
        // Cast to List to allow the type to be cast to
        // List<Identifiable>
        List<GroupImpl> visited = visitedItems.subList(visitedItems
            .size()
            - position, visitedItems.size());
        e.setReferenceList(visited);
        throw (e);
      }

      final GroupImpl extended = getDocument().lookupExtendedItem(data.getExtends());
      if (extended == null)
View Full Code Here

Examples of org.gradle.api.CircularReferenceException

                // task in the queue
                Set<Task> dependsOnTasks = new TreeSet<Task>(Collections.reverseOrder());
                dependsOnTasks.addAll(context.getDependencies(task));
                for (Task dependsOnTask : dependsOnTasks) {
                    if (visiting.contains(dependsOnTask)) {
                        throw new CircularReferenceException(String.format(
                                "Circular dependency between tasks. Cycle includes [%s, %s].", task, dependsOnTask));
                    }
                    queue.add(0, dependsOnTask);
                }
            } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.