Yaniv Bronhaim has uploaded a new change for review.

Change subject: core: avoid findbug issues for encoding and bare exception
......................................................................

core: avoid findbug issues for encoding and bare exception

Change-Id: I6f87ad979954807feb68c5fa971da246b01beaef
Signed-off-by: Yaniv Bronhaim <ybron...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/28824/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java
index aacc446..344469f 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java
@@ -76,7 +76,7 @@
             runHttpMethod(httpClient, httpMethod);
             ForemanHostWrapper fhw = 
objectMapper.readValue(httpMethod.getResponseBody(), ForemanHostWrapper.class);
             return mapHosts(Arrays.asList(fhw.getResults()));
-        } catch (Exception e) {
+        } catch (IOException e) {
             return null;
         }
     }
@@ -87,7 +87,7 @@
             ForemanDiscoveredHostWrapper fdw =
                     objectMapper.readValue(httpMethod.getResponseBody(), 
ForemanDiscoveredHostWrapper.class);
             return mapDiscoveredHosts(Arrays.asList(fdw.getResults()));
-        } catch (Exception e) {
+        } catch (IOException e) {
             return null;
         }
     }
@@ -98,7 +98,7 @@
             ForemanHostGroupWrapper fhgw =
                     objectMapper.readValue(httpMethod.getResponseBody(), 
ForemanHostGroupWrapper.class);
             return mapHostGroups(Arrays.asList(fhgw.getResults()));
-        } catch (Exception e) {
+        } catch (IOException e) {
             return null;
         }
     }
@@ -109,7 +109,7 @@
             ForemanOperatingSystemWrapper fosw =
                     objectMapper.readValue(httpMethod.getResponseBody(), 
ForemanOperatingSystemWrapper.class);
             return mapOperationSystem(Arrays.asList(fosw.getResults()));
-        } catch (Exception e) {
+        } catch (IOException e) {
             return null;
         }
     }
@@ -120,7 +120,7 @@
             ForemanComputerResourceWrapper fcrw =
                     objectMapper.readValue(httpMethod.getResponseBody(), 
ForemanComputerResourceWrapper.class);
           return mapComputeResource(Arrays.asList(fcrw.getResults()));
-        } catch (Exception e) {
+        } catch (IOException e) {
             return null;
         }
     }
@@ -286,6 +286,7 @@
             }
 
             @Override
+            @SuppressWarnings("unchecked")
             public void writeRequest(OutputStream outputStream) throws 
IOException {
                 PrintWriter pr = new PrintWriter(outputStream);
                 pr.println(entityBody);
@@ -293,6 +294,7 @@
             }
 
             @Override
+            @SuppressWarnings("unchecked")
             public long getContentLength() {
                 return entityBody.getBytes().length;
             }


-- 
To view, visit http://gerrit.ovirt.org/28824
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f87ad979954807feb68c5fa971da246b01beaef
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to