Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Object IllegalStateException Problem Date: Thu, 10 Nov 2011 15:03:02 -0800 (PST) Organization: http://groups.google.com Lines: 32 Message-ID: <10130030.857.1320966182398.JavaMail.geo-discussion-forums@prap37> References: Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 2620:0:1000:2404:224:d7ff:fe69:5838 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1320966182 7544 127.0.0.1 (10 Nov 2011 23:03:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Nov 2011 23:03:02 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:2404:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9832 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; > } You completely ignored Andreas's advice! Here's what you need to provide us: http://sscce.org/ -- Lew