Codota Logo
Assert.throwError
Code IndexAdd Codota 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)

  • 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: 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, double message) {
 if (!b) {
  throwError(Double.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: 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, float message) {
 if (!b) {
  throwError(new Float(message));
 }
}

origin: io.snappydata/gemfire-core

public static void assertTrue(boolean b, char message) {
 if (!b) {
  throwError(Character.valueOf(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: org.apache.geode/gemfire-core

public static void assertTrue(boolean b, char message) {
 if (!b) {
  throwError(new Character(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 requests using okhttp
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
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