@@ -1297,12 +1297,15 @@ public JsonParser createParser(File src) throws IOException {
12971297
12981298 /**
12991299 * Factory method for constructing properly initialized {@link JsonParser}
1300- * to read content from specified {@link File }.
1300+ * to read content from specified {@link URL }.
13011301 * Parser is not managed (or "owned") by ObjectMapper: caller is responsible
13021302 * for properly closing it once content reading is complete.
13031303 *
13041304 * @since 2.11
1305+ *
1306+ * @deprecated since 2.20 deprecated as it calls {@link JsonFactory#createParser(URL)}.
13051307 */
1308+ @ Deprecated // @since 2.20
13061309 public JsonParser createParser (URL src ) throws IOException {
13071310 _assertNotNull ("src" , src );
13081311 return _deserializationConfig .initialize (_jsonFactory .createParser (src ));
@@ -3346,11 +3349,14 @@ public JsonNode readTree(File file) throws IOException
33463349 * passed-in {@link URL}.
33473350 *<p>
33483351 * NOTE: handling of {@link java.net.URL} is delegated to
3349- * {@link JsonFactory#createParser(java.net. URL)} and usually simply
3352+ * {@link JsonFactory#createParser(URL)} and usually simply
33503353 * calls {@link java.net.URL#openStream()}, meaning no special handling
33513354 * is done. If different HTTP connection options are needed you will need
33523355 * to create {@link java.io.InputStream} separately.
3356+ *
3357+ * @deprecated since 2.20 deprecated as it calls {@link JsonFactory#createParser(URL)}.
33533358 */
3359+ @ Deprecated // @since 2.20
33543360 public JsonNode readTree (URL source ) throws IOException
33553361 {
33563362 _assertNotNull ("source" , source );
@@ -3817,29 +3823,40 @@ public <T> T readValue(File src, JavaType valueType)
38173823 * of type {@link JsonParser} supports (JSON for default case)
38183824 * @throws DatabindException if the input JSON structure does not match structure
38193825 * expected for result type (or has other mismatch issues)
3826+ *
3827+ * @deprecated since 2.20 deprecated as it calls {@link JsonFactory#createParser(URL)}.
38203828 */
3829+ @ Deprecated // @since 2.20
38213830 @ SuppressWarnings ("unchecked" )
38223831 public <T > T readValue (URL src , Class <T > valueType )
38233832 throws IOException , StreamReadException , DatabindException
38243833 {
38253834 _assertNotNull ("src" , src );
3826- return (T ) _readMapAndClose (_jsonFactory .createParser (src ), _typeFactory .constructType (valueType ));
3835+ return (T ) _readMapAndClose (_jsonFactory .createParser (src ),
3836+ _typeFactory .constructType (valueType ));
38273837 }
38283838
38293839 /**
38303840 * Same as {@link #readValue(java.net.URL, Class)} except that target specified by {@link TypeReference}.
3841+ *
3842+ * @deprecated since 2.20 deprecated as it calls {@link JsonFactory#createParser(URL)}.
38313843 */
3844+ @ Deprecated // @since 2.20
38323845 @ SuppressWarnings ({ "unchecked" })
38333846 public <T > T readValue (URL src , TypeReference <T > valueTypeRef )
38343847 throws IOException , StreamReadException , DatabindException
38353848 {
38363849 _assertNotNull ("src" , src );
3837- return (T ) _readMapAndClose (_jsonFactory .createParser (src ), _typeFactory .constructType (valueTypeRef ));
3850+ return (T ) _readMapAndClose (_jsonFactory .createParser (src ),
3851+ _typeFactory .constructType (valueTypeRef ));
38383852 }
38393853
38403854 /**
38413855 * Same as {@link #readValue(java.net.URL, Class)} except that target specified by {@link JavaType}.
3856+ *
3857+ * @deprecated since 2.20 deprecated as it calls {@link JsonFactory#createParser(URL)}.
38423858 */
3859+ @ Deprecated // @since 2.20
38433860 @ SuppressWarnings ("unchecked" )
38443861 public <T > T readValue (URL src , JavaType valueType )
38453862 throws IOException , StreamReadException , DatabindException
0 commit comments