Revert "[java] no longer catching Class_structure_exception"

Summary:public
Revert 6fa9b995e5 (D2843010).

It's slightly less worse to silently ignore Java8 rather than crashing. We'll
wait for an upstream fix to Javalib to resolve the issue of leaked file
descriptors that the original diff was trying to address.

Reviewed By: sblackshear

Differential Revision: D3040978

fb-gh-sync-id: 4020221
shipit-source-id: 4020221
master
Jules Villard 9 years ago committed by Facebook Github Bot 8
parent 909473f3da
commit c637c10d0f

@ -176,6 +176,7 @@ let load_sources_and_classes () =
| JVerbose.Classpath parsed_paths -> | JVerbose.Classpath parsed_paths ->
loop parsed_paths roots sources classes loop parsed_paths roots sources classes
with with
| JBasics.Class_structure_error _
| Parsing.Parse_error | Parsing.Parse_error
| Invalid_argument _ | Invalid_argument _
| Failure "lexing: empty token" -> loop paths roots sources classes | Failure "lexing: empty token" -> loop paths roots sources classes
@ -255,9 +256,11 @@ let collect_classes classmap jar_filename =
let classpath = Javalib.class_path jar_filename in let classpath = Javalib.class_path jar_filename in
let collect classmap cn = let collect classmap cn =
JBasics.ClassMap.add cn (Javalib.get_class classpath cn) classmap in JBasics.ClassMap.add cn (Javalib.get_class classpath cn) classmap in
let classes = IList.fold_left collect classmap (extract_classnames [] jar_filename) in try
Javalib.close_class_path classpath; let classes = IList.fold_left collect classmap (extract_classnames [] jar_filename) in
classes Javalib.close_class_path classpath;
classes
with JBasics.Class_structure_error _ -> classmap
let load_program classpath classes = let load_program classpath classes =

Loading…
Cancel
Save