diff --git a/icu4j/main/shared/build/common-targets.xml b/icu4j/main/shared/build/common-targets.xml index 3134360d9b9..69be17381e6 100644 --- a/icu4j/main/shared/build/common-targets.xml +++ b/icu4j/main/shared/build/common-targets.xml @@ -256,7 +256,7 @@ - + @@ -274,6 +274,7 @@ + @@ -308,6 +309,7 @@ + @@ -374,6 +376,7 @@ + diff --git a/icu4j/main/tests/charset/.classpath b/icu4j/main/tests/charset/.classpath index f18976940e5..6489a0de436 100644 --- a/icu4j/main/tests/charset/.classpath +++ b/icu4j/main/tests/charset/.classpath @@ -1,7 +1,11 @@ - + + + + + @@ -16,5 +20,6 @@ + diff --git a/icu4j/main/tests/core/.classpath b/icu4j/main/tests/core/.classpath index 373b88f64b5..dce1f13899d 100644 --- a/icu4j/main/tests/core/.classpath +++ b/icu4j/main/tests/core/.classpath @@ -1,7 +1,11 @@ - + + + + + @@ -18,6 +22,5 @@ - diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/ModuleTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/ModuleTest.java similarity index 100% rename from icu4j/main/tests/framework/src/com/ibm/icu/dev/test/ModuleTest.java rename to icu4j/main/tests/core/src/com/ibm/icu/dev/test/ModuleTest.java diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/ResourceModule.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/ResourceModule.java similarity index 100% rename from icu4j/main/tests/framework/src/com/ibm/icu/dev/test/ResourceModule.java rename to icu4j/main/tests/core/src/com/ibm/icu/dev/test/ResourceModule.java diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestDataModule.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/TestDataModule.java similarity index 100% rename from icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestDataModule.java rename to icu4j/main/tests/core/src/com/ibm/icu/dev/test/TestDataModule.java diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CalendarRegressionTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CalendarRegressionTest.java index 9eabd4182f0..7ec63c5c37a 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CalendarRegressionTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CalendarRegressionTest.java @@ -1215,35 +1215,41 @@ public class CalendarRegressionTest extends com.ibm.icu.dev.test.TestFmwk { */ @Test public void Test4162587() { - TimeZone tz = TimeZone.getTimeZone("PST"); - TimeZone.setDefault(tz); - GregorianCalendar cal = new GregorianCalendar(tz); - Date d; + TimeZone saveZone = TimeZone.getDefault(); - for (int i=0; i<5; ++i) { - if (i>0) logln("---"); + try { + TimeZone tz = TimeZone.getTimeZone("PST"); + TimeZone.setDefault(tz); + GregorianCalendar cal = new GregorianCalendar(tz); + Date d; - cal.clear(); - cal.set(1998, Calendar.APRIL, 5, i, 0); - d = cal.getTime(); - String s0 = d.toString(); - logln("0 " + i + ": " + s0); + for (int i=0; i<5; ++i) { + if (i>0) logln("---"); - cal.clear(); - cal.set(1998, Calendar.APRIL, 4, i+24, 0); - d = cal.getTime(); - String sPlus = d.toString(); - logln("+ " + i + ": " + sPlus); + cal.clear(); + cal.set(1998, Calendar.APRIL, 5, i, 0); + d = cal.getTime(); + String s0 = d.toString(); + logln("0 " + i + ": " + s0); - cal.clear(); - cal.set(1998, Calendar.APRIL, 6, i-24, 0); - d = cal.getTime(); - String sMinus = d.toString(); - logln("- " + i + ": " + sMinus); + cal.clear(); + cal.set(1998, Calendar.APRIL, 4, i+24, 0); + d = cal.getTime(); + String sPlus = d.toString(); + logln("+ " + i + ": " + sPlus); - if (!s0.equals(sPlus) || !s0.equals(sMinus)) { - errln("Fail: All three lines must match"); + cal.clear(); + cal.set(1998, Calendar.APRIL, 6, i-24, 0); + d = cal.getTime(); + String sMinus = d.toString(); + logln("- " + i + ": " + sMinus); + + if (!s0.equals(sPlus) || !s0.equals(sMinus)) { + errln("Fail: All three lines must match"); + } } + } finally { + TimeZone.setDefault(saveZone); } } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java index 627aedf65e1..da0f83a882e 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java @@ -75,6 +75,7 @@ public class DateFormatTest extends TestFmwk { */ @Test public void TestPatterns() { + final String[][] EXPECTED = { {DateFormat.YEAR, "y","en","y"}, @@ -2767,10 +2768,10 @@ public class DateFormatTest extends TestFmwk { logln("time zone ex3 ok"); } catch (Exception e) { - // hmmm... this shouldn't happen. don't want to exit this - // fn with timezone improperly set, so just in case - TimeZone.setDefault(oldtz); + // hmmm... this shouldn't happen. throw new IllegalStateException(e.getMessage()); + } finally { + TimeZone.setDefault(oldtz); } } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBILSTMTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBILSTMTest.java index 3c9545d26ac..92d8e826156 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBILSTMTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBILSTMTest.java @@ -13,7 +13,6 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import com.ibm.icu.dev.test.TestFmwk; -import com.ibm.icu.dev.test.TestUtil; import com.ibm.icu.impl.breakiter.LSTMBreakEngine; import com.ibm.icu.lang.UScript; import com.ibm.icu.text.BreakIterator; @@ -43,7 +42,7 @@ public class RBBILSTMTest extends TestFmwk { private void runTestFromFile(String filename, int script) { // The expectation in this test depends on LSTM, skip the test if the // configuration is not build with LSTM data. - org.junit.Assume.assumeTrue(!TestUtil.skipLSTMTest()); + org.junit.Assume.assumeTrue(!RBBITstUtils.skipLSTMTest()); BreakIterator bi = BreakIterator.getWordInstance(); String testString; diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITest.java index 64aba243a93..14a7659455f 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITest.java @@ -26,7 +26,6 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import com.ibm.icu.dev.test.TestFmwk; -import com.ibm.icu.dev.test.TestUtil; import com.ibm.icu.impl.RBBIDataWrapper; import com.ibm.icu.text.BreakIterator; import com.ibm.icu.text.RuleBasedBreakIterator; @@ -45,7 +44,7 @@ public class RBBITest extends TestFmwk { public void TestThaiDictionaryBreakIterator() { // The expectations in this test heavily depends on the Thai dictionary. // Therefore, we skip this test under the LSTM configuration. - org.junit.Assume.assumeTrue(!TestUtil.skipDictionaryTest()); + org.junit.Assume.assumeTrue(!RBBITstUtils.skipDictionaryTest()); int position; int index; int result[] = { 1, 2, 5, 10, 11, 12, 11, 10, 5, 2, 1, 0 }; diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITestExtended.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITestExtended.java index 427955bfab7..183e24a3fec 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITestExtended.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITestExtended.java @@ -19,7 +19,6 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import com.ibm.icu.dev.test.TestFmwk; -import com.ibm.icu.dev.test.TestUtil; import com.ibm.icu.impl.ICUConfig; import com.ibm.icu.impl.Utility; import com.ibm.icu.lang.UCharacter; @@ -56,7 +55,7 @@ static class TestParams { public void TestExtended() { // The expectations in this test heavily depends on the Thai dictionary. // Therefore, we skip this test under the LSTM configuration. - org.junit.Assume.assumeTrue(!TestUtil.skipDictionaryTest()); + org.junit.Assume.assumeTrue(!RBBITstUtils.skipDictionaryTest()); TestParams tp = new TestParams(); diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITstUtils.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITstUtils.java new file mode 100644 index 00000000000..079f1c6d9f7 --- /dev/null +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITstUtils.java @@ -0,0 +1,40 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* + ******************************************************************************* + * Copyright (C) 1996-2012, International Business Machines Corporation and * + * others. All Rights Reserved. * + ******************************************************************************* + */ +package com.ibm.icu.dev.test.rbbi; + +import java.util.MissingResourceException; + +import com.ibm.icu.impl.breakiter.LSTMBreakEngine; +import com.ibm.icu.lang.UScript; + +public class RBBITstUtils { + static boolean lstmDataIsBuilt() { + try { + LSTMBreakEngine.createData(UScript.THAI); + return true; + } catch (MissingResourceException e) { + // do nothing + } + try { + LSTMBreakEngine.createData(UScript.MYANMAR); + return true; + } catch (MissingResourceException e) { + // do nothing + } + return false; + } + + static boolean skipLSTMTest() { + return ! lstmDataIsBuilt(); + } + + public static boolean skipDictionaryTest() { + return lstmDataIsBuilt(); + } +} diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/serializable/SerializableWriter.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/serializable/SerializableWriter.java index fd620fccdd8..f64021af82e 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/serializable/SerializableWriter.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/serializable/SerializableWriter.java @@ -71,11 +71,16 @@ public class SerializableWriter // Override default TimeZone, so serialized data always use // the consistent zone if not specified. - TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); + TimeZone savedZone = TimeZone.getDefault(); + try { + TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); - SerializableWriter writer = new SerializableWriter(outDir); + SerializableWriter writer = new SerializableWriter(outDir); - writer.serialize(); + writer.serialize(); + } finally { + TimeZone.setDefault(savedZone); + } } public void serialize() throws IOException { diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneBoundaryTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneBoundaryTest.java index 9f29c25dcec..8b8271cc5cc 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneBoundaryTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneBoundaryTest.java @@ -444,15 +444,19 @@ public class TimeZoneBoundaryTest extends TestFmwk // support historic transitions, therefore, the test below // will fail on such environment (with the latest TimeZone // patch for US 2007+ rule). - if (TestUtil.getJavaVendor() == JavaVendor.Android || TestUtil.getJavaVersion() > 3) { - // This only works in PST/PDT - TimeZone.setDefault(safeGetTimeZone("PST")); - logln("========================================"); - tempcal.set(1997, 0, 1); - findDaylightBoundaryUsingDate(tempcal.getTime(), "PST", PST_1997_BEG); - logln("========================================"); - tempcal.set(1997, 6, 1); - findDaylightBoundaryUsingDate(tempcal.getTime(), "PDT", PST_1997_END); + try { + if (TestUtil.getJavaVendor() == JavaVendor.Android || TestUtil.getJavaVersion() > 3) { + // This only works in PST/PDT + TimeZone.setDefault(safeGetTimeZone("PST")); + logln("========================================"); + tempcal.set(1997, 0, 1); + findDaylightBoundaryUsingDate(tempcal.getTime(), "PST", PST_1997_BEG); + logln("========================================"); + tempcal.set(1997, 6, 1); + findDaylightBoundaryUsingDate(tempcal.getTime(), "PDT", PST_1997_END); + } + } finally { + TimeZone.setDefault(save); } // if (true) @@ -856,4 +860,16 @@ public class TimeZoneBoundaryTest extends TestFmwk findBoundariesStepwise(1997, ONE_DAY, safeGetTimeZone("America/Phoenix"), 0); // Added 3Jan01 findBoundariesStepwise(1997, ONE_DAY, safeGetTimeZone(AUSTRALIA), 2); } + + private static TimeZone safeGetTimeZone(String id) { + TimeZone tz = TimeZone.getTimeZone(id); + if (tz == null) { + // should never happen + errln("FAIL: TimeZone.getTimeZone(" + id + ") => null"); + } + if (!tz.getID().equals(id)) { + warnln("FAIL: TimeZone.getTimeZone(" + id + ") => " + tz.getID()); + } + return tz; + } } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneRegressionTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneRegressionTest.java index be774fa9f18..bf10b1f6848 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneRegressionTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneRegressionTest.java @@ -312,7 +312,7 @@ public class TimeZoneRegressionTest extends TestFmwk { TimeZone initialZone = TimeZone.getDefault(); Calendar cal = Calendar.getInstance(); TimeZone tz = TimeZone.getTimeZone("PST"); - TimeZone.setDefault(tz); + TimeZone.setDefault(tz); cal.setTimeZone(tz); java.util.Calendar tempcal = java.util.Calendar.getInstance(); diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java index 606f492c0e1..8b583a3b086 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java @@ -1377,19 +1377,24 @@ public class TimeZoneTest extends TestFmwk @Test public void TestZoneMeta() { java.util.TimeZone save = java.util.TimeZone.getDefault(); - java.util.TimeZone newZone = java.util.TimeZone.getTimeZone("GMT-08:00"); - com.ibm.icu.util.TimeZone.setDefault(null); - java.util.TimeZone.setDefault(newZone); - SimpleTimeZone zone = new SimpleTimeZone(0, "GMT"); - com.ibm.icu.util.TimeZone defaultZone = com.ibm.icu.util.TimeZone.getDefault(); - if(defaultZone==null){ - errln("TimeZone.getDefault() failed for GMT-08:00"); + com.ibm.icu.util.TimeZone icuTzSave = com.ibm.icu.util.TimeZone.getDefault(); + try { + java.util.TimeZone newZone = java.util.TimeZone.getTimeZone("GMT-08:00"); + com.ibm.icu.util.TimeZone.setDefault(null); + java.util.TimeZone.setDefault(newZone); + SimpleTimeZone zone = new SimpleTimeZone(0, "GMT"); + com.ibm.icu.util.TimeZone defaultZone = com.ibm.icu.util.TimeZone.getDefault(); + if(defaultZone==null){ + errln("TimeZone.getDefault() failed for GMT-08:00"); + } + if(zone==null){ + errln("SimpleTimeZone(0, GMT-08:00) failed for GMT-08:00"); + } + } finally { + // reset timezones + java.util.TimeZone.setDefault(save); + com.ibm.icu.util.TimeZone.setDefault(icuTzSave); } - if(zone==null){ - errln("SimpleTimeZone(0, GMT-08:00) failed for GMT-08:00"); - } - //reset - java.util.TimeZone.setDefault(save); } // Copied from the protected constant in TimeZone. @@ -1720,6 +1725,7 @@ public class TimeZoneTest extends TestFmwk @Test public void TestSetDefault() { java.util.TimeZone save = java.util.TimeZone.getDefault(); + TimeZone icuSave = TimeZone.getDefault(); /* * America/Caracs (Venezuela) changed the base offset from -4:00 to @@ -1772,6 +1778,7 @@ public class TimeZoneTest extends TestFmwk } // Restore the original JDK time zone + TimeZone.setDefault(icuSave); java.util.TimeZone.setDefault(save); } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/TrieMapTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/TrieMapTest.java index 166c11ef40e..cb5d58f84a8 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/TrieMapTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/TrieMapTest.java @@ -8,6 +8,7 @@ */ package com.ibm.icu.dev.test.util; +import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -32,7 +33,6 @@ import com.ibm.icu.impl.Row.R3; import com.ibm.icu.impl.Utility; import com.ibm.icu.lang.UCharacter; import com.ibm.icu.lang.UScript; -import com.ibm.icu.text.DecimalFormat; import com.ibm.icu.text.UnicodeSet; import com.ibm.icu.util.StringTrieBuilder.Option; import com.ibm.icu.util.ULocale; diff --git a/icu4j/tools/misc/src/com/ibm/icu/dev/tool/locale/LikelySubtagsBuilder.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/tool/locale/LikelySubtagsBuilder.java similarity index 100% rename from icu4j/tools/misc/src/com/ibm/icu/dev/tool/locale/LikelySubtagsBuilder.java rename to icu4j/main/tests/core/src/com/ibm/icu/dev/tool/locale/LikelySubtagsBuilder.java diff --git a/icu4j/tools/misc/src/com/ibm/icu/dev/tool/locale/LocaleDistanceBuilder.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/tool/locale/LocaleDistanceBuilder.java similarity index 100% rename from icu4j/tools/misc/src/com/ibm/icu/dev/tool/locale/LocaleDistanceBuilder.java rename to icu4j/main/tests/core/src/com/ibm/icu/dev/tool/locale/LocaleDistanceBuilder.java diff --git a/icu4j/main/tests/framework/.classpath b/icu4j/main/tests/framework/.classpath index 4f8f76d62b1..ce5860d6519 100644 --- a/icu4j/main/tests/framework/.classpath +++ b/icu4j/main/tests/framework/.classpath @@ -1,8 +1,11 @@ - - + + + + + diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/AbstractTestLog.java b/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/AbstractTestLog.java index e6dc664c1f9..02169cbf8b2 100644 --- a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/AbstractTestLog.java +++ b/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/AbstractTestLog.java @@ -14,37 +14,7 @@ import java.util.GregorianCalendar; import org.junit.Assert; -import com.ibm.icu.util.VersionInfo; - public abstract class AbstractTestLog implements TestLog { - /** - * Returns true if ICU_Version < major.minor. - */ - static public boolean isICUVersionBefore(int major, int minor) { - return isICUVersionBefore(major, minor, 0); - } - - /** - * Returns true if ICU_Version < major.minor.milli. - */ - static public boolean isICUVersionBefore(int major, int minor, int milli) { - return VersionInfo.ICU_VERSION.compareTo(VersionInfo.getInstance(major, minor, milli)) < 0; - } - - /** - * Returns true if ICU_Version >= major.minor. - */ - static public boolean isICUVersionAtLeast(int major, int minor) { - return isICUVersionAtLeast(major, minor, 0); - } - - /** - * Returns true if ICU_Version >= major.minor.milli. - */ - static public boolean isICUVersionAtLeast(int major, int minor, int milli) { - return !isICUVersionBefore(major, minor, milli); - } - /** * Add a message. */ diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestFmwk.java b/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestFmwk.java index 349578bfa5d..f6bf8e3c0be 100644 --- a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestFmwk.java +++ b/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestFmwk.java @@ -16,15 +16,13 @@ import java.util.Arrays; import java.util.Locale; import java.util.Properties; import java.util.Random; +import java.util.TimeZone; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; -import com.ibm.icu.util.TimeZone; -import com.ibm.icu.util.ULocale; - /** * TestFmwk is a base class for tests that can be run conveniently from the * command line as well as under the Java test harness. @@ -222,19 +220,6 @@ abstract public class TestFmwk extends AbstractTestLog { return getParams().getIntProperty(key, defVal, maxVal); } - protected static TimeZone safeGetTimeZone(String id) { - TimeZone tz = TimeZone.getTimeZone(id); - if (tz == null) { - // should never happen - errln("FAIL: TimeZone.getTimeZone(" + id + ") => null"); - } - if (!tz.getID().equals(id)) { - warnln("FAIL: TimeZone.getTimeZone(" + id + ") => " + tz.getID()); - } - return tz; - } - - // Utility Methods protected static String hex(char[] s){ @@ -482,6 +467,9 @@ abstract public class TestFmwk extends AbstractTestLog { * Check the given array to see that all the locales in the expected array * are present. * + * @param + * the type of the objects to check, must have a toString method, + * so anything will do * @param msg * string message, for log output * @param array @@ -490,27 +478,7 @@ abstract public class TestFmwk extends AbstractTestLog { * array of locales names we expect to see, or null * @return the length of 'array' */ - protected static int checkArray(String msg, Locale array[], String expected[]) { - String strs[] = new String[array.length]; - for (int i = 0; i < array.length; ++i) { - strs[i] = array[i].toString(); - } - return checkArray(msg, strs, expected); - } - - /** - * Check the given array to see that all the locales in the expected array - * are present. - * - * @param msg - * string message, for log output - * @param array - * array of locales to check - * @param expected - * array of locales names we expect to see, or null - * @return the length of 'array' - */ - protected static int checkArray(String msg, ULocale array[], String expected[]) { + protected static int checkArray(String msg, T array[], String expected[]) { String strs[] = new String[array.length]; for (int i = 0; i < array.length; ++i) { strs[i] = array[i].toString(); @@ -767,5 +735,4 @@ abstract public class TestFmwk extends AbstractTestLog { // System.out.println(); // } } - } diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java b/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java index 59e4dcbe7d7..5980747f4bb 100644 --- a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java +++ b/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java @@ -15,10 +15,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Locale; -import java.util.MissingResourceException; - -import com.ibm.icu.impl.breakiter.LSTMBreakEngine; -import com.ibm.icu.lang.UScript; public final class TestUtil { /** @@ -283,28 +279,4 @@ public final class TestUtil { } return ver; } - - private static boolean lstmDataIsBuilt() { - try { - LSTMBreakEngine.createData(UScript.THAI); - return true; - } catch (MissingResourceException e) { - // do nothing - } - try { - LSTMBreakEngine.createData(UScript.MYANMAR); - return true; - } catch (MissingResourceException e) { - // do nothing - } - return false; - } - - public static boolean skipLSTMTest() { - return ! lstmDataIsBuilt(); - } - - public static boolean skipDictionaryTest() { - return lstmDataIsBuilt(); - } } diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/CollectionUtilities.java b/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/CollectionUtilities.java index 7a6c15dd7a2..7dbb943c324 100644 --- a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/CollectionUtilities.java +++ b/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/CollectionUtilities.java @@ -19,10 +19,6 @@ import java.util.SortedSet; import java.util.TreeSet; import java.util.regex.Matcher; -import com.ibm.icu.text.UTF16; -import com.ibm.icu.text.UnicodeSet; -import com.ibm.icu.text.UnicodeSetIterator; - /** * Utilities that ought to be on collections, but aren't * @@ -410,16 +406,6 @@ public final class CollectionUtilities { return result; } - public static String remove(String source, UnicodeSet removals) { - StringBuffer result = new StringBuffer(); - int cp; - for (int i = 0; i < source.length(); i += UTF16.getCharCount(cp)) { - cp = UTF16.charAt(source, i); - if (!removals.contains(cp)) UTF16.append(result, cp); - } - return result.toString(); - } - /** * Does one string contain another, starting at a specific offset? * @param text @@ -439,57 +425,6 @@ public final class CollectionUtilities { return i; } - /** - * Returns the ending offset found by matching characters with testSet, until a position is found that doen't match - * @param string - * @param offset - * @param testSet - * @return - */ - public int span(CharSequence string, int offset, UnicodeSet testSet) { - while (true) { - int newOffset = testSet.matchesAt(string, offset); - if (newOffset < 0) return offset; - } - } - - /** - * Returns the ending offset found by matching characters with testSet, until a position is found that does match - * @param string - * @param offset - * @param testSet - * @return - */ - public int spanNot(CharSequence string, int offset, UnicodeSet testSet) { - while (true) { - int newOffset = testSet.matchesAt(string, offset); - if (newOffset >= 0) return offset; - ++offset; // try next character position - // we don't have to worry about surrogates for this. - } - } - - /** - * Modifies Unicode set to flatten the strings. Eg [abc{da}] => [abcd] - * Returns the set for chaining. - * @param exemplar1 - * @return - */ - public static UnicodeSet flatten(UnicodeSet exemplar1) { - UnicodeSet result = new UnicodeSet(); - boolean gotString = false; - for (UnicodeSetIterator it = new UnicodeSetIterator(exemplar1); it.nextRange();) { - if (it.codepoint == UnicodeSetIterator.IS_STRING) { - result.addAll(it.string); - gotString = true; - } else { - result.add(it.codepoint, it.codepointEnd); - } - } - if (gotString) exemplar1.set(result); - return exemplar1; - } - /** * For producing filtered iterators */ diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ElapsedTimer.java b/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ElapsedTimer.java deleted file mode 100644 index 855d798b5a6..00000000000 --- a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ElapsedTimer.java +++ /dev/null @@ -1,110 +0,0 @@ -// © 2016 and later: Unicode, Inc. and others. -// License & terms of use: http://www.unicode.org/copyright.html -// -// ElapsedTimer.java -// -// Created by Steven R. Loomis on 11/11/2005. -// Copyright 2005-2012 IBM. All rights reserved. -// - -package com.ibm.icu.dev.util; - -import java.util.Locale; - -import com.ibm.icu.text.MessageFormat; -import com.ibm.icu.text.NumberFormat; -import com.ibm.icu.text.RuleBasedNumberFormat; - - -/** - * Simple stopwatch timer. - * Usage: { ElapsedTimer et = new ElapsedTimer(); - * do_some_stuff; - * System.out.println("It took " + et + " to do stuff."); } - * - * Advanced: { ElapsedTimer et = new ElapsedTimer("Thing2's time: {0}"); // messageformat pattern - * do_thing_2(); - * System.out.println(et.toString()); } - * - * More advanced: NumberFormat and/or MessageFormat can be provided in the constructor - * - * @internal CLDR - */ -public final class ElapsedTimer { - - /** - * Convenience method to print the elasped time (in milliseconds) - */ - public static String elapsedTime(long start, long end) { - return diffTime(getFormat(), start, end); - } - - public static String elapsedTime(long start) { - return diffTime(getFormat(), start, System.currentTimeMillis()); - } - - // class - - private long startTime = System.currentTimeMillis(); - private NumberFormat myDurationFormat = null; - private MessageFormat myMsgFormat = null; - - public ElapsedTimer() { - } - - public ElapsedTimer(MessageFormat aMsgFmt) { - myMsgFormat = aMsgFmt; - } - - public ElapsedTimer(NumberFormat aNumFmt) { - myDurationFormat = aNumFmt; - } - - public ElapsedTimer(MessageFormat aMsgFmt, NumberFormat aNumFmt) { - myMsgFormat = aMsgFmt; - myDurationFormat = aNumFmt; - } - - public ElapsedTimer(String pattern) { - myMsgFormat = new MessageFormat(pattern); - } - - public ElapsedTimer(String pattern, NumberFormat aNumFmt) { - myMsgFormat = new MessageFormat(pattern); - myDurationFormat = aNumFmt; - } - - /** - * @return elapsed time in seconds since object creation - */ - public final String toString() { - long endTime = System.currentTimeMillis(); - String duration = diffTime(myDurationFormat, startTime, endTime); - if(myMsgFormat == null) { - return duration; - } else { - return myMsgFormat.format(new Object[] {duration}); - } - } - - private static NumberFormat gFormat = null; - - private static NumberFormat getFormat() { - if(gFormat == null) { - gFormat = new RuleBasedNumberFormat(Locale.US, - RuleBasedNumberFormat.DURATION); - } - return gFormat; - } - - private static String diffTime(NumberFormat fmt, long start, long end) { - if(fmt==null) { - fmt = getFormat(); - } - synchronized(fmt) { - long age = end - start; - long diff = age/1000; // millis per second. Workaround ticket:7936 by using whole number seconds. - return fmt.format(diff); - } - } -} diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/Timer.java b/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/Timer.java index 11f7ebeb24b..14803e75b66 100644 --- a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/Timer.java +++ b/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/Timer.java @@ -8,9 +8,9 @@ */ package com.ibm.icu.dev.util; -import com.ibm.icu.text.DecimalFormat; -import com.ibm.icu.text.NumberFormat; -import com.ibm.icu.util.ULocale; +import java.text.DecimalFormat; +import java.text.NumberFormat; +import java.util.Locale; public final class Timer { public static final long SECONDS = 100000000; @@ -78,8 +78,8 @@ public final class Timer { return nf.format(getDuration()/iterations) + "\tns\t" + pf.format((double)getDuration()/other - 1D) + ""; } - private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(ULocale.ENGLISH); - private DecimalFormat pf = (DecimalFormat) NumberFormat.getPercentInstance(ULocale.ENGLISH); + private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(Locale.ENGLISH); + private DecimalFormat pf = (DecimalFormat) NumberFormat.getPercentInstance(Locale.ENGLISH); { pf.setMaximumFractionDigits(1); diff --git a/icu4j/main/tests/translit/.classpath b/icu4j/main/tests/translit/.classpath index 9f94964f112..f0cbb84ec68 100644 --- a/icu4j/main/tests/translit/.classpath +++ b/icu4j/main/tests/translit/.classpath @@ -4,7 +4,11 @@ - + + + + + @@ -17,5 +21,6 @@ + diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestBoilerplate.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/TestBoilerplate.java similarity index 100% rename from icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestBoilerplate.java rename to icu4j/main/tests/translit/src/com/ibm/icu/dev/test/TestBoilerplate.java diff --git a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/StringBoilerplateTest.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/StringBoilerplateTest.java deleted file mode 100644 index f697bdbc809..00000000000 --- a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/StringBoilerplateTest.java +++ /dev/null @@ -1,51 +0,0 @@ -// © 2016 and later: Unicode, Inc. and others. -// License & terms of use: http://www.unicode.org/copyright.html -/* - ******************************************************************************* - * Copyright (C) 2016, International Business Machines Corporation and * - * others. All Rights Reserved. * - ******************************************************************************* - */ -package com.ibm.icu.dev.test.translit; - -import java.util.List; - -import org.junit.Test; - -import com.ibm.icu.dev.test.TestBoilerplate; - -/** - * Moved from UnicodeMapTest - */ -public class StringBoilerplateTest extends TestBoilerplate { - public void TestStringBoilerplate() throws Exception { - } - - @Test - public void test() throws Exception { - _test(); - } - - /* (non-Javadoc) - * @see com.ibm.icu.dev.test.TestBoilerplate#_hasSameBehavior(java.lang.Object, java.lang.Object) - */ - @Override - protected boolean _hasSameBehavior(String a, String b) { - // we are pretty confident in the equals method, so won't bother with this right now. - return true; - } - - /* (non-Javadoc) - * @see com.ibm.icu.dev.test.TestBoilerplate#_addTestObject(java.util.List) - */ - @Override - protected boolean _addTestObject(List list) { - if (list.size() > 31) return false; - StringBuilder result = new StringBuilder(); - for (int i = 0; i < 10; ++i) { - result.append((char)random.nextInt(0xFF)); - } - list.add(result.toString()); - return true; - } -} diff --git a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java index e73f9379efd..acab8ad134b 100644 --- a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java +++ b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java @@ -37,6 +37,7 @@ import com.ibm.icu.text.UnicodeSet; import com.ibm.icu.text.UnicodeSetIterator; import com.ibm.icu.util.CaseInsensitiveString; import com.ibm.icu.util.ULocale; +import com.ibm.icu.dev.test.rbbi.RBBITstUtils; /*********************************************************************** @@ -3608,7 +3609,7 @@ the ::BEGIN/::END stuff) public void TestThai() { // The expectations in this test heavily depends on the Thai dictionary. // Therefore, we skip this test under the LSTM configuration. - org.junit.Assume.assumeTrue(!TestUtil.skipDictionaryTest()); + org.junit.Assume.assumeTrue(!RBBITstUtils.skipDictionaryTest()); Transliterator tr = Transliterator.getInstance("Any-Latin", Transliterator.FORWARD); String thaiText = "\u0e42\u0e14\u0e22\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19\u0e41\u0e25\u0e49\u0e27, \u0e04\u0e2d" + diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ImmutableEntry.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/util/ImmutableEntry.java similarity index 100% rename from icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ImmutableEntry.java rename to icu4j/main/tests/translit/src/com/ibm/icu/dev/util/ImmutableEntry.java diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/UnicodeMap.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/util/UnicodeMap.java similarity index 100% rename from icu4j/main/tests/framework/src/com/ibm/icu/dev/util/UnicodeMap.java rename to icu4j/main/tests/translit/src/com/ibm/icu/dev/util/UnicodeMap.java diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/UnicodeMapIterator.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/util/UnicodeMapIterator.java similarity index 100% rename from icu4j/main/tests/framework/src/com/ibm/icu/dev/util/UnicodeMapIterator.java rename to icu4j/main/tests/translit/src/com/ibm/icu/dev/util/UnicodeMapIterator.java diff --git a/icu4j/maven-build/maven-icu4j-charset/pom.xml b/icu4j/maven-build/maven-icu4j-charset/pom.xml index bc9ff1419b1..534756f0792 100644 --- a/icu4j/maven-build/maven-icu4j-charset/pom.xml +++ b/icu4j/maven-build/maven-icu4j-charset/pom.xml @@ -222,6 +222,14 @@ provided + + com.ibm.icu + icu4j + ${project.version} + test-jar + test + + junit junit diff --git a/icu4j/maven-build/maven-icu4j/pom.xml b/icu4j/maven-build/maven-icu4j/pom.xml index 658db5a045b..1076d96ccfe 100644 --- a/icu4j/maven-build/maven-icu4j/pom.xml +++ b/icu4j/maven-build/maven-icu4j/pom.xml @@ -300,6 +300,13 @@ + + + + test-jar + + + diff --git a/icu4j/perf-tests/.classpath b/icu4j/perf-tests/.classpath index c6d8649e154..0c639d30ad2 100644 --- a/icu4j/perf-tests/.classpath +++ b/icu4j/perf-tests/.classpath @@ -7,7 +7,8 @@ + - + diff --git a/icu4j/perf-tests/.settings/org.eclipse.jdt.core.prefs b/icu4j/perf-tests/.settings/org.eclipse.jdt.core.prefs index fee21e5e6e0..67bfee0ba24 100644 --- a/icu4j/perf-tests/.settings/org.eclipse.jdt.core.prefs +++ b/icu4j/perf-tests/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -70,23 +70,28 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 @@ -162,11 +167,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -196,6 +202,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=inser org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -219,12 +227,16 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -270,6 +282,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do n org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -305,8 +319,11 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -329,4 +346,8 @@ org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true