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

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



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


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