From 782f298674477951e6d101d6fd512d71cb7ff4a0 Mon Sep 17 00:00:00 2001 From: Martino Luca Date: Thu, 24 May 2018 06:27:03 -0700 Subject: [PATCH] [Test determinator] Minor fixes Reviewed By: ddino Differential Revision: D8124094 fbshipit-source-id: fb228cc --- infer/src/integration/testDeterminator.ml | 9 ++++++--- infer/src/java/JavaProfilerSamples.ml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/infer/src/integration/testDeterminator.ml b/infer/src/integration/testDeterminator.ml index b48565a59..0feeed90a 100644 --- a/infer/src/integration/testDeterminator.ml +++ b/infer/src/integration/testDeterminator.ml @@ -57,9 +57,12 @@ module MethodRangeMap = struct in let range = (start_location, end_location) in let classname, methodname = split_class_method_name decl.method_name in - let signature = match decl.signature with Some s -> s | _ -> "" in - let key = JavaProfilerSamples.create ~classname ~methodname ~signature in - RangeMap.add key range acc ) + match decl.signature with + | Some signature -> + let key = JavaProfilerSamples.create ~classname ~methodname ~signature in + RangeMap.add key range acc + | None -> + acc ) in map := map' | _ -> diff --git a/infer/src/java/JavaProfilerSamples.ml b/infer/src/java/JavaProfilerSamples.ml index 77bb13598..f10482926 100644 --- a/infer/src/java/JavaProfilerSamples.ml +++ b/infer/src/java/JavaProfilerSamples.ml @@ -231,7 +231,7 @@ module JNI = struct | [Method m] -> m | _ -> - L.(die UserError "The input provided did not parse as one JNI method signature") + L.(die UserError "'%s' did not parse as one JNI method signature" str) module VISIBLE_FOR_TESTING_DO_NOT_USE_DIRECTLY = struct