# HG changeset patch # User stefank # Date 1550566851 -3600 # Node ID 42a613bcb622cd130f8e16b073ab643e344ad6b0 # Parent 639a36bc8ef1e55614e4a72f0fba210e6a7ea312 8218731: SA: Use concrete class the as return type of VMObjectFactory.newObject Reviewed-by: eosterlund diff -r 639a36bc8ef1 -r 42a613bcb622 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMObjectFactory.java --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMObjectFactory.java Mon Feb 18 09:38:43 2019 +0100 +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMObjectFactory.java Tue Feb 19 10:00:51 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,14 +45,14 @@ */ public class VMObjectFactory { - public static Object newObject(Class clazz, Address addr) + public static T newObject(Class clazz, Address addr) throws ConstructionException { try { if (addr == null) { return null; } - Constructor c = clazz.getConstructor(new Class[] { + Constructor c = clazz.getConstructor(new Class[] { Address.class }); return c.newInstance(new Object[] { addr });