r9622 - helma-ng/trunk/modules/helma

[email protected] Thu, 16 Apr 2009 21:19:09 +0200 (CEST)
Newsgroups gmane.comp.java.helma.cvs
Message-ID <20090416191909.0AB843D0D6@mia>
Author: hannes
Date: 2009-04-16 21:19:09 +0200 (Thu, 16 Apr 2009)
New Revision: 9622

Modified:
   helma-ng/trunk/modules/helma/file.js
Log:
When renaming a function it's a good idea to also rename its uses.

Details at http://dev.helma.org/trac/helma/changeset/9622

Modified: helma-ng/trunk/modules/helma/file.js
===================================================================
--- helma-ng/trunk/modules/helma/file.js	2009-04-13 23:50:23 UTC (rev 9621)
+++ helma-ng/trunk/modules/helma/file.js	2009-04-16 19:19:09 UTC (rev 9622)
@@ -115,7 +115,7 @@
      * @type Boolean
      */
     this.open = function(options) {
-       if (self.isOpened()) {
+       if (self.isOpen()) {
           throw new IllegalStateException("File already open");
        }
        // We assume that the BufferedReader and PrintWriter creation
@@ -179,7 +179,7 @@
     * @type String
     */
    this.readln = function() {
-      if (!self.isOpened()) {
+      if (!self.isOpen()) {
          throw new IllegalStateException("File not opened");
       }
       if (!(readerWriter instanceof BufferedReader)) {
@@ -212,7 +212,7 @@
     * @see #writeln
     */
    this.write = function(what) {
-      if (!self.isOpened()) {
+      if (!self.isOpen()) {
          throw new IllegalStateException("File not opened");
       }
       if (!(readerWriter instanceof PrintWriter)) {
@@ -263,7 +263,7 @@
     * @type Boolean
     */
    this.remove = function() {
-      if (self.isOpened()) {
+      if (self.isOpen()) {
          throw new IllegalStateException("An openened file cannot be removed");
       }
       return file["delete"]();
@@ -281,7 +281,7 @@
     * @type Array
     */
    this.list = function(pattern) {
-      if (self.isOpened())
+      if (self.isOpen())
          return null;
       if (!file.isDirectory())
          return null;
@@ -307,7 +307,7 @@
     * @type Array
     */
    this.listFiles = function(pattern) {
-      if (self.isOpened() || !file.isDirectory())
+      if (self.isOpen() || !file.isDirectory())
          return null;
       // map function to convert java.io.Files to helma Files
       function convert(jfile) {
@@ -330,7 +330,7 @@
     * @type Boolean
     */
    this.flush = function() {
-      if (!self.isOpened()) {
+      if (!self.isOpen()) {
          throw new IllegalStateException("File not opened");
       }
       if (readerWriter instanceof Writer) {
@@ -348,7 +348,7 @@
     * @type Boolean
     */
    this.close = function() {
-      if (!self.isOpened()) {
+      if (!self.isOpen()) {
          return false;
       }
       readerWriter.close();
@@ -485,7 +485,7 @@
     * @type Boolean
     */
    this.makeDirectory = function() {
-      if (self.isOpened())
+      if (self.isOpen())
          return false;
       // don't do anything if file exists or use multi directory version
       return (file.isDirectory() || file.mkdirs());
@@ -507,10 +507,10 @@
       if (toFile == null) {
          throw new IllegalArgumentException("Uninitialized target File object");
       }
-      if (self.isOpened()) {
+      if (self.isOpen()) {
          throw new IllegalStateException("An openened file cannot be renamed");
       }
-      if (toFile.isOpened()) {
+      if (toFile.isOpen()) {
          throw new IllegalStateException("You cannot rename to an openened file");
       }
       return file.renameTo(new JFile(toFile.getAbsolutePath()));
@@ -524,7 +524,7 @@
     * @type Boolean
     */
    this.eof = function() {
-      if (!self.isOpened()) {
+      if (!self.isOpen()) {
          throw new IllegalStateException("File not opened");
       }
       if (!(readerWriter instanceof BufferedReader)) {
@@ -550,7 +550,7 @@
     */
    this.readAll = function() {
       // Open the file for readAll
-      if (self.isOpened()) {
+      if (self.isOpen()) {
          throw new IllegalStateException("File already open");
       }
       if (file.exists()) {