mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
70225: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud) 70073: Fixed stream closure handling, updated javadocs and cleaned up as an aside to MNT-11098 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@70490 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2012 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
|
@@ -824,22 +824,24 @@ public class MessageServiceImpl implements MessageService
|
||||
|
||||
/**
|
||||
* Message Resource Bundle
|
||||
*
|
||||
* Custom message property resource bundle, to overcome known limitation of JDK 5.0 (and lower).
|
||||
*
|
||||
* <p/>
|
||||
* Custom message property resource bundle, to overcome known limitation of JDK 5.0 (and lower).<br/>
|
||||
* http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6204853
|
||||
*
|
||||
* <p/>
|
||||
* Note: JDK 6.0 provides the ability to construct a PropertyResourceBundle from a Reader.
|
||||
*/
|
||||
private class MessagePropertyResourceBundle extends ResourceBundle
|
||||
{
|
||||
private Properties properties = new Properties();
|
||||
|
||||
/**
|
||||
* @param reader the source of the properties, which will be closed after use
|
||||
*/
|
||||
public MessagePropertyResourceBundle(Reader reader) throws IOException
|
||||
{
|
||||
BufferedReader br = new BufferedReader(reader);
|
||||
try
|
||||
{
|
||||
BufferedReader br = new BufferedReader(reader);
|
||||
String line = br.readLine();
|
||||
while (line != null)
|
||||
{
|
||||
@@ -866,7 +868,8 @@ public class MessageServiceImpl implements MessageService
|
||||
}
|
||||
finally
|
||||
{
|
||||
reader.close();
|
||||
try {br.close();} catch (IOException e) {}
|
||||
try {reader.close();} catch (IOException e) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user