JDK-8305838 : Add appropriate null checks in Metal implementation
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: internal
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: os_x
  • CPU: generic
  • Submitted: 2023-04-11
  • Updated: 2023-04-11
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.
Other
internalUnresolved
Related Reports
Blocks :  
Description
Looks like Obj-C just ignores referencing with nil and program flow continues.
For example:
MetalContext->drawIndexedQuads()

NSMutableDictionary* textures = [[self getCurrentShader] getTexutresDict];
    for (NSString *key in textures) {
        id<MTLTexture> tex = textures[key];
        CTX_LOG(@"    Value: %@ for key: %@", tex, key);
        [renderEncoder useResource:tex usage:MTLResourceUsageRead];
    }

In the above code even if getCurrentShader() returns null we dont throw any exception/error. In such scenarios we need to verify for null.