mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed recursive initialization of OpenOfficeMetadataExtracter.
Fixed minor incorrect warning when XMLMetadataExtracter is active. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6279 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -474,8 +474,8 @@ abstract public class AbstractMappingMetadataExtracter implements MetadataExtrac
|
||||
}
|
||||
}
|
||||
|
||||
// Were there any mappings
|
||||
if (mapping.size() == 0)
|
||||
// The configured mappings are empty, but there were default mappings
|
||||
if (mapping.size() == 0 && defaultMapping.size() > 0)
|
||||
{
|
||||
logger.warn(
|
||||
"There are no property mappings for the metadata extracter.\n" +
|
||||
|
@@ -102,17 +102,21 @@ public class OpenOfficeMetadataExtracter extends AbstractMappingMetadataExtracte
|
||||
/**
|
||||
* Initialises the bean by establishing an UNO connection
|
||||
*/
|
||||
@Override
|
||||
public synchronized void init()
|
||||
{
|
||||
PropertyCheck.mandatory("OpenOfficeMetadataExtracter", "connection", connection);
|
||||
|
||||
// Base initialization
|
||||
super.init();
|
||||
|
||||
// attempt a connection
|
||||
connect();
|
||||
if (isConnected())
|
||||
// Only allow registration if the connection is good
|
||||
if (!isConnected())
|
||||
{
|
||||
// Only register if the connection is available initially. Reconnections are only supported
|
||||
// if the server is able to connection initially.
|
||||
super.register();
|
||||
// Reconnections are only supported if the server is able to connection initially.
|
||||
super.setRegistry(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user