This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246668 - There is no setup of local host
Summary: There is no setup of local host
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-25 08:24 UTC by Alexander Simon
Modified: 2017-04-03 18:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (18.84 KB, patch)
2014-08-25 08:39 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2014-08-25 08:24:35 UTC
Local host has a critical service required by most of C/C++ functionality.
It is a HostInfoUtils.getHostInfo(ExecutionEnvironmentFactory.getLocal()).
Getting host info is a long operation that can throw exception.
To avoid catching exceptions a lot of C/C++ clients check availability of host info before getting one:

HostInfo hostInfo = null;
if (HostInfoUtils.isHostInfoAvailable(env)) {
  try {
    hostInfo = HostInfoUtils.getHostInfo(env);
  } catch (IOException | ConnectionManager.CancellationException ex) {
    Exceptions.printStackTrace(ex);
  }
}

This pattern resolves processing unexpected exceptions in C/C++ clients.
If all clients will be use such pattern the initializing of local host info is not occurred.

Local host info should initialized at startup IDE before using by C/C++ clients.
Comment 1 Alexander Simon 2014-08-25 08:39:42 UTC
Created attachment 148873 [details]
proposed patch
Comment 2 Maria Tishkova 2014-11-20 09:42:41 UTC
Need to take a look at the patch.
Comment 3 Alexander Simon 2017-04-03 18:26:04 UTC
(In reply to Maria Tishkova from comment #2)
> Need to take a look at the patch.

What is result of review?