--- old/jdk/src/java.base/share/classes/sun/text/normalizer/Trie.java 2015-07-13 16:11:53.000000000 +0900 +++ new/jdk/src/java.base/share/classes/sun/text/normalizer/Trie.java 2015-07-13 16:11:52.000000000 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,16 +22,12 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* - ******************************************************************************* - * (C) Copyright IBM Corp. and others, 1996-2009 - All Rights Reserved * - * * - * The original version of this source code and documentation is copyrighted * - * and owned by IBM, These materials are provided under terms of a License * - * Agreement between IBM and Sun. This technology is protected by multiple * - * US and International patents. This notice and attribution to IBM may not * - * to removed. * - ******************************************************************************* + ****************************************************************************** + * Copyright (C) 1996-2014, International Business Machines Corporation and + * others. All Rights Reserved. + ****************************************************************************** */ package sun.text.normalizer; @@ -135,93 +131,62 @@ unserialize(inputStream); } - /** - * Trie constructor - * @param index array to be used for index - * @param options used by the trie - * @param dataManipulate object containing the information to parse the - * trie data - */ - protected Trie(char index[], int options, DataManipulate dataManipulate) - { - m_options_ = options; - if(dataManipulate != null) { - m_dataManipulate_ = dataManipulate; - } else { - m_dataManipulate_ = new DefaultGetFoldingOffset(); - } - m_isLatin1Linear_ = (m_options_ & - HEADER_OPTIONS_LATIN1_IS_LINEAR_MASK_) != 0; - m_index_ = index; - m_dataOffset_ = m_index_.length; - } - // protected data members ------------------------------------------ /** - * Lead surrogate code points' index displacement in the index array. - *
{@code - * 0x10000-0xd800=0x2800 - * 0x2800 >> INDEX_STAGE_1_SHIFT_ - * }- */ + * Lead surrogate code points' index displacement in the index array. + *
{@code + * 0x10000-0xd800=0x2800 + * 0x2800 >> INDEX_STAGE_1_SHIFT_ + * }+ */ protected static final int LEAD_INDEX_OFFSET_ = 0x2800 >> 5; /** - * Shift size for shifting right the input index. 1..9 - */ + * Shift size for shifting right the input index. 1..9 + */ protected static final int INDEX_STAGE_1_SHIFT_ = 5; /** - * Shift size for shifting left the index array values. - * Increases possible data size with 16-bit index values at the cost - * of compactability. - * This requires blocks of stage 2 data to be aligned by - * DATA_GRANULARITY. - * 0..INDEX_STAGE_1_SHIFT - */ + * Shift size for shifting left the index array values. + * Increases possible data size with 16-bit index values at the cost + * of compactability. + * This requires blocks of stage 2 data to be aligned by + * DATA_GRANULARITY. + * 0..INDEX_STAGE_1_SHIFT + */ protected static final int INDEX_STAGE_2_SHIFT_ = 2; /** * Number of data values in a stage 2 (data array) block. */ protected static final int DATA_BLOCK_LENGTH=1<
Trie options field.
- *options bit field:
- * 9 1 = Latin-1 data is stored linearly at data + DATA_BLOCK_LENGTH
- * 8 0 = 16-bit data, 1=32-bit data
- * 7..4 INDEX_STAGE_1_SHIFT // 0..INDEX_STAGE_2_SHIFT
- * 3..0 INDEX_STAGE_2_SHIFT // 1..9
- */
+ *
Trie options field.
+ *options bit field:
+ * 9 1 = Latin-1 data is stored linearly at data + DATA_BLOCK_LENGTH
+ * 8 0 = 16-bit data, 1=32-bit data
+ * 7..4 INDEX_STAGE_1_SHIFT // 0..INDEX_STAGE_2_SHIFT
+ * 3..0 INDEX_STAGE_2_SHIFT // 1..9
+ */
private int m_options_;
// private methods ---------------------------------------------------
/**
- * Authenticates raw data header.
- * Checking the header information, signature and options.
- * @param signature This contains the options and type of a Trie
- * @return true if the header is authenticated valid
- */
+ * Authenticates raw data header.
+ * Checking the header information, signature and options.
+ * @param signature This contains the options and type of a Trie
+ * @return true if the header is authenticated valid
+ */
private final boolean checkHeader(int signature)
{
// check the signature