diff --git a/bindings/java/src/net/hyperic/sigar/win32/Service.java b/bindings/java/src/net/hyperic/sigar/win32/Service.java index 25d753e0..06647a6b 100644 --- a/bindings/java/src/net/hyperic/sigar/win32/Service.java +++ b/bindings/java/src/net/hyperic/sigar/win32/Service.java @@ -121,7 +121,7 @@ public class Service extends Win32Bindings implements java.io.Serializable this.close(); } - private void close() + public void close() { if(this.m_hService != 0) { CloseServiceHandle(this.m_hService); @@ -130,7 +130,7 @@ public class Service extends Win32Bindings implements java.io.Serializable if(this.m_hMgr != 0) { CloseServiceHandle(this.m_hMgr); - this.m_hService = 0; + this.m_hMgr = 0; } } diff --git a/bindings/java/src/net/hyperic/sigar/win32/test/TestService.java b/bindings/java/src/net/hyperic/sigar/win32/test/TestService.java index 9ad92334..dc269e06 100644 --- a/bindings/java/src/net/hyperic/sigar/win32/test/TestService.java +++ b/bindings/java/src/net/hyperic/sigar/win32/test/TestService.java @@ -13,6 +13,7 @@ public class TestService extends TestCase { public void testServiceOpen() throws Exception { Service service = new Service("Eventlog"); + service.close(); } public void testServiceCreateDelete() throws Exception {