import java.text.*;
import java.util.*;

public class Test {
	private static final String LONG_FORMAT_NOERA = "yyyy/MMMM/dddd/hhhh/mmmm/ss/aaaa/EEEE";
    private static final String LONG_FORMAT = "GGGG/" + LONG_FORMAT_NOERA;
	private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
	
    public static void main(String[] args) throws ParseException {
		Test test = new Test();
        //test.java15BuggyLocaleTestAll();
		test.java15BuggyLocaleTest();
    }
	
	public void java15BuggyLocaleTestAll() throws ParseException {
        for (final Locale locale : Locale.getAvailableLocales()) {
            testSingleLocale(locale);
        }
    }

    public void java15BuggyLocaleTest() throws ParseException {
        final String buggyLocaleName = "ff_LR_#Adlm";
        Locale buggyLocale = null;
        for (final Locale locale : Locale.getAvailableLocales()) {
            if (buggyLocaleName.equals(locale.toString())) {
                buggyLocale = locale;
				System.out.println("Find the locale: ff_LR_#Adlm");
                break;
            }
        }
        if (buggyLocale == null) {
            return;
        }
        testSingleLocale(buggyLocale);
    }

    private void testSingleLocale(Locale locale) throws ParseException {
        final Calendar cal = Calendar.getInstance(GMT);
        cal.clear();
        cal.set(2003, Calendar.FEBRUARY, 10);
        final SimpleDateFormat sdf = new SimpleDateFormat(LONG_FORMAT, locale);
        final String formattedDate = sdf.format(cal.getTime());
        sdf.parse(formattedDate);
        sdf.parse(formattedDate.toUpperCase(locale));
        sdf.parse(formattedDate.toLowerCase(locale));
    }
}
