Examples of InvalidNameException


Examples of com.google.gerrit.common.errors.InvalidNameException

    }
    if (!refname.startsWith(Constants.R_REFS)) {
      refname = Constants.R_HEADS + refname;
    }
    if (!Repository.isValidRefName(refname)) {
      throw new InvalidNameException();
    }
    if (MagicBranch.isMagicBranch(refname)) {
      throw new BranchCreationNotAllowedException(refname);
    }
View Full Code Here

Examples of javax.jmi.reflect.InvalidNameException

      } // end loop
      return extent;
    }
    catch(IndexOutOfBoundsException ex)
    {
      throw new InvalidNameException("Bad concept name '"+conceptName
                                     +"': Can't split name in subnames.");
    }
    catch(JmiException ex)
    {
      if(i>0)
      {
        System.out.println("Can't create class '"+conceptName+"', name '"
                           +names[i]
                           +"' not found in '"+names[i-1]+"'.");
        throw new InvalidNameException("Bad concept name '"+conceptName
                                       +"': name '"+names[i]
                                       +"' not found in '"+names[i-1]+"'.");
      }
      else
      {
        System.out.println("Can't create class '"+conceptName+"', name '"
                           +names[i]
                           +"' not found in outermost package.");
        throw new InvalidNameException("Bad concept name '"+conceptName
                                       +"': name '"+names[i]
                                       +"' not found in outermost package.");
      }
    }
    catch(RuntimeException ex)
    {
      //System.out.println( "error while getting concept class '" + conceptName + "',. i=" + i );
      throw new InvalidNameException("Bad concept name '"+conceptName
                                     +"'");
    }
  }
View Full Code Here

Examples of javax.jmi.reflect.InvalidNameException

      } // end loop
      return extent.refAssociation(names[i]);
    }
    catch(IndexOutOfBoundsException ex)
    {
      throw new InvalidNameException("Bad concept name '"+conceptName
                                     +"': Can't split name in subnames.");
    }
    catch(JmiException ex)
    {
      if(i>0)
      {

        System.out.println("Can't find class '"+conceptName+"', name '"
                           +names[i]
                           +"' not found in '"+names[i-1]+"'. (was: "
                           +ex.getMessage()+").");
        ex.printStackTrace();
        throw new InvalidNameException("Bad concept name '"+conceptName
                                       +"': name '"+names[i]
                                       +"' not found in '"+names[i-1]+"'.");
      }
      else
      {
        System.out.println("Can't find class '"+conceptName+"', name '"
                           +names[i]
                           +"' not found in outermost package.(was: "
                           +ex.getMessage()+").");
        throw new InvalidNameException("Bad concept name '"+conceptName
                                       +"': name '"+names[i]
                                       +"' not found in outermost package.");
      }
    }
    catch(RuntimeException ex)
    {
      //System.out.println( "error while getting concept class '" + conceptName + "',. i=" + i );
      throw new InvalidNameException("Bad concept name '"+conceptName
                                     +"'");
    }
  }
View Full Code Here

Examples of javax.jmi.reflect.InvalidNameException

    }
    catch(InvalidNameException ex)
    {
      if(i>0)
      {
        throw new InvalidNameException("Can't found package '" +names[i]
                                       +"' in '"+names[i-1]+"'.");
      }
      else
      {
        System.out.println("Can't found package '" +names[i]
                                       +"' in outermost package.");
        throw new InvalidNameException("Can't found package '" +names[i]
                                       +"' in outermost package.");
      }
    }

    return extent;
View Full Code Here

Examples of javax.naming.InvalidNameException

   public void linkMembership(User user, Group g, MembershipType mt, boolean broadcast) throws Exception
   {
      if (g == null)
      {
         throw new InvalidNameException("Can not create membership record for " + user.getUserName()
            + " because group is null");
      }

      if (mt == null)
      {
         throw new InvalidNameException("Can not create membership record for " + user.getUserName()
            + " because membership type is null");
      }

      String plGroupName = getPLIDMGroupName(g.getGroupName());
View Full Code Here

Examples of javax.naming.InvalidNameException

  public void rename(String oldName, String newName) throws NamingException {
    throw(new NamingException("Not yet available"));
  }

  private static CompositeName merge(CompositeName path, String name) throws NamingException {   
    if (name == null) throw new InvalidNameException();
    CompositeName res = new CompositeName(name);
    trim(res);
    for (int i = path.size() - 1; i > -1 ; i--) {
      res.add(0, path.get(i));
    }
View Full Code Here

Examples of javax.naming.InvalidNameException

        Name n = new CompositeName(name);
        if (n.size() < 1) {
            logger.error("CompNamingContext bind empty name ?");

            throw new InvalidNameException("CompNamingContext cannot bind empty name");
        }

        if (n.size() == 1) {
            // leaf in the env tree
            if (this.bindings.get(name) != null) {
View Full Code Here

Examples of javax.naming.InvalidNameException

        logger.debug("rebind {0}", name);

        Name n = new CompositeName(name);
        if (n.size() < 1) {
            logger.error("CompNamingContext rebind empty name ?");
            throw new InvalidNameException("CompNamingContext cannot rebind empty name");
        }

        if (n.size() == 1) {
            // leaf in the env tree
            this.bindings.put(name, obj);
View Full Code Here

Examples of javax.naming.InvalidNameException

        logger.debug("unbind {0}", name);

        Name n = new CompositeName(name);
        if (n.size() < 1) {
            logger.error("CompNamingContext rebind empty name ?");
            throw new InvalidNameException("CompNamingContext cannot unbind empty name");
        }

        if (n.size() == 1) {
            // leaf in the env tree
            if (this.bindings.get(name) == null) {
View Full Code Here

Examples of javax.naming.InvalidNameException

        logger.debug("createSubcontext {0}", name);

        Name n = new CompositeName(name);
        if (n.size() < 1) {
            logger.error("CompNamingContext createSubcontext with empty name ?");
            throw new InvalidNameException("CompNamingContext cannot create empty Subcontext");
        }

        Context ctx = null; // returned ctx
        if (n.size() == 1) {
            // leaf in the env tree: create ctx and bind it in parent.
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.