-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
b76
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136038 | emb-9 | Paul Sandoz | P4 | Resolved | Fixed | team |
In src/macosx/classes/java/util/prefs/MacOSXPreferences.java, the variable:
int componentCount = 0;
is not used:
private MacOSXPreferencesFile cfFileForNode(boolean isUser)
{
String name = path;
// /one/two/three/four/five/
// The fourth slash is the end of the first three components.
// If there is no fourth slash, the name has fewer than 3 components
int componentCount = 0;
int pos = -1;
for (int i = 0; i < 4; i++) {
pos = name.indexOf('/', pos+1);
if (pos == -1) break;
}
if (pos == -1) {
// fewer than three components - use default name
name = defaultAppName;
} else {
// truncate to three components, no leading or trailing '/'
// replace '/' with '.' to make filesystem happy
// convert to all lowercase to survive on HFS+
name = name.substring(1, pos);
name = name.replace('/', '.');
name = name.toLowerCase();
}
return MacOSXPreferencesFile.getFile(name, isUser);
}
int componentCount = 0;
is not used:
private MacOSXPreferencesFile cfFileForNode(boolean isUser)
{
String name = path;
// /one/two/three/four/five/
// The fourth slash is the end of the first three components.
// If there is no fourth slash, the name has fewer than 3 components
int componentCount = 0;
int pos = -1;
for (int i = 0; i < 4; i++) {
pos = name.indexOf('/', pos+1);
if (pos == -1) break;
}
if (pos == -1) {
// fewer than three components - use default name
name = defaultAppName;
} else {
// truncate to three components, no leading or trailing '/'
// replace '/' with '.' to make filesystem happy
// convert to all lowercase to survive on HFS+
name = name.substring(1, pos);
name = name.replace('/', '.');
name = name.toLowerCase();
}
return MacOSXPreferencesFile.getFile(name, isUser);
}
- backported by
-
JDK-8136038 (prefs) Unused variable in src/java.prefs/share/classes/java/util/prefs/MacOSXPreferences.java
-
- Resolved
-