List of usage examples for java.lang AssertionError AssertionError
public AssertionError(double detailMessage)
double
, which is converted to a string as defined in section 15.18.1.1 of The Java™ Language Specification. From source file:com.feilong.taglib.display.TagCacheManager.java
/** Don't let anyone instantiate this class. */ private TagCacheManager() { //AssertionError?. ?????. ???. //see Effective Java 2nd throw new AssertionError("No " + getClass().getName() + " instances for you!"); }
From source file:io.realm.TestHelper.java
public static void resetSyncMetadata() { try {// w w w . ja v a2s . c o m SYNC_MANAGER_RESET_METHOD.invoke(null); } catch (InvocationTargetException e) { throw new AssertionError(e); } catch (IllegalAccessException e) { throw new AssertionError(e); } }
From source file:com.progressiveaccess.cmlspeech.base.FileHandler.java
/** Dummy constructor. */ private FileHandler() { throw new AssertionError("Instantiating utility class..."); }
From source file:com.evolveum.midpoint.wf.util.ApprovalUtils.java
public static String toUri(WorkItemOutcomeType workItemOutcomeType) { if (workItemOutcomeType == null) { return null; }/*from w w w .j a v a 2s. c o m*/ switch (workItemOutcomeType) { case APPROVE: return SchemaConstants.MODEL_APPROVAL_OUTCOME_APPROVE; case REJECT: return SchemaConstants.MODEL_APPROVAL_OUTCOME_REJECT; default: throw new AssertionError("Unexpected outcome: " + workItemOutcomeType); } }
From source file:com.evolveum.midpoint.schema.util.LocalizationUtil.java
public static LocalizableMessageType createLocalizableMessageType(LocalizableMessage message, Function<LocalizableMessage, String> resolveKeys) { if (message == null) { return null; } else if (message instanceof SingleLocalizableMessage) { return createLocalizableMessageType((SingleLocalizableMessage) message, resolveKeys); } else if (message instanceof LocalizableMessageList) { return createLocalizableMessageType((LocalizableMessageList) message, resolveKeys); } else {/*ww w .j a va 2 s . c o m*/ throw new AssertionError("Unsupported localizable message type: " + message); } }
From source file:comsat.sample.servlet.SampleServletApplication.java
@SuppressWarnings("serial") @Bean/*from w ww . j a va 2 s. c o m*/ public Servlet dispatcherServlet() { return new FiberHttpServlet() { @Override @Suspendable public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { try { Fiber.sleep(10); res.setContentType("text/plain"); res.getWriter().append("Hello World"); } catch (InterruptedException | SuspendExecution ex) { throw new AssertionError(ex); } } }; }
From source file:com.medallia.tiny.Strings.java
/** Throws AssertionError if any of the strings are null or have zero length */ public static void assertAllHaveContent(String... strings) { if (!allHaveContent(strings)) throw new AssertionError("String is null or blank: " + Arrays.asList(strings)); }
From source file:kr.co.bitnine.octopus.schema.jdbc.JdbcUtils.java
private JdbcUtils() { throw new AssertionError("no instances!"); }
From source file:com.sunchenbin.store.feilong.core.io.IOReaderUtil.java
/** Don't let anyone instantiate this class. */ private IOReaderUtil() { //AssertionError?. ?????. ???. //see Effective Java 2nd throw new AssertionError("No " + getClass().getName() + " instances for you!"); }
From source file:com.discovery.darchrow.util.MapUtil.java
/** Don't let anyone instantiate this class. */ private MapUtil() { //AssertionError?. ?????. ???. //see Effective Java 2nd throw new AssertionError("No " + getClass().getName() + " instances for you!"); }