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 262672
Collapse All | Expand All

(-)a/openide.util.ui/src/org/netbeans/modules/openide/util/NbBundleProcessor.java (-1 / +1 lines)
Lines 299-305 Link Here
299
                    for (String method : methods.values()) {
299
                    for (String method : methods.values()) {
300
                        pw.print(method);
300
                        pw.print(method);
301
                    }
301
                    }
302
                    pw.println("    private void Bundle() {}");
302
                    pw.println("    private Bundle() {}");
303
                    pw.println("}");
303
                    pw.println("}");
304
                    pw.flush();
304
                    pw.flush();
305
                    pw.close();
305
                    pw.close();
(-)a/openide.util.ui/test/unit/src/org/netbeans/modules/openide/util/NbBundleProcessorTest.java (+9 lines)
Lines 316-321 Link Here
316
        assertTrue(err.toString(), err.toString().contains("NOI18N"));
316
        assertTrue(err.toString(), err.toString().contains("NOI18N"));
317
    }
317
    }
318
318
319
    public void testUtilityClass() {
320
        try {
321
            Bundle.class.newInstance();
322
            fail("should have thrown");
323
        } catch (Exception notAllowed) {
324
            // expected
325
        }
326
    }
327
319
    private static boolean isJDK7EarlyBuild() {
328
    private static boolean isJDK7EarlyBuild() {
320
        String run = System.getProperty("java.runtime.version");
329
        String run = System.getProperty("java.runtime.version");
321
        if ("1.7".equals(System.getProperty("java.specification.version")) && run != null) {
330
        if ("1.7".equals(System.getProperty("java.specification.version")) && run != null) {
(-)a/openide.util/src/org/netbeans/modules/openide/util/NbBundleProcessor.java (-1 / +1 lines)
Lines 299-305 Link Here
299
                    for (String method : methods.values()) {
299
                    for (String method : methods.values()) {
300
                        pw.print(method);
300
                        pw.print(method);
301
                    }
301
                    }
302
                    pw.println("    private void Bundle() {}");
302
                    pw.println("    private Bundle() {}");
303
                    pw.println("}");
303
                    pw.println("}");
304
                    pw.flush();
304
                    pw.flush();
305
                    pw.close();
305
                    pw.close();
(-)a/openide.util/test/unit/src/org/openide/util/NbBundleTest.java (+8 lines)
Lines 314-317 Link Here
314
        return new TreeMap<String,String>(NbCollections.checkedMapByFilter(p, String.class, String.class, true)).toString();
314
        return new TreeMap<String,String>(NbCollections.checkedMapByFilter(p, String.class, String.class, true)).toString();
315
    }
315
    }
316
316
317
    public void testUtilityClass() {
318
        try {
319
            Bundle.class.newInstance();
320
            fail("should have thrown");
321
        } catch (Exception notAllowed) {
322
            // expected
323
        }
324
    }
317
}
325
}

Return to bug 262672