sdedic commented on code in PR #6309:
URL: https://github.com/apache/netbeans/pull/6309#discussion_r1334359053
##########
platform/o.n.bootstrap/src/org/netbeans/ProxyClassLoader.java:
##########
@@ -468,28 +468,32 @@ protected Package getPackage(String name) {
* @return located package, or null
*/
protected Package getPackageFast(String name, boolean recurse) {
- synchronized (packages) {
- Package pkg = packages.get(name);
- if (pkg != null) {
- return pkg;
- }
- if (!recurse) {
- return null;
- }
+ Package pkg = packages.get(name);
+ if (pkg != null) {
+ return pkg;
+ }
+ if (!recurse) {
+ return null;
+ }
+ synchronized(packages) {
+ pkg = packages.get(name);
String path = name.replace('.', '/');
Review Comment:
Probably missing another `if (pkg != null)` this time after entering this
critical section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists