Hi,

In our component, we have a piece of code that has a possibility of being
called from within a Carbon server as well as from outside. This code uses
the Utils.getCarbonConfigHome() method from the kernel.

In the second case, since the required system property is not found in the
runtime, it's a given that the call should fail. However, rather than
failing gracefully, this method throws an NPE since in [1], there's an
attempt to set a null as a system property.

The proper fix here should be that a null check be introduced and the
calling party notified (e.g. through an exception). Added the fix at [2].
Could you check please?

[1]
https://github.com/wso2/carbon-kernel/blob/master/core/src/main/java/org/wso2/carbon/kernel/utils/Utils.java#L67

[2] https://github.com/wso2/carbon-kernel/issues/1309

Thanks,

-- 
Gokul Balakrishnan
Senior Software Engineer,
WSO2, Inc. http://wso2.com
M +94 77 5935 789 | +44 7563 570502
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to