Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 10 Nov 2011 12:21:28 -0600 Date: Thu, 10 Nov 2011 10:21:24 -0800 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Object IllegalStateException Problem References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 28 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 75.8.127.7 X-Trace: sv3-2y8xY7nShRtxWeIA1AU/IEJFwSZk8/ApG5Pc2bqH66rB45Kfu3PUzmg55+7PPpITb0tr10ZHMd59v/P!Lt5/A6JpbpgzsVwObETlVgg7ANNDvRuff/dDxp3hKU41kEdGepM1gTPxAPg3Z6ADPZ+LZkouJDkz!Bv/Y8nDob05YqVar3qJvtyOUlYe6uAogfTterAMzaw== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2152 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9829 On 11/10/2011 8:59 AM, ptreves wrote: > This is the getSaveFile() method: > > private FileInfo getSaveFile() throws IOException { > if (object == null) { > throw new IllegalStateException("Please load a version of > an object before saving!"); > } > > // get the uncommitted version if it is there > FileInfo saveFile = > getConfigurationVersions().get(ConfigurationVersion.UNCOMMITTED); > > if (saveFile == null) { > // otherwise create a new temp file > saveFile = > FileInfo.createTempFile(getConfigurationFileName(), > getConfigurationDirectory()); > } > > return saveFile; > } > > Paolo Where is "object" defined, and what is supposed give it a non-null value? Patricia