dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40651
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20650: Minor
------------------------------------------------------------
revno: 20650
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-10-12 19:30:45 +0200
message:
Minor
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java 2015-10-12 12:41:20 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java 2015-10-12 17:30:45 +0000
@@ -87,7 +87,6 @@
* request will redirect to the default.
*
* @param key key associated with the file.
- * @throws WebMessageException
*/
@RequestMapping( value = "/{key}", method = RequestMethod.GET )
public void getStaticContent(
@@ -97,7 +96,7 @@
if ( !KEY_WHITELIST_MAP.containsKey( key ) )
{
- throw new WebMessageException( WebMessageUtils.notFound( "Key does not exist" ) );
+ throw new WebMessageException( WebMessageUtils.notFound( "Key does not exist." ) );
}
boolean useCustomFile = (boolean) systemSettingManager.getSystemSetting( KEY_WHITELIST_MAP.get( key ) );
@@ -144,10 +143,8 @@
/**
* Uploads PNG images based on a key. Only accepts PNG and white listed keys.
*
- * @param key the key
- * @param file the image file
- * @throws WebMessageException
- * @throws IOException
+ * @param key the key.
+ * @param file the image file.
*/
@PreAuthorize( "hasRole('ALL') or hasRole('F_SYSTEM_SETTING')" )
@ResponseStatus( HttpStatus.NO_CONTENT )
@@ -168,7 +165,7 @@
if( !mimeType.isCompatibleWith( MimeTypeUtils.IMAGE_PNG ))
{
- throw new WebMessageException( new WebMessage(WebMessageStatus.WARNING, HttpStatus.UNSUPPORTED_MEDIA_TYPE ) );
+ throw new WebMessageException( new WebMessage( WebMessageStatus.WARNING, HttpStatus.UNSUPPORTED_MEDIA_TYPE ) );
}
// Only keys in the white list are accepted at the current time
@@ -187,7 +184,7 @@
}
catch( LocationManagerException e)
{
- throw new WebMessageException( WebMessageUtils.error(e.getMessage()) );
+ throw new WebMessageException( WebMessageUtils.error( e.getMessage() ) );
}
try