Codota Logo
Assert.throwIfNull
Code IndexAdd Codota to your IDE (free)

How to use
throwIfNull
method
in
ru.javatalks.utils.general.Assert

Best Java code snippets using ru.javatalks.utils.general.Assert.throwIfNull (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: jtalks-org/jcommune

/**
 * Throws exception if permission name is not valid.
 *
 * @param name a textual representation of the permission (usually the same as the constant name)
 */
private void throwIfNameNotValid(String name) {
  Assert.throwIfNull(name, "The name can't be null");
}
origin: jtalks-org/jcommune

private void throwIfNameNotValid(String name) {
  Assert.throwIfNull(name, "The name can't be null");
}
origin: jtalks-org/jcommune

/**
 * {@inheritDoc}
 */
@Override
public List<Group> getGroupsOfUser(User user) {
  Assert.throwIfNull(user, "user");
  Query query = session().getNamedQuery("findGroupsOfUser");
  query.setParameter(0, "%" + user + "%");
  return query.list();
}
origin: jtalks-org/jcommune

/**
 * {@inheritDoc}
 */
@Override
public void saveGroup(Group group) {
  Assert.throwIfNull(group, "group");
  group.setName(group.getName().trim());
  dao.saveOrUpdate(group);
}
origin: jtalks-org/jcommune

/**
 * {@inheritDoc}
 */
@Override
public void deleteGroup(Group group) throws NotFoundException {
  Assert.throwIfNull(group, "group");
  if (!isGroupEditable(group.getName())) {
    logger.warn("Attempt to delete pre-defined usergoup {}", group.getName());
    throw new OperationIsNotAllowedException("Pre-defined usergoup " + group.getName() + " cannot be deleted");
  }
  for (User user : group.getUsers()) {
    user.getGroups().remove(group);
    userDao.saveOrUpdate((JCUser) user);
  }
  dao.delete(group);
  UserInfo currentUser = securityService.getCurrentUserBasicInfo();
  UserGroupSid sid = new UserGroupSid(group);
  UserSid sidHeier = new UserSid(currentUser);
  try {
    manager.deleteSid(sid, sidHeier);
  } catch (EmptyResultDataAccessException noSidError) {
    throw new NotFoundException();
  }
}
ru.javatalks.utils.generalAssertthrowIfNull

Popular methods of Assert

    Popular in Java

    • Reactive rest calls using spring rest template
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • putExtra (Intent)
    • setContentView (Activity)
    • Menu (java.awt)
    • BufferedReader (java.io)
      Reads text from a character-input stream, buffering characters so as to provide for the efficient re
    • PrintStream (java.io)
      A PrintStream adds functionality to another output stream, namely the ability to print representatio
    • IOUtils (org.apache.commons.io)
      General IO stream manipulation utilities. This class provides static utility methods for input/outpu
    • StringUtils (org.apache.commons.lang)
      Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
    • Project (org.apache.tools.ant)
      Central representation of an Ant project. This class defines an Ant project with all of its targets,
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now