< prev index next >

src/java.base/share/classes/java/net/CookieManager.java

Print this page

        

@@ -60,11 +60,11 @@
  *                  Internal in-memory implementation
  * }</pre>
  * <ul>
  *   <li>
  *     CookieHandler is at the core of cookie management. User can call
- *     CookieHandler.setDefault to set a concrete CookieHanlder implementation
+ *     CookieHandler.setDefault to set a concrete CookieHandler implementation
  *     to be used.
  *   </li>
  *   <li>
  *     CookiePolicy.shouldAccept will be called by CookieManager.put to see whether
  *     or not one cookie should be accepted and put into cookie store. User can use

@@ -352,11 +352,11 @@
 
     // to determine whether or not accept this cookie
     private boolean shouldAcceptInternal(URI uri, HttpCookie cookie) {
         try {
             return policyCallback.shouldAccept(uri, cookie);
-        } catch (Exception ignored) { // pretect against malicious callback
+        } catch (Exception ignored) { // protect against malicious callback
             return false;
         }
     }
 
 
< prev index next >