@SuppressWarnings("unused_private_member") private void writeObject(final ObjectOutputStream stream) { try { synchronized (this.mutex) { stream.defaultWriteObject(); } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
@SuppressWarnings("unused_private_member") private void writeObject(final ObjectOutputStream stream) { try { synchronized (this.mutex) { stream.defaultWriteObject(); } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
public void join() { try { this.future.get(); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
@SuppressWarnings("unused_private_member") private void writeObject(final ObjectOutputStream stream) { try { synchronized (this.mutex) { stream.defaultWriteObject(); } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
@Override public <T extends Object> T get(final Class<T> t) { try { return this.injector.<T>getInstance(t); } catch (final Throwable _t) { if (_t instanceof ConfigurationException) { return null; } else { throw Exceptions.sneakyThrow(_t); } } }
protected <T> T create(Class<T> klass) { try { return klass.newInstance(); } catch (Exception e) { Exceptions.sneakyThrow(e); return null; // not reachable } } }
public int getReporterCallCommentPrefixCount() { try { return Integer.parseInt(System.getenv(TclGeneratorConfig.REPORTER_CALL_COMMENT_PREFIX_COUNT)); } catch (final Throwable _t) { if (_t instanceof NumberFormatException) { return 0; } else { throw Exceptions.sneakyThrow(_t); } } } }
public Runner apply(FrameworkMethod from) { try { return createExampleRunner(testClass, from); } catch (InitializationError e) { sneakyThrow(e); return null; // not reachable } catch (NoTestsRemainException e) { Exceptions.sneakyThrow(e); return null; // not reachable } } });
private byte[] readBinaryFileFromPackage(final String fileName) { try { final InputStream stream = TemplateFileWizardFragment.class.getResourceAsStream(fileName); try { return ByteStreams.toByteArray(stream); } finally { stream.close(); } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
private byte[] readBinaryFileFromPackage(final String fileName) { try { final InputStream stream = TemplateProjectWizardFragment.class.getResourceAsStream(fileName); try { return ByteStreams.toByteArray(stream); } finally { stream.close(); } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
public InputStream createInputStream() { try { if ((Objects.equal(this.contents, null) || (!this.exists))) { throw new IOException((("File " + this.uri) + " does not exist.")); } return new ByteArrayInputStream(this.contents); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
@Override public void apply(final OutputStream it) { try { byte[] _bytes = content.getBytes(); it.write(_bytes); it.close(); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } };
public String nameOf(Class<?> javaClass, String methodName) { try { Method method = javaClass.getMethod(methodName); return nameOf(method); } catch (SecurityException e) { Exceptions.sneakyThrow(e); } catch (NoSuchMethodException e) { Exceptions.sneakyThrow(e); } return methodName; }
private String toJson(final String modelText) { try { boolean _startsWith = modelText.trim().startsWith("{"); if (_startsWith) { return modelText; } final JsonNode tree = XGenerateSwaggerUIv3.yamlMapper.readTree(modelText); return XGenerateSwaggerUIv3.jsonMapper.writeValueAsString(tree); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
@SuppressWarnings("unused_private_member") private void writeObject(final ObjectOutputStream stream) { try { stream.defaultWriteObject(); stream.writeInt(this.collection.size()); for (final E element : this.collection) { stream.writeObject(element); } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
protected File createTempDir(final String subDir) { try { final File file = new File(this.tempDir, subDir); if (((!file.mkdirs()) && (!file.exists()))) { String _absolutePath = file.getAbsolutePath(); String _plus = ("Failed to create directory \'" + _absolutePath); String _plus_1 = (_plus + "\'"); throw new IOException(_plus_1); } return file; } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
private static Class<?> reloadClass(final Class<?> context, final Class<?> type) { ClassLoader ld = context.getClassLoader(); if ((ld == null)) { ld = type.getClassLoader(); } try { return ld.loadClass(type.getName()); } catch (final Throwable _t) { if (_t instanceof Throwable) { return type; } else { throw Exceptions.sneakyThrow(_t); } } }
@SuppressWarnings("unused_private_member") private void readObject(final ObjectInputStream stream) { try { stream.defaultReadObject(); final int s = stream.readInt(); ArrayList<E> _arrayList = new ArrayList<E>(s); this.collection = _arrayList; for (int i = 0; (i < s); i++) { Object _readObject = stream.readObject(); this.collection.add(((E) _readObject)); } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
private void fillRefRealizations() { if ((this.refRealizations == null)) { this.refRealizations = Maps.<String, EffectiveRealization>newHashMap(); final Consumer<Map.Entry<String, CompletableFuture<EffectiveRealization>>> _function = (Map.Entry<String, CompletableFuture<EffectiveRealization>> it) -> { try { this.refRealizations.put(it.getKey(), it.getValue().get()); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }; this.refRealizationFutures.entrySet().forEach(_function); } }
public StandardLanguage() { try { this.getClass().getClassLoader().loadClass("org.eclipse.xtext.xbase.XbaseRuntimeModule"); this.addReferencedResource("platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel"); } catch (final Throwable _t) { if (_t instanceof ClassNotFoundException) { StandardLanguage.LOG.info("Skipping registration of Xbase genmodel. Xbase is not on the classpath."); } else { throw Exceptions.sneakyThrow(_t); } } }