Tabnine Logo
SequentialIOExceptionBuilder.warn
Code IndexAdd Tabnine to your IDE (free)

How to use
warn
method
in
de.schlichtherle.truezip.io.SequentialIOExceptionBuilder

Best Java code snippets using de.schlichtherle.truezip.io.SequentialIOExceptionBuilder.warn (Showing top 4 results out of 315)

origin: de.schlichtherle.truezip/truezip-driver-zip

    Streams.cat(in, zos);
  } catch (final InputException ex) { // NOT IOException!
    builder.warn(ex);
    builder.warn(ex);
  builder.warn(ex);
} finally {
  try {
    in.close();
  } catch (final IOException ex) {
    builder.warn(ex);
  buffer.release();
} catch (final IOException ex) {
  builder.warn(ex);
origin: de.schlichtherle.truezip/truezip-kernel

@Test
public void testChainingExceptionWithInitializedPredecessor() {
  builder.warn(newCause());
  builder.warn(newCause());
  try {
    builder.check();
    fail();
  } catch (final SequentialIOException expected) {
    assert expected.isInitPredecessor();
    builder.warn(newCause());
    builder.warn(expected);
    builder.warn(newCause());
  }
}
origin: de.schlichtherle.truezip/truezip-kernel

@SuppressWarnings({ "unchecked", "element-type-mismatch" })
private void assertSequence(final Mapper mapper) throws X {
  final IOException warning = new IOException("warning");
  final IOException failure = new IOException("failure");
  builder.warn(warning);
  final SequentialIOException ex1 = builder.fail(failure);
  builder.check();
  assertTrue(clazz.isInstance(ex1));
  final SequentialIOException ex2 = mapper.map(ex1);
  assertTrue(clazz.isInstance(ex2));
  final Set<IOException> causes = new HashSet<IOException>(
      Arrays.asList(warning, failure));
  assertTrue(causes.remove(ex2.getCause()));
  assertTrue(causes.remove(ex2.getPredecessor().getCause()));
  assertTrue(causes.isEmpty());
  assertNull(ex2.getPredecessor().getPredecessor());
}
origin: de.schlichtherle.truezip/truezip-kernel

@Test
public void testWarnIdempotence() {
  builder.warn(newCause());
  try {
    builder.check();
    fail();
  } catch (final SequentialIOException ex) {
    assertTrue(clazz.isInstance(ex));
    builder.warn(ex);
    try {
      builder.check();
      fail();
    } catch (final SequentialIOException ex2) {
      assertSame(ex, ex2);
    }
  }
}
de.schlichtherle.truezip.ioSequentialIOExceptionBuilderwarn

Popular methods of SequentialIOExceptionBuilder

  • check
  • create
  • fail

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • CodeWhisperer alternatives
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