You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by st...@apache.org on 2004/09/10 14:25:58 UTC

cvs commit: jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core RepositoryImpl.java

stefan      2004/09/10 05:25:58

  Modified:    proposals/jcrri/src/org/apache/slide/jcr/core
                        RepositoryImpl.java
  Log:
  jcrri: java,lang.NumberFormatException on startup
  
  Revision  Changes    Path
  1.27      +4 -4      jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/RepositoryImpl.java
  
  Index: RepositoryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/RepositoryImpl.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- RepositoryImpl.java	9 Sep 2004 15:45:45 -0000	1.26
  +++ RepositoryImpl.java	10 Sep 2004 12:25:58 -0000	1.27
  @@ -280,8 +280,8 @@
   	repProps = new Properties();
   	loadRepProps();
   
  -	nodesCount = Long.parseLong(repProps.getProperty(STATS_NODE_COUNT_PROPERTY));
  -	propsCount = Long.parseLong(repProps.getProperty(STATS_PROP_COUNT_PROPERTY));
  +	nodesCount = Long.parseLong(repProps.getProperty(STATS_NODE_COUNT_PROPERTY, "0"));
  +	propsCount = Long.parseLong(repProps.getProperty(STATS_PROP_COUNT_PROPERTY, "0"));
   
   	// get the system session for every defined workspace and
   	// register as an event listener
  @@ -453,7 +453,7 @@
   	FileSystemResource propFile = new FileSystemResource(metaDataStore, PROPERTIES_RESOURCE);
   	try {
   	    repProps.clear();
  -	    if (!propFile.exists()) {
  +	    if (!propFile.exists() || propFile.length() == 0) {
   		// initialize properties with pre-defined values
   		repProps.setProperty(SPEC_VERSION_PROPERTY, SPEC_VERSION);
   		repProps.setProperty(SPEC_NAME_PROPERTY, SPEC_NAME);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org