8174270: Consolidate ICU sources in one location

Reviewed-by: srl, joehw
This commit is contained in:
Naoto Sato 2020-01-13 08:05:59 -08:00
parent 91bb1d3700
commit 1b24cf800f
57 changed files with 251 additions and 178 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,9 +29,9 @@ import java.io.IOException;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import sun.net.idn.StringPrep; import jdk.internal.icu.impl.Punycode;
import sun.net.idn.Punycode; import jdk.internal.icu.text.StringPrep;
import sun.text.normalizer.UCharacterIterator; import jdk.internal.icu.text.UCharacterIterator;
/** /**
* Provides methods to convert internationalized domain names (IDNs) between * Provides methods to convert internationalized domain names (IDNs) between
@ -226,7 +226,7 @@ public final class IDN {
InputStream stream = null; InputStream stream = null;
try { try {
final String IDN_PROFILE = "uidna.spp"; final String IDN_PROFILE = "/sun/net/idn/uidna.spp";
if (System.getSecurityManager() != null) { if (System.getSecurityManager() != null) {
stream = AccessController.doPrivileged(new PrivilegedAction<>() { stream = AccessController.doPrivileged(new PrivilegedAction<>() {
public InputStream run() { public InputStream run() {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,7 @@
package java.text; package java.text;
import sun.text.bidi.BidiBase; import jdk.internal.icu.text.BidiBase;
/** /**
* This class implements the Unicode Bidirectional Algorithm. * This class implements the Unicode Bidirectional Algorithm.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,7 +41,7 @@ package java.text;
import java.lang.Character; import java.lang.Character;
import java.util.Vector; import java.util.Vector;
import sun.text.CollatorUtilities; import sun.text.CollatorUtilities;
import sun.text.normalizer.NormalizerBase; import jdk.internal.icu.text.NormalizerBase;
/** /**
* The {@code CollationElementIterator} class is used as an iterator * The {@code CollationElementIterator} class is used as an iterator

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,7 +37,7 @@
package java.text; package java.text;
import sun.text.normalizer.NormalizerBase; import jdk.internal.icu.text.NormalizerBase;
/** /**
* This class provides the method {@code normalize} which transforms Unicode * This class provides the method {@code normalize} which transforms Unicode

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,8 +42,7 @@ import java.util.Vector;
import sun.text.UCompactIntArray; import sun.text.UCompactIntArray;
import sun.text.IntHashtable; import sun.text.IntHashtable;
import sun.text.ComposedCharIter; import sun.text.ComposedCharIter;
import sun.text.CollatorUtilities; import jdk.internal.icu.impl.NormalizerImpl;
import sun.text.normalizer.NormalizerImpl;
/** /**
* This class contains all the code to parse a RuleBasedCollator pattern * This class contains all the code to parse a RuleBasedCollator pattern

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,9 +32,10 @@
****************************************************************************** ******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import sun.text.normalizer.UnicodeSet.SpanCondition; import jdk.internal.icu.text.UnicodeSet.SpanCondition;
import jdk.internal.icu.util.OutputInt;
/** /**
* Helper class for frozen UnicodeSets, implements contains() and span() optimized for BMP code points. * Helper class for frozen UnicodeSets, implements contains() and span() optimized for BMP code points.
@ -44,7 +45,7 @@ import sun.text.normalizer.UnicodeSet.SpanCondition;
* 3-byte characters: Use zero/one/mixed data per 64-block in U+0000..U+FFFF, with mixed for illegal ranges. * 3-byte characters: Use zero/one/mixed data per 64-block in U+0000..U+FFFF, with mixed for illegal ranges.
* Supplementary characters: Call contains() on the parent set. * Supplementary characters: Call contains() on the parent set.
*/ */
final class BMPSet { public final class BMPSet {
/** /**
* One boolean ('true' or 'false') per Latin-1 character. * One boolean ('true' or 'false') per Latin-1 character.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,9 @@
****************************************************************************** ******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import jdk.internal.icu.text.UTF16;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.InputStream; import java.io.InputStream;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,17 +35,19 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import java.text.CharacterIterator; import java.text.CharacterIterator;
import jdk.internal.icu.text.UCharacterIterator;
/** /**
* This class is a wrapper around CharacterIterator and implements the * This class is a wrapper around CharacterIterator and implements the
* UCharacterIterator protocol * UCharacterIterator protocol
* @author ram * @author ram
*/ */
class CharacterIteratorWrapper extends UCharacterIterator { public class CharacterIteratorWrapper extends UCharacterIterator {
private CharacterIterator iterator; private CharacterIterator iterator;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,9 +30,8 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import java.io.BufferedInputStream;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
@ -43,6 +42,8 @@ import java.util.Arrays;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import jdk.internal.icu.util.VersionInfo;
public final class ICUBinary { public final class ICUBinary {
private static final class IsAcceptable implements Authenticate { private static final class IsAcceptable implements Authenticate {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,11 +30,14 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import java.io.IOException; import java.io.IOException;
final class Norm2AllModes { import jdk.internal.icu.text.Normalizer2;
import jdk.internal.icu.util.VersionInfo;
public final class Norm2AllModes {
// Public API dispatch via Normalizer2 subclasses -------------------------- *** // Public API dispatch via Normalizer2 subclasses -------------------------- ***
// Normalizer2 implementation for the old UNORM_NONE. // Normalizer2 implementation for the old UNORM_NONE.
@ -265,7 +268,9 @@ final class Norm2AllModes {
private static final class Norm2AllModesSingleton { private static final class Norm2AllModesSingleton {
private Norm2AllModesSingleton(String name) { private Norm2AllModesSingleton(String name) {
try { try {
String DATA_FILE_NAME = "/sun/text/resources/" + name + ".nrm"; @SuppressWarnings("deprecation")
String DATA_FILE_NAME = "/jdk/internal/icu/impl/data/icudt" +
VersionInfo.ICU_DATA_VERSION_PATH + "/" + name + ".nrm";
NormalizerImpl impl=new NormalizerImpl().load(DATA_FILE_NAME); NormalizerImpl impl=new NormalizerImpl().load(DATA_FILE_NAME);
allModes=new Norm2AllModes(impl); allModes=new Norm2AllModes(impl);
} catch (RuntimeException e) { } catch (RuntimeException e) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,11 +29,16 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.text.Normalizer;
import jdk.internal.icu.lang.UCharacter;
import jdk.internal.icu.text.Normalizer2;
import jdk.internal.icu.text.UTF16;
import jdk.internal.icu.util.CodePointTrie;
import jdk.internal.icu.util.VersionInfo;
// Original filename in ICU4J: Normalizer2Impl.java // Original filename in ICU4J: Normalizer2Impl.java
public final class NormalizerImpl { public final class NormalizerImpl {

View File

@ -1,4 +1,5 @@
/* /*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,11 +37,11 @@
// 2007-08-14 Martin Buchholz // 2007-08-14 Martin Buchholz
// - remove redundant casts // - remove redundant casts
// //
package sun.net.idn; package jdk.internal.icu.impl;
import java.text.ParseException; import java.text.ParseException;
import sun.text.normalizer.UCharacter; import jdk.internal.icu.lang.UCharacter;
import sun.text.normalizer.UTF16; import jdk.internal.icu.text.UTF16;
/** /**
* Ported code from ICU punycode.c * Ported code from ICU punycode.c

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,11 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import jdk.internal.icu.text.Replaceable;
import jdk.internal.icu.text.ReplaceableString;
import jdk.internal.icu.text.UCharacterIterator;
/** /**
* DLF docs must define behavior when Replaceable is mutated underneath * DLF docs must define behavior when Replaceable is mutated underneath
@ -47,7 +51,7 @@ package sun.text.normalizer;
* *
* What are first, last, and getBeginIndex doing here?!?!?! * What are first, last, and getBeginIndex doing here?!?!?!
*/ */
class ReplaceableUCharacterIterator extends UCharacterIterator { public class ReplaceableUCharacterIterator extends UCharacterIterator {
// public constructor ------------------------------------------------------ // public constructor ------------------------------------------------------

View File

@ -1,4 +1,5 @@
/* /*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,13 +39,13 @@
// - copy this file from icu4jsrc_3_2/src/com/ibm/icu/impl/StringPrepDataReader.java // - copy this file from icu4jsrc_3_2/src/com/ibm/icu/impl/StringPrepDataReader.java
// - move from package com.ibm.icu.impl to package sun.net.idn // - move from package com.ibm.icu.impl to package sun.net.idn
// //
package sun.net.idn; package jdk.internal.icu.impl;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import sun.text.normalizer.ICUBinary; import jdk.internal.icu.impl.ICUBinary;
/** /**
@ -53,7 +54,7 @@ import sun.text.normalizer.ICUBinary;
* To change the template for this generated type comment go to * To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments * Window>Preferences>Java>Code Generation>Code and Comments
*/ */
final class StringPrepDataReader implements ICUBinary.Authenticate { public final class StringPrepDataReader implements ICUBinary.Authenticate {
/** /**
* <p>private constructor.</p> * <p>private constructor.</p>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,10 @@
****************************************************************************** ******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import jdk.internal.icu.lang.UCharacter;
import jdk.internal.icu.text.UTF16;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.InputStream; import java.io.InputStream;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,7 +41,10 @@
* Java port of ubidi_props.h/.c. * Java port of ubidi_props.h/.c.
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import jdk.internal.icu.lang.UCharacter;
import jdk.internal.icu.util.VersionInfo;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
@ -196,7 +199,11 @@ public final class UBiDiProps {
private Trie2_16 trie; private Trie2_16 trie;
// data format constants ----------------------------------------------- *** // data format constants ----------------------------------------------- ***
private static final String DATA_FILE_NAME = "/sun/text/resources/ubidi.icu"; @SuppressWarnings("deprecation")
private static final String DATA_FILE_NAME =
"/jdk/internal/icu/impl/data/icudt" +
VersionInfo.ICU_DATA_VERSION_PATH +
"/ubidi.icu";
/* format "BiDi" */ /* format "BiDi" */
private static final int FMT=0x42694469; private static final int FMT=0x42694469;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,15 +29,18 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.Iterator; import java.util.Iterator;
import java.util.MissingResourceException; import java.util.MissingResourceException;
import sun.text.normalizer.UCharacter.HangulSyllableType; import jdk.internal.icu.lang.UCharacter.HangulSyllableType;
import sun.text.normalizer.UCharacter.NumericType; import jdk.internal.icu.lang.UCharacter.NumericType;
import jdk.internal.icu.text.UTF16;
import jdk.internal.icu.text.UnicodeSet;
import jdk.internal.icu.util.VersionInfo;
/** /**
* <p>Internal class used for Unicode character property database.</p> * <p>Internal class used for Unicode character property database.</p>
@ -54,7 +57,7 @@ import sun.text.normalizer.UCharacter.NumericType;
* @since release 2.1, february 1st 2002 * @since release 2.1, february 1st 2002
*/ */
final class UCharacterProperty public final class UCharacterProperty
{ {
// public data members ----------------------------------------------- // public data members -----------------------------------------------
@ -317,7 +320,11 @@ final class UCharacterProperty
/** /**
* Default name of the datafile * Default name of the datafile
*/ */
private static final String DATA_FILE_NAME_ = "/sun/text/resources/uprops.icu"; @SuppressWarnings("deprecation")
private static final String DATA_FILE_NAME_ =
"/jdk/internal/icu/impl/data/icudt" +
VersionInfo.ICU_DATA_VERSION_PATH +
"/uprops.icu";
/** /**
* Shift value for lead surrogate to form a supplementary character. * Shift value for lead surrogate to form a supplementary character.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,18 +32,21 @@
****************************************************************************** ******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import java.util.ArrayList; import java.util.ArrayList;
import sun.text.normalizer.UnicodeSet.SpanCondition; import jdk.internal.icu.text.UTF16;
import jdk.internal.icu.text.UnicodeSet;
import jdk.internal.icu.text.UnicodeSet.SpanCondition;
import jdk.internal.icu.util.OutputInt;
/* /*
* Implement span() etc. for a set with strings. * Implement span() etc. for a set with strings.
* Avoid recursion because of its exponential complexity. * Avoid recursion because of its exponential complexity.
* Instead, try multiple paths at once and track them with an IndexList. * Instead, try multiple paths at once and track them with an IndexList.
*/ */
class UnicodeSetStringSpan { public class UnicodeSetStringSpan {
/* /*
* Which span() variant will be used? The object is either built for one variant and used once, * Which span() variant will be used? The object is either built for one variant and used once,

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,12 +29,15 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.impl;
import jdk.internal.icu.lang.UCharacter;
import jdk.internal.icu.text.UTF16;
import java.io.IOException; import java.io.IOException;
import java.util.Locale; import java.util.Locale;
final class Utility { public final class Utility {
/** /**
* Convert characters outside the range U+0020 to U+007F to * Convert characters outside the range U+0020 to U+007F to

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,13 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.lang;
import jdk.internal.icu.impl.UBiDiProps;
import jdk.internal.icu.impl.UCharacterProperty;
import jdk.internal.icu.text.Normalizer2;
import jdk.internal.icu.text.UTF16;
import jdk.internal.icu.util.VersionInfo;
/** /**
* <p>The UCharacter class provides extensions to the * <p>The UCharacter class provides extensions to the

View File

@ -1,4 +1,5 @@
/* /*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,7 +35,7 @@
// - move from package com.ibm.icu.lang to package sun.net.idn // - move from package com.ibm.icu.lang to package sun.net.idn
// //
package sun.net.idn; package jdk.internal.icu.lang;
/** /**
* Enumerated Unicode character linguistic direction constants. * Enumerated Unicode character linguistic direction constants.
@ -47,7 +48,7 @@ package sun.net.idn;
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
final class UCharacterDirection implements UCharacterEnums.ECharacterDirection { public final class UCharacterDirection implements UCharacterEnums.ECharacterDirection {
// private constructor ========================================= // private constructor =========================================
///CLOVER:OFF ///CLOVER:OFF

View File

@ -1,4 +1,5 @@
/* /*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,7 +51,7 @@
// DIRECTIONALITY_BOUNDARY_NEUTRAL, DIRECTIONALITY_UNDEFINED // DIRECTIONALITY_BOUNDARY_NEUTRAL, DIRECTIONALITY_UNDEFINED
// //
package sun.net.idn; package jdk.internal.icu.lang;
/** /**
* A container for the different 'enumerated types' used by UCharacter. * A container for the different 'enumerated types' used by UCharacter.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -46,7 +46,7 @@
* fallbacks for unsupported combinations. * fallbacks for unsupported combinations.
*/ */
package sun.text.bidi; package jdk.internal.icu.text;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.text.AttributedCharacterIterator; import java.text.AttributedCharacterIterator;
@ -54,9 +54,8 @@ import java.text.Bidi;
import java.util.Arrays; import java.util.Arrays;
import jdk.internal.access.JavaAWTFontAccess; import jdk.internal.access.JavaAWTFontAccess;
import jdk.internal.access.SharedSecrets; import jdk.internal.access.SharedSecrets;
import sun.text.normalizer.UBiDiProps; import jdk.internal.icu.lang.UCharacter;
import sun.text.normalizer.UCharacter; import jdk.internal.icu.impl.UBiDiProps;
import sun.text.normalizer.UTF16;
/** /**
* *
@ -532,6 +531,7 @@ import sun.text.normalizer.UTF16;
* (L1) is not necessary in adjustWSLevels(). * (L1) is not necessary in adjustWSLevels().
*/ */
// Original filename in ICU4J: Bidi.java
public class BidiBase { public class BidiBase {
static class Point { static class Point {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -33,7 +33,7 @@
* (ported from C code written by Markus W. Scherer) * (ported from C code written by Markus W. Scherer)
*/ */
package sun.text.bidi; package jdk.internal.icu.text;
import java.text.Bidi; import java.text.Bidi;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,7 +37,7 @@
* (ported from C code written by Markus W. Scherer) * (ported from C code written by Markus W. Scherer)
*/ */
package sun.text.bidi; package jdk.internal.icu.text;
/** /**
* A BidiRun represents a sequence of characters at the same embedding level. * A BidiRun represents a sequence of characters at the same embedding level.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -33,10 +33,9 @@
* (ported from C code written by Markus W. Scherer) * (ported from C code written by Markus W. Scherer)
*/ */
package sun.text.bidi; package jdk.internal.icu.text;
import sun.text.normalizer.UCharacter; import jdk.internal.icu.lang.UCharacter;
import sun.text.normalizer.UTF16;
final class BidiWriter { final class BidiWriter {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.text;
import java.io.IOException; import java.io.IOException;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,9 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.text;
import jdk.internal.icu.impl.Norm2AllModes;
/** /**
* Unicode normalization functionality for standard Unicode normalization or * Unicode normalization functionality for standard Unicode normalization or
@ -75,7 +77,7 @@ package sun.text.normalizer;
* @stable ICU 4.4 * @stable ICU 4.4
* @author Markus W. Scherer * @author Markus W. Scherer
*/ */
abstract class Normalizer2 { public abstract class Normalizer2 {
/** /**
* Returns a Normalizer2 instance for Unicode NFC normalization. * Returns a Normalizer2 instance for Unicode NFC normalization.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,9 @@
* others. All Rights Reserved. * others. All Rights Reserved.
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.text;
import jdk.internal.icu.impl.Norm2AllModes;
import java.text.CharacterIterator; import java.text.CharacterIterator;
import java.text.Normalizer; import java.text.Normalizer;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,7 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.text;
/** /**
* <code>Replaceable</code> is an interface representing a * <code>Replaceable</code> is an interface representing a
@ -82,7 +82,7 @@ package sun.text.normalizer;
* @author Alan Liu * @author Alan Liu
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
interface Replaceable { public interface Replaceable {
/** /**
* Returns the number of 16-bit code units in the text. * Returns the number of 16-bit code units in the text.
* @return number of 16-bit code units in text * @return number of 16-bit code units in text

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.text;
/** /**
* <code>ReplaceableString</code> is an adapter class that implements the * <code>ReplaceableString</code> is an adapter class that implements the
@ -46,7 +46,7 @@ package sun.text.normalizer;
* @author Alan Liu * @author Alan Liu
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
class ReplaceableString implements Replaceable { public class ReplaceableString implements Replaceable {
private StringBuffer buf; private StringBuffer buf;

View File

@ -1,4 +1,5 @@
/* /*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -39,7 +40,7 @@
// 2007-08-14 Martin Buchholz // 2007-08-14 Martin Buchholz
// - remove redundant casts // - remove redundant casts
// //
package sun.net.idn; package jdk.internal.icu.text;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
@ -48,14 +49,12 @@ import java.io.InputStream;
import java.text.ParseException; import java.text.ParseException;
import sun.text.Normalizer; import sun.text.Normalizer;
import sun.text.normalizer.CharTrie; import jdk.internal.icu.impl.CharTrie;
import sun.text.normalizer.Trie; import jdk.internal.icu.impl.StringPrepDataReader;
import sun.text.normalizer.VersionInfo; import jdk.internal.icu.impl.Trie;
import sun.text.normalizer.UCharacter; import jdk.internal.icu.lang.UCharacter;
import sun.text.normalizer.UCharacterIterator; import jdk.internal.icu.lang.UCharacterDirection;
import sun.text.normalizer.UTF16; import jdk.internal.icu.util.VersionInfo;
import sun.net.idn.UCharacterDirection;
import sun.net.idn.StringPrepDataReader;
/** /**
* StringPrep API implements the StingPrep framework as described by * StringPrep API implements the StingPrep framework as described by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,11 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.text;
import jdk.internal.icu.impl.CharacterIteratorWrapper;
import jdk.internal.icu.impl.ReplaceableUCharacterIterator;
import jdk.internal.icu.impl.UCharacterProperty;
import java.text.CharacterIterator; import java.text.CharacterIterator;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,9 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.text;
import jdk.internal.icu.impl.UCharacterProperty;
/** /**
* <p>Standalone utility class providing UTF16 character conversions and * <p>Standalone utility class providing UTF16 character conversions and

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,13 +29,20 @@
* others. All Rights Reserved. * others. All Rights Reserved.
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.text;
import java.io.IOException;
import java.text.ParsePosition; import java.text.ParsePosition;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.TreeSet; import java.util.TreeSet;
import jdk.internal.icu.impl.BMPSet;
import jdk.internal.icu.impl.UCharacterProperty;
import jdk.internal.icu.impl.UnicodeSetStringSpan;
import jdk.internal.icu.impl.Utility;
import jdk.internal.icu.lang.UCharacter;
import jdk.internal.icu.util.OutputInt;
import jdk.internal.icu.util.VersionInfo;
/** /**
* A mutable set of Unicode characters and multicharacter strings. * A mutable set of Unicode characters and multicharacter strings.
* Objects of this class represent <em>character classes</em> used * Objects of this class represent <em>character classes</em> used
@ -282,7 +289,7 @@ import java.util.TreeSet;
* @author Alan Liu * @author Alan Liu
* @stable ICU 2.0 * @stable ICU 2.0
*/ */
class UnicodeSet { public class UnicodeSet {
private static final int LOW = 0x000000; // LOW <= all valid values. ZERO for codepoints private static final int LOW = 0x000000; // LOW <= all valid values. ZERO for codepoints
private static final int HIGH = 0x110000; // HIGH > all valid values. 10000 for code units. private static final int HIGH = 0x110000; // HIGH > all valid values. 10000 for code units.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,7 +27,7 @@
// created: 2018may10 Markus W. Scherer // created: 2018may10 Markus W. Scherer
package sun.text.normalizer; package jdk.internal.icu.util;
import java.util.Iterator; import java.util.Iterator;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,7 +27,9 @@
// created: 2018may04 Markus W. Scherer // created: 2018may04 Markus W. Scherer
package sun.text.normalizer; package jdk.internal.icu.util;
import jdk.internal.icu.impl.ICUBinary;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
@ -36,7 +38,7 @@ import java.io.OutputStream;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import static sun.text.normalizer.NormalizerImpl.UTF16Plus; import static jdk.internal.icu.impl.NormalizerImpl.UTF16Plus;
/** /**
* Immutable Unicode code point trie. * Immutable Unicode code point trie.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,7 @@
* others. All Rights Reserved. * others. All Rights Reserved.
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.util;
/** /**
* Simple struct-like class for int output parameters. * Simple struct-like class for int output parameters.
@ -38,7 +38,7 @@ package sun.text.normalizer;
* @internal but could become public * @internal but could become public
* deprecated This API is ICU internal only. * deprecated This API is ICU internal only.
*/ */
class OutputInt { public class OutputInt {
/** /**
* The value field. * The value field.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,7 @@
******************************************************************************* *******************************************************************************
*/ */
package sun.text.normalizer; package jdk.internal.icu.util;
import java.util.HashMap; import java.util.HashMap;
@ -45,6 +45,16 @@ import java.util.HashMap;
*/ */
public final class VersionInfo public final class VersionInfo
{ {
// public data members -------------------------------------------------
/**
* Data version string for ICU's internal data.
* Used for appending to data path (e.g. icudt43b)
* @internal
* @deprecated This API is ICU internal only.
*/
@Deprecated
public static final String ICU_DATA_VERSION_PATH = "64b";
// public methods ------------------------------------------------------ // public methods ------------------------------------------------------

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
package sun.text; package sun.text;
import sun.text.normalizer.NormalizerBase; import jdk.internal.icu.text.NormalizerBase;
public class CollatorUtilities { public class CollatorUtilities {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,8 @@
package sun.text; package sun.text;
import sun.text.normalizer.NormalizerBase; import jdk.internal.icu.impl.NormalizerImpl;
import sun.text.normalizer.NormalizerImpl; import jdk.internal.icu.text.NormalizerBase;
public final class ComposedCharIter { public final class ComposedCharIter {
/** /**

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,8 @@
package sun.text; package sun.text;
import sun.text.normalizer.NormalizerBase; import jdk.internal.icu.lang.UCharacter;
import sun.text.normalizer.UCharacter; import jdk.internal.icu.text.NormalizerBase;
/** /**
* This Normalizer is for Unicode 3.2 support for IDNA only. * This Normalizer is for Unicode 3.2 support for IDNA only.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,14 +22,14 @@
*/ */
/* /*
* @test * @test
* @bug 6850113 * @bug 6850113 8174270
* @summary Verify the return value of digit() for some digits. * @summary Verify the return value of digit() for some digits.
* @modules java.base/sun.text.normalizer * @modules java.base/jdk.internal.icu.lang
* @compile -XDignore.symbol.file=true Bug6850113.java * @compile -XDignore.symbol.file=true Bug6850113.java
* @run main Bug6850113 * @run main Bug6850113
*/ */
import sun.text.normalizer.UCharacter; import jdk.internal.icu.lang.UCharacter;
public class Bug6850113 { public class Bug6850113 {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/* /*
* @test * @test
* @bug 7051769 8038092 * @bug 7051769 8038092 8174270
* @summary verify that Bidi.toString() returns the corect result. * @summary verify that Bidi.toString() returns the corect result.
* The second run is intended to test lazy SharedSectets init for 8038092 * The second run is intended to test lazy SharedSectets init for 8038092
* @modules java.desktop * @modules java.desktop
@ -40,7 +40,7 @@ public class Bug7051769 {
if (System.getProperty("preloadBidi", "").equals("true")) { if (System.getProperty("preloadBidi", "").equals("true")) {
// Make sure the SharedSecret is lazily initialized correctly // Make sure the SharedSecret is lazily initialized correctly
try { try {
Class.forName("sun.text.bidi.BidiBase"); Class.forName("jdk.internal.icu.text.BidiBase");
System.out.println("BidiBase class has been pre-loaded."); System.out.println("BidiBase class has been pre-loaded.");
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
System.out.println("BidiBase class could not be pre-loaded."); System.out.println("BidiBase class could not be pre-loaded.");
@ -68,7 +68,7 @@ public class Bug7051769 {
TextAttribute.RUN_DIRECTION_RTL); TextAttribute.RUN_DIRECTION_RTL);
String text = "\u0623\u0643\u062a\u0648\u0628\u0631 10"; String text = "\u0623\u0643\u062a\u0648\u0628\u0631 10";
String expected = "sun.text.bidi.BidiBase[dir: 2 baselevel: 1 length: 9 runs: [1 1 1 1 1 1 1 2 2] text: [0x623 0x643 0x62a 0x648 0x628 0x631 0x20 0x661 0x660]]"; String expected = "jdk.internal.icu.text.BidiBase[dir: 2 baselevel: 1 length: 9 runs: [1 1 1 1 1 1 1 2 2] text: [0x623 0x643 0x62a 0x648 0x628 0x631 0x20 0x661 0x660]]";
AttributedString as = new AttributedString(text, attrNS); AttributedString as = new AttributedString(text, attrNS);
AttributedCharacterIterator itr = as.getIterator(); AttributedCharacterIterator itr = as.getIterator();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,10 +22,10 @@
*/ */
/* /*
* @test * @test
* @bug 4221795 6565620 6959267 7070436 7198195 8032446 8221431 * @bug 4221795 6565620 6959267 7070436 7198195 8032446 8174270 8221431
* @summary Confirm Normalizer's fundamental behavior * @summary Confirm Normalizer's fundamental behavior
* @library /lib/testlibrary/java/lang * @library /lib/testlibrary/java/lang
* @modules java.base/sun.text java.base/sun.text.normalizer * @modules java.base/sun.text java.base/jdk.internal.icu.text
* @compile -XDignore.symbol.file ConformanceTest.java * @compile -XDignore.symbol.file ConformanceTest.java
* @run main/timeout=3000 ConformanceTest * @run main/timeout=3000 ConformanceTest
*/ */
@ -34,14 +34,12 @@ import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.lang.reflect.Method;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetDecoder;
import java.util.BitSet; import java.util.BitSet;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import sun.text.normalizer.NormalizerBase; import jdk.internal.icu.text.NormalizerBase;
import sun.text.normalizer.NormalizerImpl;
/* /*
* Conformance test for java.text.Normalizer and sun.text.Normalizer. * Conformance test for java.text.Normalizer and sun.text.Normalizer.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,10 +22,10 @@
*/ */
/* /*
* @test * @test
* @bug 4221795 8032446 * @bug 4221795 8032446 8174270
* @summary Confirm Normalizer's fundamental behavior. Imported from ICU4J 3.2's * @summary Confirm Normalizer's fundamental behavior. Imported from ICU4J 3.2's
* src/com/ibm/icu/dev/test and modified. * src/com/ibm/icu/dev/test and modified.
* @modules java.base/sun.text java.base/sun.text.normalizer * @modules java.base/sun.text java.base/jdk.internal.icu.text
* @library /java/text/testlib * @library /java/text/testlib
* @compile -XDignore.symbol.file ICUBasicTest.java * @compile -XDignore.symbol.file ICUBasicTest.java
* @run main/timeout=30 ICUBasicTest * @run main/timeout=30 ICUBasicTest
@ -39,11 +39,9 @@
*/ */
import sun.text.Normalizer; import sun.text.Normalizer;
import sun.text.normalizer.NormalizerBase; import jdk.internal.icu.text.NormalizerBase;
import sun.text.normalizer.NormalizerImpl;
import static java.text.Normalizer.Form.*; import static java.text.Normalizer.Form.*;
import static sun.text.normalizer.NormalizerBase.Mode.*;
public class ICUBasicTest extends IntlTest { public class ICUBasicTest extends IntlTest {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,9 @@
/* /*
* @test * @test
* @bug 4221795 * @bug 4221795 8174270
* @summary Confirm Normalizer's fundamental behavior * @summary Confirm Normalizer's fundamental behavior
* @modules java.base/sun.text java.base/sun.text.normalizer * @modules java.base/sun.text java.base/jdk.internal.icu.text
* @library /java/text/testlib * @library /java/text/testlib
* @compile -XDignore.symbol.file NormalizerAPITest.java * @compile -XDignore.symbol.file NormalizerAPITest.java
* @run main/timeout=30 NormalizerAPITest * @run main/timeout=30 NormalizerAPITest
@ -64,8 +64,8 @@ public class NormalizerAPITest extends IntlTest {
static final int[] options = { static final int[] options = {
0x00, 0x00,
sun.text.Normalizer.UNICODE_3_2, sun.text.Normalizer.UNICODE_3_2,
sun.text.normalizer.NormalizerBase.UNICODE_3_2, jdk.internal.icu.text.NormalizerBase.UNICODE_3_2,
sun.text.normalizer.NormalizerBase.UNICODE_LATEST, jdk.internal.icu.text.NormalizerBase.UNICODE_LATEST,
}; };
static final String nonNullStr = "testdata"; static final String nonNullStr = "testdata";
@ -319,7 +319,7 @@ public class NormalizerAPITest extends IntlTest {
in.getClass().getSimpleName() + ") failed."); in.getClass().getSimpleName() + ") failed.");
} }
out = sun.text.Normalizer.normalize(in, NFD, out = sun.text.Normalizer.normalize(in, NFD,
sun.text.normalizer.NormalizerBase.UNICODE_LATEST); jdk.internal.icu.text.NormalizerBase.UNICODE_LATEST);
if (!out.equals(expected.toString())) { if (!out.equals(expected.toString())) {
errln("sun.text.Normalizer.normalize(" + errln("sun.text.Normalizer.normalize(" +
in.getClass().getSimpleName() + ") failed."); in.getClass().getSimpleName() + ") failed.");
@ -330,7 +330,7 @@ public class NormalizerAPITest extends IntlTest {
in.getClass().getSimpleName() + ") failed."); in.getClass().getSimpleName() + ") failed.");
} }
if (!sun.text.Normalizer.isNormalized(expected, NFD, if (!sun.text.Normalizer.isNormalized(expected, NFD,
sun.text.normalizer.NormalizerBase.UNICODE_LATEST)) { jdk.internal.icu.text.NormalizerBase.UNICODE_LATEST)) {
errln("sun.text.Normalizer.isNormalize(" + errln("sun.text.Normalizer.isNormalize(" +
in.getClass().getSimpleName() + ") failed."); in.getClass().getSimpleName() + ") failed.");
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,10 @@
/* /*
* @test * @test
* @bug 4221795 8032446 * @bug 4221795 8032446 8174270
* @summary Confirm that java.text.Normalizer and sun.text.Normalize are * @summary Confirm that java.text.Normalizer and sun.text.Normalizer are
* thread-safe. * thread-safe.
* @modules java.base/sun.text java.base/sun.text.normalizer * @modules java.base/sun.text java.base/jdk.internal.icu.text
* @compile -XDignore.symbol.file ThreadSafeTest.java * @compile -XDignore.symbol.file ThreadSafeTest.java
* @run main/othervm -esa ThreadSafeTest 5 10 * @run main/othervm -esa ThreadSafeTest 5 10
*/ */
@ -115,7 +115,7 @@ public class ThreadSafeTest {
sun.text.Normalizer.UNICODE_3_2); sun.text.Normalizer.UNICODE_3_2);
testJavaNormalize(2, java.text.Normalizer.Form.NFKD); testJavaNormalize(2, java.text.Normalizer.Form.NFKD);
testSunNormalize(3, java.text.Normalizer.Form.NFC, testSunNormalize(3, java.text.Normalizer.Form.NFC,
sun.text.normalizer.NormalizerBase.UNICODE_LATEST); jdk.internal.icu.text.NormalizerBase.UNICODE_LATEST);
testJavaNormalize(4, java.text.Normalizer.Form.NFD); testJavaNormalize(4, java.text.Normalizer.Form.NFD);
testIsNormalized(0, java.text.Normalizer.Form.NFKC); testIsNormalized(0, java.text.Normalizer.Form.NFKC);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,8 +32,8 @@ import java.io.InputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.text.ParseException; import java.text.ParseException;
import sun.net.idn.StringPrep; import jdk.internal.icu.text.StringPrep;
import sun.text.normalizer.UCharacterIterator; import jdk.internal.icu.text.UCharacterIterator;
/** /**
* @author ram * @author ram

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,17 +23,16 @@
/* /*
* @test * @test
* @summary Unit test for sun.net.idn.Punycode * @summary Unit test for jdk.internal.icu.impl.Punycode
* @bug 4737170 * @bug 4737170 8174270
* @modules java.base/sun.net.idn * @modules java.base/jdk.internal.icu.impl
* @compile -XDignore.symbol.file PunycodeTest.java * @compile -XDignore.symbol.file PunycodeTest.java
* @run main/othervm -ea PunycodeTest * @run main/othervm -ea PunycodeTest
* @author Edward Wang * @author Edward Wang
*/ */
import java.util.Scanner; import java.util.Scanner;
import java.text.ParseException; import jdk.internal.icu.impl.Punycode;
import sun.net.idn.Punycode;
/** /**
* unit test for Punycode that is also originated from the sample code * unit test for Punycode that is also originated from the sample code

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,9 @@
/* /*
* @test * @test
* @summary Unit test for sun.net.idn.Punycode * @summary Unit test for jdk.internal.icu.text.StringPrep
* @bug 4737170 8060097 * @bug 4737170 8060097 8174270
* @modules java.base/sun.net.idn:+open * @modules java.base/jdk.internal.icu.text
* java.base/sun.text.normalizer
* @library . * @library .
* @compile -XDignore.symbol.file TestStringPrep.java NFS4StringPrep.java * @compile -XDignore.symbol.file TestStringPrep.java NFS4StringPrep.java
* TestData.java * TestData.java
@ -44,8 +43,8 @@ import java.text.ParseException;
import java.io.InputStream; import java.io.InputStream;
import java.util.Locale; import java.util.Locale;
import sun.net.idn.StringPrep; import jdk.internal.icu.text.StringPrep;
import sun.text.normalizer.UCharacterIterator; import jdk.internal.icu.text.UCharacterIterator;
public class TestStringPrep { public class TestStringPrep {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {