- Timestamp:
- 2024-04-18T07:20:26+02:00 (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r18985 r19041 293 293 294 294 /** 295 * Returns the Windows display version from registry (example: "22H2") 296 * @return the Windows display version from registry 297 * @throws IllegalAccessException if Java language access control is enforced and the underlying method is inaccessible 298 * @throws InvocationTargetException if the underlying method throws an exception 299 * @since 19041 300 */ 301 public static String getDisplayVersion() throws IllegalAccessException, InvocationTargetException { 302 return WinRegistry.readString(HKEY_LOCAL_MACHINE, CURRENT_VERSION, "DisplayVersion"); 303 } 304 305 /** 295 306 * Returns the Windows current build number from registry (example: "15063") 296 307 * @return the Windows current build number from registry … … 307 318 try { 308 319 sb.append(getProductName()); 309 String releaseId = getReleaseId(); 310 if (releaseId != null) { 311 sb.append(' ').append(releaseId); 320 String displayVersion = getDisplayVersion(); 321 if (displayVersion != null) { 322 sb.append(' ').append(displayVersion); 323 } else { 324 String releaseId = getReleaseId(); 325 if (releaseId != null) { 326 sb.append(' ').append(releaseId); 327 } 312 328 } 313 329 sb.append(" (").append(getCurrentBuild()).append(')');
Note:
See TracChangeset
for help on using the changeset viewer.