List of usage examples for java.lang IllegalStateException IllegalStateException
public IllegalStateException()
From source file:com.microsoft.tfs.client.common.ui.framework.diagnostics.SupportFacade.java
public static boolean openSupportDialog(final Shell shell, final ClassLoader callerClassLoader, final Map contextObjects) { final DataProviderCollection collection = InternalSupportUtils.createDataProviderCollection(shell); if (collection == null) { /*/*w w w. j av a 2 s. c o m*/ * cancelled */ return false; } final SupportProvider supportProvider = SupportManager.getInstance().getSupportProviderCache() .getSupportProvider(); if (supportProvider == null) { throw new IllegalStateException(); } final SupportDialog dialog = new SupportDialog(shell, supportProvider, collection, callerClassLoader, contextObjects); dialog.open(); return true; }
From source file:be.fgov.kszbcss.rhq.websphere.config.CacheRefreshStrategy.java
static void setImmediateRefresh(Boolean immediateRefresh) { if ((immediateRefresh == null) == (threadLocal.get() == null)) { throw new IllegalStateException(); }//from w w w. j a v a2 s . c o m if (log.isDebugEnabled()) { log.debug("Setting immediateRefresh to " + immediateRefresh); } threadLocal.set(immediateRefresh); }
From source file:Main.java
public static String getDeviceId(Context context) { TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String uuid = tm.getDeviceId(); if (uuid == null) { WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); String mac = wifiManager.getConnectionInfo().getMacAddress(); if (mac == null) throw new IllegalStateException(); return mac; }/*from w w w. j a v a 2 s. c o m*/ return uuid; }
From source file:com.cloudera.oryx.rdf.common.information.Information.java
/** * @param decisions list of possible {@link Decision}s to consider to split the examples in {@link ExampleSet} * @param examples {@link ExampleSet} of examples to evaluate {@link Decision}s over * @return the best {@link Decision} from {@code decisions} -- the one that maximizes information gain -- * along with the information gain it achievies, in nats *//*w ww. ja v a 2 s . c o m*/ public static Pair<Decision, Double> bestGain(Iterable<Decision> decisions, ExampleSet examples) { switch (examples.getTargetType()) { case NUMERIC: return NumericalInformation.bestGain(decisions, examples); case CATEGORICAL: return CategoricalInformation.bestGain(decisions, examples); default: throw new IllegalStateException(); } }
From source file:com.yahoo.elide.utils.JsonParser.java
/** * Parse provided string into JsonNode.// w w w . j a v a 2 s . co m * * @param jsonString provided JSON * @return JsonNode representation */ public JsonNode toJsonNode(String jsonString) { try { return objectMapper.readTree(jsonString); } catch (IOException e) { Assert.fail("Unable to parse JSON\n" + jsonString, e); throw new IllegalStateException(); // should not reach here } }
From source file:lu.lippmann.cdb.weka.SilhouetteUtil.java
/** * */ private SilhouetteUtil() { throw new IllegalStateException(); }
From source file:biz.fstechnology.micro.common.jms.JmsServiceConnection.java
public static JmsServiceConnection getInstance() { if (INSTANCE.getJmsTemplate() == null) { throw new IllegalStateException(); // TODO message }/*from www. ja v a 2 s . c o m*/ return INSTANCE; }
From source file:lh.api.showcase.server.config.ConfigurationUtils.java
private ConfigurationUtils() { super(); throw new IllegalStateException(); }
From source file:edu.cornell.mannlib.vitro.webapp.rdfservice.adapters.BulkUpdatingOntModel.java
@SuppressWarnings("deprecation") private static BulkUpdateHandler getWrappedBulkUpdateHandler(Graph graph) { if (graph instanceof GraphWithPerform) { return new WrappedBulkUpdateHandler((GraphWithPerform) graph, graph.getBulkUpdateHandler()); } else {//from w w w . java2 s. c o m try { throw new IllegalStateException(); } catch (IllegalStateException e) { log.warn("Graph is not an instance of GraphWithPerform", e); } return graph.getBulkUpdateHandler(); } }
From source file:com.googlecode.catchexception.integration.spring.MySessionComponent.java
@Override public void doError() { throw new IllegalStateException(); }