Tabnine Logo
Assert.throwError
Code IndexAdd Tabnine to your IDE (free)

How to use
throwError
method
in
com.gemstone.gemfire.internal.Assert

Best Java code snippets using com.gemstone.gemfire.internal.Assert.throwError (Showing top 20 results out of 315)

origin: org.apache.geode/gemfire-core

/**
 * Assert that a boolean value is true.
 * @param b the boolean value to check
 * @throws InternalGemFireError if false
 */
public static void assertTrue(boolean b) {
 if (!b) {
  throwError(null);
 }
}
origin: io.snappydata/gemfire-core

/**
 * Assert that a boolean value is true.
 * @param b the boolean value to check
 * @throws InternalGemFireError if false
 */
public static void assertTrue(boolean b) {
 if (!b) {
  throwError(null);
 }
}
origin: org.apache.geode/gemfire-core

/**
 * Assert that a boolean value is true.The
 * message object will be sent toString()
 * and used for an error message.
 *
 * @param b the boolean value to check
 * @param message used for error message
 * @throws InternalGemFireError if false
 */
public static void assertTrue(boolean b, Object message) {
 if (!b) {
  throwError(message);
 }
}

origin: io.snappydata/gemfire-core

public static void fail(Object message) {
 throwError(message);
}
origin: io.snappydata/gemfire-core

/**
 * Assert that a boolean value is true.The
 * message object will be sent toString()
 * and used for an error message.
 *
 * @param b the boolean value to check
 * @param message used for error message
 * @throws InternalGemFireError if false
 */
public static void assertTrue(boolean b, Object message) {
 if (!b) {
  throwError(message);
 }
}

origin: org.apache.geode/gemfire-core

public static void fail(Object message) {
 throwError(message);
}
origin: org.apache.geode/gemfire-core

public static void assertTrue(boolean b, boolean message) {
 if (!b) {
  throwError(Boolean.valueOf(message));
 }
}

origin: io.snappydata/gemfire-core

public static void assertTrue(boolean b, int message) {
 if (!b) {
  throwError(Integer.valueOf(message));
 }
}

origin: io.snappydata/gemfire-core

public static void assertTrue(boolean b, long message) {
 if (!b) {
  throwError(Long.valueOf(message));
 }
}

origin: io.snappydata/gemfire-core

public static void assertTrue(boolean b, double message) {
 if (!b) {
  throwError(Double.valueOf(message));
 }
}

origin: org.apache.geode/gemfire-core

public static void assertTrue(boolean b, float message) {
 if (!b) {
  throwError(new Float(message));
 }
}

origin: org.apache.geode/gemfire-core

public static void assertTrue(boolean b, int message) {
 if (!b) {
  throwError(Integer.valueOf(message));
 }
}

origin: io.snappydata/gemfire-core

public static void assertTrue(boolean b, boolean message) {
 if (!b) {
  throwError(Boolean.valueOf(message));
 }
}

origin: io.snappydata/gemfire-core

public static void assertTrue(boolean b, char message) {
 if (!b) {
  throwError(Character.valueOf(message));
 }
}

origin: io.snappydata/gemfire-core

public static void assertTrue(boolean b, float message) {
 if (!b) {
  throwError(new Float(message));
 }
}

origin: org.apache.geode/gemfire-core

public static void assertTrue(boolean b, char message) {
 if (!b) {
  throwError(new Character(message));
 }
}

origin: org.apache.geode/gemfire-core

public static void assertTrue(boolean b, long message) {
 if (!b) {
  throwError(Long.valueOf(message));
 }
}

origin: org.apache.geode/gemfire-core

public static void assertTrue(boolean b, double message) {
 if (!b) {
  throwError(Double.valueOf(message));
 }
}

origin: io.snappydata/gemfire-core

 /**
  * This is a workaround for X bug 38288. JRockit can throw a NullPointerException
  * from Thread.holdsLock, so we catch the NullPointerException if it happens.
  * 
  * This method returns true, unless it throws an exception. This is so we can disable
  * these tests for performance reasons with a java assertion, eg
  * <code>assert Assert.assertHoldLock(lock, true);</code>
  * @param lock The lock to test
  * @param shouldBeHeld true if this thread should hold this lock.
  * @return true, unless the method throws an exception. 
  */
 public static boolean assertHoldsLock(Object lock, boolean shouldBeHeld) {
  try {
   if(Thread.holdsLock(lock) != shouldBeHeld) {
    throwError(null);
   }
  } catch (NullPointerException jrockitSucks) {
   assertTrue(lock != null);
  }
  
  return true;
 }
}
origin: org.apache.geode/gemfire-core

 /**
  * This is a workaround for X bug 38288. JRockit can throw a NullPointerException
  * from Thread.holdsLock, so we catch the NullPointerException if it happens.
  * 
  * This method returns true, unless it throws an exception. This is so we can disable
  * these tests for performance reasons with a java assertion, eg
  * <code>assert Assert.assertHoldLock(lock, true);</code>
  * @param lock The lock to test
  * @param shouldBeHeld true if this thread should hold this lock.
  * @return true, unless the method throws an exception. 
  */
 public static boolean assertHoldsLock(Object lock, boolean shouldBeHeld) {
  try {
   if(Thread.holdsLock(lock) != shouldBeHeld) {
    throwError(null);
   }
  } catch (NullPointerException jrockitSucks) {
   assertTrue(lock != null);
  }
  
  return true;
 }
}
com.gemstone.gemfire.internalAssertthrowError

Popular methods of Assert

  • assertTrue
  • fail
  • assertHoldsLock
    This is a workaround for X bug 38288. JRockit can throw a NullPointerException from Thread.holdsLock

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • getContentResolver (Context)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JOptionPane (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now