You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dennis Byrne (JIRA)" <my...@incubator.apache.org> on 2005/07/23 04:15:51 UTC

[jira] Commented: (MYFACES-153) org.apache.myfaces.component.html.util.AddResource@getLastModified() error

    [ http://issues.apache.org/jira/browse/MYFACES-153?page=comments#action_12316559 ] 

Dennis Byrne commented on MYFACES-153:
--------------------------------------

I'm using a fresh checkout and I am still getting this error the first time certain components are instantiated/rendered .  To reproduce this, do a dist-all and use current/build/myfaces-all.jar in your webapp.

> org.apache.myfaces.component.html.util.AddResource@getLastModified() error
> --------------------------------------------------------------------------
>
>          Key: MYFACES-153
>          URL: http://issues.apache.org/jira/browse/MYFACES-153
>      Project: MyFaces
>         Type: Bug
>     Reporter: Ohara Su

>
> An error occour when I replace myfaces 1.08 by 1.09 RC2.
> The error is 
> [15:55:27,203][ERROR][AddResource.java:232] Unparsable lastModified : @lastModified@ 
> I don't know why but my web application still work very well.
> I trace source code
> org.apache.myfaces.component.html.util.AddResource
> ......
> private static Date lastModified = null;
> 	private static long getLastModified(){
> 		if( lastModified == null ){
> 			final String format = "yyyy-MM-dd HH:mm:ss Z"; // Must match the one used in the build file
> 	        final String bundleName = AddResource.class.getName();
> 	        ResourceBundle resources = ResourceBundle.getBundle( bundleName );
> 			String sLastModified = resources.getString("lastModified");
> 			try {
> 				lastModified = new SimpleDateFormat(format).parse( sLastModified );
> 			} catch (ParseException e) {
> 				lastModified = new Date();
> 				log.error("Unparsable lastModified : "+sLastModified);
> 			}
> 		}
> 		
> 		return lastModified.getTime(); 
> 	}
> .......
> AddResource.properties
> # Used un the ressources URL, to enable caching the resources on the client.
> lastModified=@lastModified@
> I think mabye something wrong happens when building the 1.09RC2.
> In AddResource.properties, lastModified should be replaced by correct string but
> it doesn't work correctly.
> ohara

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira