JDK-6902678 : com.sun.tracing.ProviderFactory.createProvider doesn't throw IllegalArgumentException
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-11-18
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b78Fixed
Related Reports
Duplicate :  
Description
test/com/sun/tracing/BasicFunctionality.java fails.

Nov 10, 2009 2:06:41 PM sun.tracing.dtrace.DTraceProviderFactory createProvider
WARNING: Could not initialize tracing provider: Return value of method is not void
java.lang.Exception: Factory.createProvider: Should error with non-void probes
       at BasicFunctionality.fail(BasicFunctionality.java:64)
       at BasicFunctionality.testProviderFactory(BasicFunctionality.java:81)
       at BasicFunctionality.main(BasicFunctionality.java:58)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

com.sun.tracing.ProviderFactory.createProvider is expected to throw IllegalArgumentException if the given provider is invalid but it doesn't.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/tl/jdk/rev/c8fb7e11daf8
19-11-2009

EVALUATION The provider factory implementation catches all exceptions to workaround the permission problem which is incorrect.
18-11-2009

SUGGESTED FIX Should call doPrivileged where it requires permission.
18-11-2009