[libvirt-java] [PATCH 15/15] fixup! Start refactoring of error handling

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

 



There's no compelling reason to keep the various processError overloads
which were added just to ease refactoring.

Consider this squashed in prior of pushing this series.
---
 src/main/java/org/libvirt/ErrorHandler.java | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/main/java/org/libvirt/ErrorHandler.java b/src/main/java/org/libvirt/ErrorHandler.java
index c2e7337..86b8307 100644
--- a/src/main/java/org/libvirt/ErrorHandler.java
+++ b/src/main/java/org/libvirt/ErrorHandler.java
@@ -49,21 +49,11 @@ public class ErrorHandler {
      * @return {@code arg}
      * @throws LibvirtException
      */
-    static final <T extends PointerType> T processError(T arg) throws LibvirtException {
+    static final <T> T processError(T arg) throws LibvirtException {
         if (arg == null) processError();
         return arg;
     }
 
-    static final Pointer processError(Pointer arg) throws LibvirtException {
-        if (arg == null) processError();
-        return arg;
-    }
-
-    static final String processError(String str) throws LibvirtException {
-        if (str == null) processError();
-        return str;
-    }
-
     static final long processErrorIfZero(long ret) throws LibvirtException {
         if (ret == 0) processError();
         return ret;
-- 
1.8.5.2.msysgit.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]