cvs commit: jakarta-bcel/src/java/org/apache/bcel/util SyntheticRepository.java

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
mdahm       2002/06/05 03:17:38

  Modified:    src/java/org/apache/bcel/util SyntheticRepository.java
  Log:
  getInstance didnt return instance
  
  Revision  Changes    Path
  1.2       +8 -1      jakarta-bcel/src/java/org/apache/bcel/util/SyntheticRepository.java
  
  Index: SyntheticRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/util/SyntheticRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SyntheticRepository.java	8 May 2002 20:59:29 -0000	1.1
  +++ SyntheticRepository.java	5 Jun 2002 10:17:38 -0000	1.2
  @@ -92,7 +92,14 @@
       }
   
       public static SyntheticRepository getInstance() {
  -	return (SyntheticRepository) instances.get( defaultPath );
  +      SyntheticRepository rep =(SyntheticRepository)
  +	instances.get( defaultPath );
  +
  +      if(rep == null) {
  +	rep = new SyntheticRepository(); // adds itself to instances
  +      }
  +      
  +      return rep;
       }
   
       public static SyntheticRepository getInstance(String classPath) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.