Author: epbernard
Date: 2008-05-08 14:35:30 -0400 (Thu, 08 May 2008)
New Revision: 14654
Modified:
search/trunk/src/java/org/hibernate/search/backend/Workspace.java
search/trunk/src/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java
search/trunk/src/java/org/hibernate/search/backend/impl/jms/JMSBackendQueueProcessorFactory.java
search/trunk/src/java/org/hibernate/search/bridge/BridgeFactory.java
search/trunk/src/java/org/hibernate/search/bridge/builtin/BooleanBridge.java
search/trunk/src/java/org/hibernate/search/bridge/builtin/DateBridge.java
search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java
search/trunk/src/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java
search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java
search/trunk/src/java/org/hibernate/search/reader/NotSharedReaderProvider.java
search/trunk/src/java/org/hibernate/search/reader/ReaderProviderHelper.java
search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.java
search/trunk/src/java/org/hibernate/search/store/DirectoryProviderFactory.java
search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper.java
search/trunk/src/test/org/hibernate/search/test/FSDirectoryTest.java
search/trunk/src/test/org/hibernate/search/test/bridge/PaddedIntegerBridge.java
search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlaveAndMasterDPTest.java
search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Address.java
search/trunk/src/test/org/hibernate/search/test/filter/Driver.java
search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerializationTest.java
search/trunk/src/test/org/hibernate/search/test/jpa/JPATestCase.java
search/trunk/src/test/org/hibernate/search/test/optimizer/OptimizerTestCase.java
search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTest.java
search/trunk/src/test/org/hibernate/search/test/reader/ReaderPerfTestCase.java
search/trunk/src/test/org/hibernate/search/test/session/OptimizeTest.java
search/trunk/src/test/org/hibernate/search/test/shards/ShardsTest.java
search/trunk/src/test/org/hibernate/search/test/worker/WorkerTestCase.java
Log:
Fix some things after code inspection
Modified: search/trunk/src/java/org/hibernate/search/backend/Workspace.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/backend/Workspace.java 2008-05-07 21:02:35
UTC (rev 14653)
+++ search/trunk/src/java/org/hibernate/search/backend/Workspace.java 2008-05-08 18:35:30
UTC (rev 14654)
@@ -68,6 +68,7 @@
* retrieve a read write IndexReader
* For a given DirectoryProvider, An IndexReader must be used before an IndexWriter
*/
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
public IndexReader getIndexReader(DirectoryProvider provider, Class entity) {
//one cannot access a reader for update after a writer has been accessed
if ( writers.containsKey( provider ) )
@@ -95,6 +96,7 @@
* retrieve a read write IndexWriter
* For a given DirectoryProvider, An IndexReader must be used before an IndexWriter
*/
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
public IndexWriter getIndexWriter(DirectoryProvider provider, Class entity, boolean
modificationOperation) {
//one has to close a reader for update before a writer is accessed
IndexReader reader = readers.get( provider );
Modified:
search/trunk/src/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -174,9 +174,8 @@
public boolean isRightLayer(WorkType type) {
if (this == FIRST && type != WorkType.COLLECTION) return true;
- if (this == SECOND && type == WorkType.COLLECTION) return true;
- return false;
- }
+ return this == SECOND && type == WorkType.COLLECTION;
+ }
}
}
Modified:
search/trunk/src/java/org/hibernate/search/backend/impl/jms/JMSBackendQueueProcessorFactory.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/backend/impl/jms/JMSBackendQueueProcessorFactory.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/java/org/hibernate/search/backend/impl/jms/JMSBackendQueueProcessorFactory.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -87,7 +87,7 @@
}
}
- public static Properties getJndiProperties(Properties properties) {
+ private static Properties getJndiProperties(Properties properties) {
HashSet specialProps = new HashSet();
specialProps.add( JNDI_PREFIX + "class" );
Modified: search/trunk/src/java/org/hibernate/search/bridge/BridgeFactory.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/bridge/BridgeFactory.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/java/org/hibernate/search/bridge/BridgeFactory.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -150,7 +150,7 @@
}
public static FieldBridge guessType(Field field, XMember member, ReflectionManager
reflectionManager) {
- FieldBridge bridge = null;
+ FieldBridge bridge;
org.hibernate.search.annotations.FieldBridge bridgeAnn;
//@Field bridge has priority over @FieldBridge
if ( field != null && void.class != field.bridge().impl() ) {
Modified: search/trunk/src/java/org/hibernate/search/bridge/builtin/BooleanBridge.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/bridge/builtin/BooleanBridge.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/java/org/hibernate/search/bridge/builtin/BooleanBridge.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -20,7 +20,7 @@
public String objectToString(Object object) {
return object == null ?
null :
- ( (Boolean) object ).toString();
+ object.toString();
}
}
Modified: search/trunk/src/java/org/hibernate/search/bridge/builtin/DateBridge.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/bridge/builtin/DateBridge.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/java/org/hibernate/search/bridge/builtin/DateBridge.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -43,7 +43,7 @@
public static final TwoWayStringBridge DATE_SECOND = new DateBridge( Resolution.SECOND
);
public static final TwoWayStringBridge DATE_MILLISECOND = new DateBridge(
Resolution.MILLISECOND );
- DateTools.Resolution resolution;
+ private DateTools.Resolution resolution;
public DateBridge() {
}
Modified: search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -261,9 +261,8 @@
propertiesMetadata.fieldIndex.add( getIndex( Index.UN_TOKENIZED ) );
propertiesMetadata.fieldTermVectors.add( getTermVector( TermVector.NO ) );
propertiesMetadata.fieldBridges.add( BridgeFactory.guessType( null, member,
reflectionManager ) );
- // Field > property > entity analyzer
- Analyzer analyzer = null; //no field analyzer
- if ( analyzer == null ) analyzer = getAnalyzer( member, context );
+ // property > entity analyzer (no field analyzer)
+ Analyzer analyzer = getAnalyzer( member, context );
if ( analyzer == null ) analyzer = propertiesMetadata.analyzer;
if ( analyzer == null ) throw new AssertionFailure( "Analizer should not be
undefined" );
this.analyzer.addScopedAnalyzer( fieldName, analyzer );
Modified:
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -35,6 +35,7 @@
public class FullTextIndexEventListener implements PostDeleteEventListener,
PostInsertEventListener,
PostUpdateEventListener, Initializable {
+ @SuppressWarnings( { "WeakerAccess" } )
protected boolean used;
protected SearchFactoryImplementor searchFactoryImplementor;
@@ -83,6 +84,7 @@
}
}
+ @SuppressWarnings( { "WeakerAccess" } )
protected void processWork(Object entity, Serializable id, WorkType workType,
AbstractEvent event) {
Work work = new Work(entity, id, workType);
searchFactoryImplementor.getWorker().performWork( work, event.getSession() );
Modified: search/trunk/src/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -105,6 +105,7 @@
}
//TODO mutualize this code with the EM this will fix the rollback issues
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
private void throwPersistenceException(Exception e) {
if ( e instanceof StaleStateException ) {
PersistenceException pe = wrapStaleStateException( (StaleStateException) e );
@@ -135,14 +136,15 @@
}
}
- public void throwPersistenceException(PersistenceException e) {
+ void throwPersistenceException(PersistenceException e) {
if ( ! ( e instanceof NoResultException || e instanceof NonUniqueResultException ) ) {
//FIXME rollback
}
throw e;
}
- public PersistenceException wrapStaleStateException(StaleStateException e) {
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
+ PersistenceException wrapStaleStateException(StaleStateException e) {
PersistenceException pe;
if ( e instanceof StaleObjectStateException ) {
StaleObjectStateException sose = (StaleObjectStateException) e;
@@ -167,6 +169,7 @@
return pe;
}
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
public Object getSingleResult() {
try {
List result = query.list();
Modified: search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -487,7 +487,6 @@
}
private void closeSearcher(Searcher searcher, ReaderProvider readerProvider) {
- boolean trace = log.isTraceEnabled();
Set<IndexReader> indexReaders = getIndexReaders( searcher );
for (IndexReader indexReader : indexReaders) {
Modified: search/trunk/src/java/org/hibernate/search/reader/NotSharedReaderProvider.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/reader/NotSharedReaderProvider.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/java/org/hibernate/search/reader/NotSharedReaderProvider.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -17,6 +17,7 @@
* @author Emmanuel Bernard
*/
public class NotSharedReaderProvider implements ReaderProvider {
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
public IndexReader openReader(DirectoryProvider[] directoryProviders) {
final int length = directoryProviders.length;
IndexReader[] readers = new IndexReader[length];
@@ -33,6 +34,7 @@
}
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
public void closeReader(IndexReader reader) {
try {
reader.close();
Modified: search/trunk/src/java/org/hibernate/search/reader/ReaderProviderHelper.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/reader/ReaderProviderHelper.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/java/org/hibernate/search/reader/ReaderProviderHelper.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -15,6 +15,7 @@
* @author Emmanuel Bernard
*/
public abstract class ReaderProviderHelper {
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
public static IndexReader buildMultiReader(int length, IndexReader[] readers) {
if ( length == 0 ) {
return null;
Modified: search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -121,6 +121,7 @@
return buildMultiReader( length, readers );
}
+ @SuppressWarnings( { "ThrowableInstanceNeverThrown" } )
private IndexReader replaceActiveReader(IndexReader outOfDateReader, Lock
directoryProviderLock, DirectoryProvider directoryProvider, IndexReader[] readers) {
boolean trace = log.isTraceEnabled();
IndexReader oldReader;
Modified: search/trunk/src/java/org/hibernate/search/store/DirectoryProviderFactory.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/store/DirectoryProviderFactory.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/java/org/hibernate/search/store/DirectoryProviderFactory.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -46,7 +46,7 @@
* @author Hardy Ferentschik
*/
public class DirectoryProviderFactory {
- public List<DirectoryProvider<?>> providers = new
ArrayList<DirectoryProvider<?>>();
+ private List<DirectoryProvider<?>> providers = new
ArrayList<DirectoryProvider<?>>();
private static String LUCENE_PREFIX = "hibernate.search.";
private static String LUCENE_DEFAULT = LUCENE_PREFIX + "default.";
private static String DEFAULT_DIRECTORY_PROVIDER = FSDirectoryProvider.class.getName();
Modified: search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -38,8 +38,8 @@
File sourceDirectory;
if ( log.isTraceEnabled() ) {
log.trace(
- "Guess source directory from " + ROOTINDEX_PROP_NAME + " " +
root != null ? root : "<null>"
- + " and " + RELATIVEINDEX_PROP_NAME + " " + relative != null ?
relative : "<null>"
+ "Guess source directory from " + ROOTINDEX_PROP_NAME + " " + (
root != null ? root : "<null>" )
+ + " and " + RELATIVEINDEX_PROP_NAME + " " + (relative != null
? relative : "<null>")
);
}
if ( relative == null ) relative = directoryProviderName;
Modified: search/trunk/src/test/org/hibernate/search/test/FSDirectoryTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/FSDirectoryTest.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/test/org/hibernate/search/test/FSDirectoryTest.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -45,8 +45,7 @@
private File getBaseIndexDir() {
File current = new File( "." );
- File sub = new File( current, "indextemp" );
- return sub;
+ return new File( current, "indextemp" );
}
protected void tearDown() throws Exception {
Modified: search/trunk/src/test/org/hibernate/search/test/bridge/PaddedIntegerBridge.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/bridge/PaddedIntegerBridge.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/test/org/hibernate/search/test/bridge/PaddedIntegerBridge.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -29,7 +29,7 @@
}
public String objectToString(Object object) {
- String rawInteger = ( (Integer) object ).toString();
+ String rawInteger = object.toString();
if (rawInteger.length() > padding) throw new IllegalArgumentException( "Try to
pad on a number too big" );
StringBuilder paddedInteger = new StringBuilder( );
for ( int padIndex = rawInteger.length() ; padIndex < padding ; padIndex++ ) {
Modified:
search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlaveAndMasterDPTest.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlaveAndMasterDPTest.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlaveAndMasterDPTest.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -22,6 +22,7 @@
*/
public class FSSlaveAndMasterDPTest extends MultipleSFTestCase {
+ @SuppressWarnings( { "PointlessArithmeticExpression" } )
public void testProperCopy() throws Exception {
Session s1 = getSessionFactories()[0].openSession( );
SnowStorm sn = new SnowStorm();
Modified:
search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Address.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Address.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Address.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -196,9 +196,8 @@
if ( ! equals(this.getCounty(), that.getCounty() ) ) return false;
if ( ! equals(this.getTown(), that.getTown() ) ) return false;
if ( ! equals(this.getPostcode(), that.getPostcode() ) ) return false;
- if ( ! equals(this.getContact(), that.getContact() ) ) return false;
- return true;
-// EqualsBuilder equalsBuilder = new EqualsBuilder();
+ return equals( this.getContact(), that.getContact() );
+ // EqualsBuilder equalsBuilder = new EqualsBuilder();
// return equalsBuilder.append(new Object[]{this.getAddress1(), this.getAddress2(),
this.getCounty(), this.getTown(), this.getPostcode(), this.contact}, new
Object[]{address.getAddress1(), address.getAddress2(), address.getCounty(),
address.getTown(), address.getPostcode(), address.getContact()}).isEquals();
}
Modified: search/trunk/src/test/org/hibernate/search/test/filter/Driver.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/filter/Driver.java 2008-05-07 21:02:35
UTC (rev 14653)
+++ search/trunk/src/test/org/hibernate/search/test/filter/Driver.java 2008-05-08 18:35:30
UTC (rev 14654)
@@ -88,10 +88,9 @@
if ( score != driver.score ) return false;
if ( delivery != null ? !delivery.equals( driver.delivery ) : driver.delivery != null )
return false;
if ( name != null ? !name.equals( driver.name ) : driver.name != null ) return false;
- if ( teacher != null ? !teacher.equals( driver.teacher ) : driver.teacher != null )
return false;
+ return !( teacher != null ? !teacher.equals( driver.teacher ) : driver.teacher != null
);
- return true;
- }
+ }
public int hashCode() {
int result;
Modified:
search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerializationTest.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerializationTest.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerializationTest.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -81,7 +81,7 @@
public Class[] getAnnotatedClasses() {
return new Class[] { Bretzel.class };
- };
+ }
/**
* Helper method for testing the entity manager before and after
Modified: search/trunk/src/test/org/hibernate/search/test/jpa/JPATestCase.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/jpa/JPATestCase.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/test/org/hibernate/search/test/jpa/JPATestCase.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -4,7 +4,7 @@
import java.util.Map;
import java.util.HashMap;
import java.util.Properties;
-import java.util.ArrayList;
+import java.util.ArrayList;import java.util.Arrays;
import java.io.InputStream;
import java.io.IOException;
import javax.persistence.EntityManagerFactory;
@@ -77,9 +77,7 @@
Map config = loadProperties();
ArrayList<Class> classes = new ArrayList<Class>();
- for ( Class clazz : getAnnotatedClasses() ) {
- classes.add( clazz );
- }
+ classes.addAll( Arrays.asList( getAnnotatedClasses() ) );
config.put( HibernatePersistence.LOADED_CLASSES, classes );
for ( Map.Entry<Class, String> entry : getCachedClasses().entrySet() ) {
config.put(
@@ -95,9 +93,7 @@
}
if ( getEjb3DD().length > 0 ) {
ArrayList<String> dds = new ArrayList<String>();
- for ( String dd : getEjb3DD() ) {
- dds.add( dd );
- }
+ dds.addAll( Arrays.asList( getEjb3DD() ) );
config.put( HibernatePersistence.XML_FILE_NAMES, dds );
}
Modified:
search/trunk/src/test/org/hibernate/search/test/optimizer/OptimizerTestCase.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/optimizer/OptimizerTestCase.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/test/org/hibernate/search/test/optimizer/OptimizerTestCase.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -37,6 +37,7 @@
buildSessionFactory( getMappings(), getAnnotatedPackages(), getXmlFiles() );
}
+ @SuppressWarnings( { "UnnecessaryLocalVariable" } )
private File getBaseIndexDir() {
File current = new File( "." );
File sub = new File( current, "indextemp" );
Modified: search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTest.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTest.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTest.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -116,7 +116,7 @@
private void createTestBooks(FullTextSession s) {
Transaction tx = s.beginTransaction();
Calendar cal = Calendar.getInstance( );
- cal.set( 2007, 07, 25, 11, 20, 30);
+ cal.set( 2007, 7, 25, 11, 20, 30);
Book book = new Book(1, "Hibernate & Lucene", "This is a test
book.");
book.setPublicationDate( cal.getTime() );
s.save(book);
Modified: search/trunk/src/test/org/hibernate/search/test/reader/ReaderPerfTestCase.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/reader/ReaderPerfTestCase.java 2008-05-07
21:02:35 UTC (rev 14653)
+++
search/trunk/src/test/org/hibernate/search/test/reader/ReaderPerfTestCase.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -52,8 +52,7 @@
private File getBaseIndexDir() {
File current = new File( "." );
- File sub = new File( current, "indextemp" );
- return sub;
+ return new File( current, "indextemp" );
}
protected void tearDown() throws Exception {
Modified: search/trunk/src/test/org/hibernate/search/test/session/OptimizeTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/session/OptimizeTest.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/test/org/hibernate/search/test/session/OptimizeTest.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -76,8 +76,7 @@
private File getBaseIndexDir() {
File current = new File( "." );
- File sub = new File( current, "indextemp" );
- return sub;
+ return new File( current, "indextemp" );
}
protected void tearDown() throws Exception {
Modified: search/trunk/src/test/org/hibernate/search/test/shards/ShardsTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/shards/ShardsTest.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/test/org/hibernate/search/test/shards/ShardsTest.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -167,8 +167,7 @@
private File getBaseIndexDir() {
File current = new File( "." );
- File sub = new File( current, "indextemp" );
- return sub;
+ return new File( current, "indextemp" );
}
protected void tearDown() throws Exception {
Modified: search/trunk/src/test/org/hibernate/search/test/worker/WorkerTestCase.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/worker/WorkerTestCase.java 2008-05-07
21:02:35 UTC (rev 14653)
+++ search/trunk/src/test/org/hibernate/search/test/worker/WorkerTestCase.java 2008-05-08
18:35:30 UTC (rev 14654)
@@ -42,8 +42,7 @@
private File getBaseIndexDir() {
File current = new File( "." );
- File sub = new File( current, "indextemp" );
- return sub;
+ return new File( current, "indextemp" );
}
protected void tearDown() throws Exception {