Changeset 12225 in josm for trunk/src/org


Ignore:
Timestamp:
2017-05-22T01:29:27+02:00 (8 years ago)
Author:
Don-vip
Message:

findbugs - DP_DO_INSIDE_DO_PRIVILEGED

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/WinRegistry.java

    r12217 r12225  
    5656    static {
    5757        try {
    58             regOpenKey = userClass.getDeclaredMethod("WindowsRegOpenKey",
    59                     new Class[] { int.class, byte[].class, int.class });
    60             regOpenKey.setAccessible(true);
    61             regCloseKey = userClass.getDeclaredMethod("WindowsRegCloseKey",
    62                     new Class[] { int.class });
    63             regCloseKey.setAccessible(true);
    64             regQueryValueEx = userClass.getDeclaredMethod("WindowsRegQueryValueEx",
    65                     new Class[] { int.class, byte[].class });
    66             regQueryValueEx.setAccessible(true);
    67             regEnumValue = userClass.getDeclaredMethod("WindowsRegEnumValue",
    68                     new Class[] { int.class, int.class, int.class });
    69             regEnumValue.setAccessible(true);
    70             regQueryInfoKey = userClass.getDeclaredMethod("WindowsRegQueryInfoKey1",
    71                     new Class[] { int.class });
    72             regQueryInfoKey.setAccessible(true);
    73             regEnumKeyEx = userClass.getDeclaredMethod("WindowsRegEnumKeyEx",
    74                     new Class[] { int.class, int.class, int.class });
    75             regEnumKeyEx.setAccessible(true);
     58            regOpenKey = userClass.getDeclaredMethod("WindowsRegOpenKey", int.class, byte[].class, int.class);
     59            regCloseKey = userClass.getDeclaredMethod("WindowsRegCloseKey", int.class);
     60            regQueryValueEx = userClass.getDeclaredMethod("WindowsRegQueryValueEx", int.class, byte[].class);
     61            regEnumValue = userClass.getDeclaredMethod("WindowsRegEnumValue", int.class, int.class, int.class);
     62            regQueryInfoKey = userClass.getDeclaredMethod("WindowsRegQueryInfoKey1", int.class);
     63            regEnumKeyEx = userClass.getDeclaredMethod("WindowsRegEnumKeyEx", int.class, int.class, int.class);
     64            Utils.setObjectsAccessible(regOpenKey, regCloseKey, regQueryValueEx, regEnumValue, regQueryInfoKey, regEnumKeyEx);
    7665        } catch (SecurityException | ReflectiveOperationException e) {
    7766            throw new JosmRuntimeException(e);
Note: See TracChangeset for help on using the changeset viewer.