processOsReleaseFile() — netty Function Reference
Architecture documentation for the processOsReleaseFile() function in PlatformDependent.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 04af2971_ee46_5718_75c6_cb4b676d93ea["processOsReleaseFile()"] 2e66d079_807f_6785_864f_73ab09fbc515["PlatformDependent"] 04af2971_ee46_5718_75c6_cb4b676d93ea -->|defined in| 2e66d079_807f_6785_864f_73ab09fbc515 1c895ca2_fef1_2d9b_57c3_408b0d38cf3d["addFilesystemOsClassifiers()"] 1c895ca2_fef1_2d9b_57c3_408b0d38cf3d -->|calls| 04af2971_ee46_5718_75c6_cb4b676d93ea b63b354c_fa66_c294_5025_45df39045571["addClassifier()"] 04af2971_ee46_5718_75c6_cb4b676d93ea -->|calls| b63b354c_fa66_c294_5025_45df39045571 style 04af2971_ee46_5718_75c6_cb4b676d93ea fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/internal/PlatformDependent.java lines 304–336
private static boolean processOsReleaseFile(String osReleaseFileName, Set<String> availableClassifiers) {
Path file = Paths.get(osReleaseFileName);
return AccessController.doPrivileged((PrivilegedAction<Boolean>) () -> {
try {
if (Files.exists(file)) {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(
new BoundedInputStream(Files.newInputStream(file)), StandardCharsets.UTF_8))) {
String line;
while ((line = reader.readLine()) != null) {
if (line.startsWith(LINUX_ID_PREFIX)) {
String id = normalizeOsReleaseVariableValue(
line.substring(LINUX_ID_PREFIX.length()));
addClassifier(availableClassifiers, id);
} else if (line.startsWith(LINUX_ID_LIKE_PREFIX)) {
line = normalizeOsReleaseVariableValue(
line.substring(LINUX_ID_LIKE_PREFIX.length()));
addClassifier(availableClassifiers, line.split(" "));
}
}
} catch (SecurityException e) {
logger.debug("Unable to read {}", osReleaseFileName, e);
} catch (IOException e) {
logger.debug("Error while reading content of {}", osReleaseFileName, e);
}
// specification states we should only fall back if /etc/os-release does not exist
return true;
}
} catch (SecurityException e) {
logger.debug("Unable to check if {} exists", osReleaseFileName, e);
}
return false;
});
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does processOsReleaseFile() do?
processOsReleaseFile() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/PlatformDependent.java.
Where is processOsReleaseFile() defined?
processOsReleaseFile() is defined in common/src/main/java/io/netty/util/internal/PlatformDependent.java at line 304.
What does processOsReleaseFile() call?
processOsReleaseFile() calls 1 function(s): addClassifier.
What calls processOsReleaseFile()?
processOsReleaseFile() is called by 1 function(s): addFilesystemOsClassifiers.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free