You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rj...@apache.org on 2015/05/22 21:33:03 UTC
svn commit: r1681212 - in /lucene/dev/branches/lucene_solr_5_2: ./ lucene/
lucene/CHANGES.txt lucene/core/
lucene/core/src/java/org/apache/lucene/document/FieldType.java
Author: rjernst
Date: Fri May 22 19:33:03 2015
New Revision: 1681212
URL: http://svn.apache.org/r1681212
Log:
LUCENE-6497: Allow subclasses of FieldType to check frozen state (merged r1681211)
Modified:
lucene/dev/branches/lucene_solr_5_2/ (props changed)
lucene/dev/branches/lucene_solr_5_2/lucene/ (props changed)
lucene/dev/branches/lucene_solr_5_2/lucene/CHANGES.txt (contents, props changed)
lucene/dev/branches/lucene_solr_5_2/lucene/core/ (props changed)
lucene/dev/branches/lucene_solr_5_2/lucene/core/src/java/org/apache/lucene/document/FieldType.java
Modified: lucene/dev/branches/lucene_solr_5_2/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_2/lucene/CHANGES.txt?rev=1681212&r1=1681211&r2=1681212&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_2/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_5_2/lucene/CHANGES.txt Fri May 22 19:33:03 2015
@@ -176,6 +176,9 @@ API Changes
* LUCENE-6484: Removed EliasFanoDocIdSet, which was unused.
(Paul Elschot via Adrien Grand)
+* LUCENE-6497: Allow subclasses of FieldType to check frozen state
+ (Ryan Ernst)
+
Other
* LUCENE-6413: Test runner should report the number of suites completed/
Modified: lucene/dev/branches/lucene_solr_5_2/lucene/core/src/java/org/apache/lucene/document/FieldType.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_2/lucene/core/src/java/org/apache/lucene/document/FieldType.java?rev=1681212&r1=1681211&r2=1681212&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_2/lucene/core/src/java/org/apache/lucene/document/FieldType.java (original)
+++ lucene/dev/branches/lucene_solr_5_2/lucene/core/src/java/org/apache/lucene/document/FieldType.java Fri May 22 19:33:03 2015
@@ -32,7 +32,7 @@ public class FieldType implements Indexa
/** Data type of the numeric value
* @since 3.2
*/
- public static enum NumericType {
+ public enum NumericType {
/** 32-bit integer numeric type */
INT,
/** 64-bit long numeric type */
@@ -80,7 +80,11 @@ public class FieldType implements Indexa
public FieldType() {
}
- private void checkIfFrozen() {
+ /**
+ * Throws an exception if this FieldType is frozen. Subclasses should
+ * call this within setters for additional state.
+ */
+ protected void checkIfFrozen() {
if (frozen) {
throw new IllegalStateException("this FieldType is already frozen and cannot be changed");
}