mirror of https://github.com/apache/lucene.git
LUCENE-2733: Removed public constructors of utility classes with only static methods to prevent instantiation
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1030754 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
73e0464160
commit
f6f1961e46
|
@ -380,7 +380,10 @@ Changes in backwards compatibility policy
|
|||
CREATE*, IndexWriter would make a first empty commit. If you need that
|
||||
behavior you can call writer.commit()/close() immediately after you create it.
|
||||
(Shai Erera, Mike McCandless)
|
||||
|
||||
|
||||
* LUCENE-2733: Removed public constructors of utility classes with only static
|
||||
methods to prevent instantiation. (Uwe Schindler)
|
||||
|
||||
Changes in runtime behavior
|
||||
|
||||
* LUCENE-1923: Made IndexReader.toString() produce something
|
||||
|
|
|
@ -20,7 +20,9 @@ package org.apache.lucene.util; // from org.apache.solr.util rev 555343
|
|||
/** A variety of high efficiency bit twiddling routines.
|
||||
* @lucene.internal
|
||||
*/
|
||||
public class BitUtil {
|
||||
public final class BitUtil {
|
||||
|
||||
private BitUtil() {} // no instance
|
||||
|
||||
/** Returns the number of bits set in the long */
|
||||
public static int pop(long x) {
|
||||
|
|
|
@ -31,6 +31,8 @@ import java.io.IOException;
|
|||
*/
|
||||
|
||||
public final class CodecUtil {
|
||||
private CodecUtil() {} // no instance
|
||||
|
||||
private final static int CODEC_MAGIC = 0x3fd76c17;
|
||||
|
||||
public static IndexOutput writeHeader(IndexOutput out, String codec, int version)
|
||||
|
|
|
@ -20,7 +20,9 @@ package org.apache.lucene.util;
|
|||
/**
|
||||
* @lucene.internal
|
||||
*/
|
||||
public class English {
|
||||
public final class English {
|
||||
|
||||
private English() {} // no instance
|
||||
|
||||
public static String longToEnglish(long i) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
|
|
@ -21,7 +21,10 @@ import java.io.Closeable;
|
|||
import java.io.IOException;
|
||||
|
||||
/** @lucene.internal */
|
||||
public class IOUtils {
|
||||
public final class IOUtils {
|
||||
|
||||
private IOUtils() {} // no instance
|
||||
|
||||
/**
|
||||
* <p>Closes all given <tt>Closeable</tt>s, suppressing all thrown exceptions. Some of the <tt>Closeable</tt>s
|
||||
* may be null, they are ignored. After everything is closed, method either throws <tt>priorException</tt>,
|
||||
|
|
|
@ -53,7 +53,7 @@ import java.nio.ByteBuffer;
|
|||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
public class IndexableBinaryStringTools {
|
||||
public final class IndexableBinaryStringTools {
|
||||
|
||||
private static final CodingCase[] CODING_CASES = {
|
||||
// CodingCase(int initialShift, int finalShift)
|
||||
|
|
|
@ -28,7 +28,9 @@ import org.apache.lucene.index.IndexReader;
|
|||
*
|
||||
* @lucene.internal
|
||||
*/
|
||||
public class ReaderUtil {
|
||||
public final class ReaderUtil {
|
||||
|
||||
private ReaderUtil() {} // no instance
|
||||
|
||||
public static class Slice {
|
||||
public static final Slice[] EMPTY_ARRAY = new Slice[0];
|
||||
|
|
|
@ -20,7 +20,10 @@ package org.apache.lucene.util;
|
|||
/**
|
||||
* Helper methods to ease implementing {@link Object#toString()}.
|
||||
*/
|
||||
public class ToStringUtils {
|
||||
public final class ToStringUtils {
|
||||
|
||||
private ToStringUtils() {} // no instance
|
||||
|
||||
/**
|
||||
* for printing boost only if not 1.0
|
||||
*/
|
||||
|
|
|
@ -93,7 +93,9 @@ package org.apache.lucene.util;
|
|||
* @lucene.internal
|
||||
*/
|
||||
|
||||
final public class UnicodeUtil {
|
||||
public final class UnicodeUtil {
|
||||
|
||||
private UnicodeUtil() {} // no instance
|
||||
|
||||
public static final int UNI_SUR_HIGH_START = 0xD800;
|
||||
public static final int UNI_SUR_HIGH_END = 0xDBFF;
|
||||
|
|
Loading…
Reference in New Issue