dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31401
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15979: Removed I18nManagerException
------------------------------------------------------------
revno: 15979
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-07-06 17:55:06 +0200
message:
Removed I18nManagerException
removed:
dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/I18nManagerException.java
modified:
dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/DefaultI18nManager.java
dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/I18nManager.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregatedValueController.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/PDFFormController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/DefaultI18nManager.java'
--- dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/DefaultI18nManager.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/DefaultI18nManager.java 2014-07-06 15:55:06 +0000
@@ -38,7 +38,6 @@
/**
* @author Pham Thi Thuy
* @author Nguyen Dang Quang
- * @version $Id: DefaultI18nManager.java 6335 2008-11-20 11:11:26Z larshelg $
*/
public class DefaultI18nManager
implements I18nManager
@@ -67,27 +66,24 @@
@Override
public I18n getI18n( Class<?> clazz )
- throws I18nManagerException
{
return new I18n( getGlobalResourceBundle(), getSpecificResourceBundle( clazz.getName() ) );
}
@Override
public I18n getI18n( Class<?> clazz, Locale locale )
- throws I18nManagerException
{
return new I18n( getGlobalResourceBundle( locale ), getSpecificResourceBundle( clazz.getName(), locale ) );
}
@Override
- public I18n getI18n( String clazzName ) throws I18nManagerException
+ public I18n getI18n( String clazzName )
{
return new I18n( getGlobalResourceBundle(), getSpecificResourceBundle( clazzName ) );
}
@Override
public I18nFormat getI18nFormat()
- throws I18nManagerException
{
I18nFormat formatter = new I18nFormat( getGlobalResourceBundle() );
@@ -101,13 +97,11 @@
// -------------------------------------------------------------------------
private ResourceBundle getGlobalResourceBundle()
- throws I18nManagerException
{
return getGlobalResourceBundle( getCurrentLocale() );
}
private ResourceBundle getGlobalResourceBundle( Locale locale )
- throws I18nManagerException
{
try
{
@@ -115,7 +109,7 @@
}
catch ( ResourceBundleManagerException e )
{
- throw new I18nManagerException( "Failed to get global resource bundle", e );
+ throw new RuntimeException( "Failed to get global resource bundle", e );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/I18nManager.java'
--- dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/I18nManager.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/I18nManager.java 2014-07-06 15:55:06 +0000
@@ -39,11 +39,11 @@
{
String ID = I18nManager.class.getName();
- I18n getI18n( Class<?> clazz ) throws I18nManagerException;
-
- I18n getI18n( Class<?> clazz, Locale locale ) throws I18nManagerException;
-
- I18n getI18n( String clazzName ) throws I18nManagerException;
-
- I18nFormat getI18nFormat() throws I18nManagerException;
+ I18n getI18n( Class<?> clazz );
+
+ I18n getI18n( Class<?> clazz, Locale locale );
+
+ I18n getI18n( String clazzName );
+
+ I18nFormat getI18nFormat();
}
=== removed file 'dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/I18nManagerException.java'
--- dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/I18nManagerException.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/I18nManagerException.java 1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
-package org.hisp.dhis.i18n;
-
-/*
- * Copyright (c) 2004-2014, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @author Pham Thi Thuy
- * @author Nguyen Dang Quang
- */
-public class I18nManagerException
- extends RuntimeException
-{
- public I18nManagerException( String message )
- {
- super( message );
- }
-
- public I18nManagerException( String message, Throwable cause )
- {
- super( message, cause );
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregatedValueController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregatedValueController.java 2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregatedValueController.java 2014-07-06 15:55:06 +0000
@@ -35,7 +35,6 @@
import org.hisp.dhis.dxf2.utils.JacksonUtils;
import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.i18n.I18nManager;
-import org.hisp.dhis.i18n.I18nManagerException;
import org.hisp.dhis.indicator.IndicatorService;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.period.Period;
@@ -99,7 +98,7 @@
@RequestParam( required = false ) boolean lastYear,
@RequestParam( required = false ) boolean lastFiveYears,
HttpServletResponse response
- ) throws IOException, I18nManagerException
+ ) throws IOException
{
RelativePeriods rp = new RelativePeriods();
rp.setReportingMonth( lastMonth );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/PDFFormController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/PDFFormController.java 2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/PDFFormController.java 2014-07-06 15:55:06 +0000
@@ -51,7 +51,6 @@
import org.hisp.dhis.dxf2.pdfform.PdfDataEntryFormUtil;
import org.hisp.dhis.dxf2.pdfform.PdfFormFontSettings;
import org.hisp.dhis.i18n.I18nManager;
-import org.hisp.dhis.i18n.I18nManagerException;
import org.hisp.dhis.importexport.ImportStrategy;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.program.ProgramStageService;
@@ -194,7 +193,7 @@
@RequestMapping(value = "/programStage/{programStageUid}", method = RequestMethod.GET)
public void getFormPDF_ProgramStage( HttpServletRequest request, HttpServletResponse response,
@PathVariable String programStageUid )
- throws IOException, DocumentException, I18nManagerException
+ throws IOException, DocumentException
{
// 1. - Create Document and PdfWriter
@@ -249,7 +248,7 @@
// Helpers
//--------------------------------------------------------------------------
- private void writeToOutputStream( ByteArrayOutputStream baos, HttpServletResponse response )
+ private void writeToOutputStream( ByteArrayOutputStream baos, HttpServletResponse response ) //TODO unnecessary?
throws IOException
{
OutputStream os = null;