Skip to content

Commit f47d4ed

Browse files
davidpichardiefacebook-github-bot
authored andcommitted
Compatibility with javalib 3.1 release
Summary: This javalib release gives compatibility with java 9 modules. It should also remove some Infer warnings (when a class has no superclass) JFile.sep is now a char Reviewed By: jvillard Differential Revision: D16220583 fbshipit-source-id: 5d05afde0
1 parent 380515b commit f47d4ed

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

infer/src/java/jClasspath.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ let add_models jar_filename =
4040

4141
let is_model procname = String.Set.mem !models_specs_filenames (Typ.Procname.to_filename procname)
4242

43-
let split_classpath =
44-
assert (Int.( = ) (String.length JFile.sep) 1) ;
45-
let char_sep = JFile.sep.[0] in
46-
fun cp -> String.split ~on:char_sep cp
47-
43+
let split_classpath = String.split ~on:JFile.sep
4844

4945
let classpath_of_paths paths =
5046
let of_path path =
@@ -56,7 +52,8 @@ let classpath_of_paths paths =
5652
L.debug Capture Medium "Path %s not found" full_path ;
5753
None
5854
in
59-
List.filter_map paths ~f:of_path |> String.concat ~sep:JFile.sep
55+
let string_sep = Char.to_string JFile.sep in
56+
List.filter_map paths ~f:of_path |> String.concat ~sep:string_sep
6057

6158

6259
type file_entry = Singleton of SourceFile.t | Duplicate of (string * SourceFile.t) list

opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ depends: [
3434
"ctypes" {>="0.9.2"}
3535
"dune" {build & >="1.0"}
3636
"elina" {>="1.1"}
37-
"javalib" {="3.0"}
37+
"javalib" {>="3.1"}
3838
"mtime"
3939
"ocaml" {>="4.06.0"}
4040
"ocamlfind" {build}

opam.locked

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ depends: [
3838
"camlidl" {= "1.05"}
3939
"camlp4" {= "4.07+1"}
4040
"camlzip" {= "1.08"}
41-
"camomile" {= "1.0.1"}
4241
"cmdliner" {= "1.0.4"}
4342
"conf-autoconf" {= "0.1"}
4443
"conf-gmp" {= "1"}
@@ -60,7 +59,7 @@ depends: [
6059
"fieldslib" {= "v0.12.0"}
6160
"integers" {= "0.2.2"}
6261
"jane-street-headers" {= "v0.12.0"}
63-
"javalib" {= "3.0"}
62+
"javalib" {= "3.1"}
6463
"jbuilder" {= "transition"}
6564
"jst-config" {= "v0.12.0"}
6665
"menhir" {= "20190626"}

0 commit comments

Comments
 (0)