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.

View | Details | Raw Unified | Return to bug 34914
Collapse All | Expand All

(-)settings/src/org/netbeans/modules/settings/convertors/SerialDataNode.java (-11 / +18 lines)
Lines 269-273 Link Here
269
            Class[] param = new Class [0];
270
            try {
271
                nameGetter = clazz.getMethod ("getName", param); // NOI18N
272
                if (nameGetter.getReturnType () != String.class) throw new NoSuchMethodException ();
273
            } catch (NoSuchMethodException e) {
Line 275 Link Here
275
                    nameGetter = clazz.getMethod ("getDisplayName", param); // NOI18N
270
                    //issue 34914, serialized bean names showing up in different
276
--
271
                    //locales - we must look first for SystemOption.displayName() - 
272
                    //its getName() method *will* be serialized if any settings
273
                    //have been changed; if the user restarts in a different 
274
                    //locale, the previous locale's of the name will be shown
275
                    nameGetter = clazz.getMethod("displayName", null); //NOI18N
Lines 277-279 Link Here
277
                } catch (NoSuchMethodException ee) {
277
                } catch (NoSuchMethodException nsme) {
278
                    return null;
278
                    try {
279
                }
279
                        nameGetter = clazz.getMethod ("getDisplayName", null); // NOI18N
280
--
280
                        if (nameGetter.getReturnType () != String.class) throw new NoSuchMethodException ();
281
                    } catch (NoSuchMethodException e) {
282
                        try {
283
                            nameGetter = clazz.getMethod ("getName", null); // NOI18N
284
                            if (nameGetter.getReturnType () != String.class) throw new NoSuchMethodException ();
285
                        } catch (NoSuchMethodException ee) {
286
                            return null;
287
                        }
288
                    }
(-)src/org/netbeans/core/projects/SerialDataNode.java (-11 / +20 lines)
Line 250 Link Here
250
    /** Try to get display name of the bean.
251
     */
Lines 260-264 Link Here
260
            Class[] param = new Class [0];
261
            try {
262
                nameGetter = clazz.getMethod ("getName", param); // NOI18N
263
                if (nameGetter.getReturnType () != String.class) throw new NoSuchMethodException ();
264
            } catch (NoSuchMethodException e) {
Line 266 Link Here
266
                    nameGetter = clazz.getMethod ("getDisplayName", param); // NOI18N
263
                    //issue 34914, serialized bean names showing up in different
267
--
264
                    //locales - we must look first for SystemOption.displayName() - 
265
                    //its getName() method *will* be serialized if any settings
266
                    //have been changed; if the user restarts in a different 
267
                    //locale, the previous locale's of the name will be shown
268
                    nameGetter = clazz.getMethod("displayName", null); //NOI18N
Lines 268-270 Link Here
268
                } catch (NoSuchMethodException ee) {
270
                } catch (NoSuchMethodException nsme) {
269
                    return null;
271
                    try {
270
                }
272
                        nameGetter = clazz.getMethod ("getDisplayName", null); // NOI18N
271
--
273
                        if (nameGetter.getReturnType () != String.class) throw new NoSuchMethodException ();
274
                    } catch (NoSuchMethodException e) {
275
                        try {
276
                            nameGetter = clazz.getMethod ("getName", null); // NOI18N
277
                            if (nameGetter.getReturnType () != String.class) throw new NoSuchMethodException ();
278
                        } catch (NoSuchMethodException ee) {
279
                            return null;
280
                        }
281
                    }

Return to bug 34914