Search Options

Results per page
Sort
Preferred Languages
Advance

Results 911 - 920 of 2,976 for throw (0.02 sec)

  1. src/test/java/jcifs/internal/smb2/io/Smb2WriteResponseTest.java

                assertEquals(1024, response.getCount());
                assertEquals(512, response.getRemaining());
            }
    
            @Test
            @DisplayName("Should throw exception for invalid structure size")
            void testInvalidStructureSize() {
                byte[] buffer = new byte[64];
                SMBUtil.writeInt2(16, buffer, 0); // Wrong structure size (should be 17)
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/fess/exception/ScriptEngineExceptionTest.java

            assertNull(exception.getCause());
        }
    
        public void test_throwAndCatch() {
            // Test throwing and catching the exception
            String message = "Thrown exception test";
    
            try {
                throw new ScriptEngineException(message);
            } catch (ScriptEngineException e) {
                assertEquals(message, e.getMessage());
                assertNull(e.getCause());
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  3. compat/maven-compat/src/main/java/org/apache/maven/repository/ArtifactTransferEvent.java

         * @throws IllegalArgumentException when
         */
        public void setRequestType(final int requestType) {
            switch (requestType) {
                case REQUEST_PUT:
                    break;
                case REQUEST_GET:
                    break;
                default:
                    throw new IllegalArgumentException("Illegal request type: " + requestType);
            }
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Jun 06 14:28:57 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/Files.java

       *
       * @param file the file to create or update
       * @throws IOException if an I/O error occurs
       */
      @SuppressWarnings("GoodTime") // reading system time without TimeSource
      public static void touch(File file) throws IOException {
        checkNotNull(file);
        if (!file.createNewFile() && !file.setLastModified(System.currentTimeMillis())) {
          throw new IOException("Unable to update modification time of " + file);
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 32.9K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt

       * possibility for your response.
       */
      @Throws(IOException::class)
      fun byteString() = consumeSource(BufferedSource::readByteString) { it.size }
    
      private inline fun <T : Any> ResponseBody.consumeSource(
        consumer: (BufferedSource) -> T,
        sizeMapper: (T) -> Int,
      ): T {
        val contentLength = contentLength()
        if (contentLength > Int.MAX_VALUE) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:51:25 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/net/JarURLConnectionUtil.java

        public static JarFile getJarFile(final JarURLConnection conn) {
            assertArgumentNotNull("conn", conn);
    
            try {
                return conn.getJarFile();
            } catch (final IOException e) {
                throw new IORuntimeException(e);
            }
        }
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbFileIntegrationTest.java

        }
    
        @Test
        void testInvalidPath() throws Exception {
            // Test various invalid URL formats that should throw MalformedURLException
            assertThrows(MalformedURLException.class, () -> new SmbFile("not-a-url", context),
                    "Invalid URL should throw MalformedURLException");
        }
    
        @Test
        void testPublicShareAccess() throws Exception {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 56K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java

      }
    
      /**
       * Guaranteed to throw an exception and leave the map unmodified.
       *
       * @throws UnsupportedOperationException always
       * @deprecated Unsupported operation.
       */
      @CanIgnoreReturnValue
      @Deprecated
      @Override
      @DoNotCall("Always throws UnsupportedOperationException")
      public <T extends B> @Nullable T putInstance(Class<T> type, T value) {
        throw new UnsupportedOperationException();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/Authenticate.kt

          Request
            .Builder()
            .url("http://publicobject.com/secrets/hellosecret.txt")
            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          println(response.body.string())
        }
      }
    }
    
    fun main() {
      Authenticate().run()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbEndOfFileExceptionTest.java

        /**
         * Ensures the exception is thrown and captured via assertThrows with the right message.
         */
        @Test
        void assertThrowsCapturesExceptionAndMessage() {
            // Act & Assert
            SmbEndOfFileException thrown = assertThrows(SmbEndOfFileException.class, () -> {
                throw new SmbEndOfFileException();
            });
            assertEquals("Unexpectedly reached end of file", thrown.getMessage());
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.4K bytes
    - Viewed (0)
Back to top