From 0b2e45da609002d44cbbf689cfdee252e6806648 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Mar 2011 04:33:39 +0000 Subject: [PATCH] java: Return Map for RHashtable functions. There's no point returning the specific HashMap type here. Return the generic interface type instead. Note that no users are actually calling these functions yet, since at present they always fail. --- generator/generator_java.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generator/generator_java.ml b/generator/generator_java.ml index e2e0003..90ae263 100644 --- a/generator/generator_java.ml +++ b/generator/generator_java.ml @@ -37,6 +37,7 @@ let rec generate_java_java () = package com.redhat.et.libguestfs; import java.util.HashMap; +import java.util.Map; import com.redhat.et.libguestfs.LibGuestFSException; import com.redhat.et.libguestfs.PV; import com.redhat.et.libguestfs.VG; @@ -183,7 +184,7 @@ and generate_java_prototype ?(public=false) ?(privat=false) ?(native=false) | RStructList (_, typ) -> let name = java_name_of_struct typ in pr "%s[] " name; - | RHashtable _ -> pr "HashMap "; + | RHashtable _ -> pr "Map "; ); if native then pr "_%s " name else pr "%s " name; -- 1.8.3.1