package org.beanmaker.util;

import java.util.Locale;
import java.util.ResourceBundle;

public class BaseView {
    final private String resourceBundleName;
    protected ResourceBundle resourceBundle;
    protected Locale locale;

    public BaseView(final String resourceBundleName) {
        this.resourceBundleName = resourceBundleName;
        setLocale(Locale.getDefault());
    }

    public void setLocale(final Locale locale) {
        this.locale = locale;
        resourceBundle = ResourceBundle.getBundle(resourceBundleName, locale);
    }
}

package org.beanmaker.util;

import java.util.Locale;
import java.util.ResourceBundle;

public class BaseView {
    final private String resourceBundleName;
    protected ResourceBundle resourceBundle;
    protected Locale locale;

    public BaseView(final String resourceBundleName) {
        this.resourceBundleName = resourceBundleName;
        initLocale(Locale.getDefault());
    }

    private void initLocale(final Locale locale) {
        this.locale = locale;
        resourceBundle = ResourceBundle.getBundle(resourceBundleName, locale);
    }

    public void setLocale(final Locale locale) {
        initLocale(locale);
    }
}

Move resource bundle management to private non overridable function
Move resource bundle management to private non overridable function

Correct initialization bug in beans. BaseView.setLocale() was called
from constructor. This was a problem, since this function is
frequently overloaded in subclasses and might need to access the
superclass object to function properly.

Bug was present in generated BeanHTMLViewBase classes.
