From: Richard W.M. Jones Date: Wed, 2 Mar 2011 04:33:39 +0000 (+0000) Subject: java: Return Map for RHashtable functions. X-Git-Tag: 1.9.9~4 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=0b2e45da609002d44cbbf689cfdee252e6806648;p=libguestfs.git 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. --- 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;