Fix warnings about member hiding The member 'message' in the exception classes was hiding the member with the same name in the superclass BuiltinException. Change-Id: Ia302d49574253d7270642b38510a6fbfb0a15f4d
diff --git a/src/exceptions/ExistenceException.java b/src/exceptions/ExistenceException.java index 3741b59..96de890 100644 --- a/src/exceptions/ExistenceException.java +++ b/src/exceptions/ExistenceException.java
@@ -30,14 +30,14 @@ public Term culprit; /** Holds a string representation of detail message. */ - public String message; + public String msg; /** Constructs a new <code>ExistenceException</code> * with a object type, its culprit, and message. */ public ExistenceException(String _objType, Term _culprit, String _message) { objType = _objType; culprit = _culprit; - message = _message; + msg = _message; } /** Constructs a new <code>ExistenceException</code> @@ -47,7 +47,7 @@ this.argNo = _argNo; objType = _objType; culprit = _culprit; - message = _message; + msg = _message; } /** Returns a term representation of this <code>ExistenceException</code>: @@ -60,7 +60,7 @@ new IntegerTerm(argNo), SymbolTerm.create(objType), culprit, - SymbolTerm.create(message)}; + SymbolTerm.create(msg)}; return new StructureTerm(EXISTENCE_ERROR, args); }
diff --git a/src/exceptions/PermissionException.java b/src/exceptions/PermissionException.java index 03c1c49..d77d565 100644 --- a/src/exceptions/PermissionException.java +++ b/src/exceptions/PermissionException.java
@@ -37,7 +37,7 @@ public Term culprit; /** Holds a string representation of detail message. */ - public String message; + public String msg; /** Constructs a new <code>PermissionException</code> * with the given arguments. */ @@ -50,7 +50,7 @@ operation = _operation; permissionType = _permissionType; culprit = _culprit; - message = _message; + msg = _message; } /** Returns a term representation of this <code>PermissionException</code>: @@ -63,7 +63,7 @@ SymbolTerm.create(operation), SymbolTerm.create(permissionType), culprit, - SymbolTerm.create(message)}; + SymbolTerm.create(msg)}; return new StructureTerm(PERMISSION_ERROR, args); } @@ -72,7 +72,7 @@ public String toString() { String s = "{PERMISSION ERROR: " + goal.toString(); s += " - can not " + operation + " " + permissionType + " " + culprit.toString(); - s += ": " + message; + s += ": " + msg; s += "}"; return s; }
diff --git a/src/exceptions/SyntaxException.java b/src/exceptions/SyntaxException.java index de45349..6edf661 100644 --- a/src/exceptions/SyntaxException.java +++ b/src/exceptions/SyntaxException.java
@@ -29,14 +29,14 @@ public Term culprit; /** Holds a string representation of detail message. */ - public String message; + public String msg; /** Constructs a new <code>SyntaxException</code> * with a valid type, its culprit, and message. */ public SyntaxException(String _type, Term _culprit, String _message) { type = _type; culprit = _culprit; - message = _message; + msg = _message; } /** Constructs a new <code>SyntaxException</code> with the given arguments. */ @@ -45,7 +45,7 @@ this.argNo = _argNo; type = _type; culprit = _culprit; - message = _message; + msg = _message; } /** Returns a term representation of this <code>SyntaxException</code>: @@ -58,7 +58,7 @@ new IntegerTerm(argNo), SymbolTerm.create(type), culprit, - SymbolTerm.create(message) }; + SymbolTerm.create(msg) }; return new StructureTerm(SYNTAX_ERROR, args); }