[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 4/6] java: Return Map<String, String> for RHashtable functions.



-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
>From 4373acea5bae867d8386328bf8da9dc4c071df0a Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones redhat com>
Date: Wed, 2 Mar 2011 04:33:39 +0000
Subject: [PATCH 4/6] java: Return Map<String,String> 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 files changed, 2 insertions(+), 1 deletions(-)

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<String,String> ";
+   | RHashtable _ -> pr "Map<String,String> ";
   );
 
   if native then pr "_%s " name else pr "%s " name;
-- 
1.7.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]