You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2019/12/17 20:54:18 UTC

[royale-compiler] branch develop updated (caa0dfd -> 1c9d160)

This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.


    from caa0dfd  JSWriter: fixed issue where source map creation failed with null exception if relative path reached root drive path on Windows
     new 0389e0f  UnexpectedExceptionProblem: reports the location of the exception in the compiler to make bug fixing easier
     new 1c9d160  InterfaceDefinition: fixed null reference exception in isInstanceOf()

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/royale/compiler/problems/UnexpectedExceptionProblem.java  | 5 ++++-
 .../royale/compiler/internal/definitions/InterfaceDefinition.java    | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)


[royale-compiler] 02/02: InterfaceDefinition: fixed null reference exception in isInstanceOf()

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 1c9d160bf487e7abde4e936b4e5cb2c40075ec1e
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Dec 17 11:46:04 2019 -0800

    InterfaceDefinition: fixed null reference exception in isInstanceOf()
---
 .../royale/compiler/internal/definitions/InterfaceDefinition.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/InterfaceDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/InterfaceDefinition.java
index 3dd6e87..2886795 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/InterfaceDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/InterfaceDefinition.java
@@ -179,7 +179,7 @@ public class InterfaceDefinition extends TypeDefinitionBase implements IInterfac
             return true;
 
         //  An interface is an instance of Object by definition.
-        if (type.equals(project.getBuiltinType(BuiltinType.OBJECT)))
+        if (project.getBuiltinType(BuiltinType.OBJECT).equals(type))
             return true;
 
         // Since 'this' is an interface, 'type' must also be an interface.


[royale-compiler] 01/02: UnexpectedExceptionProblem: reports the location of the exception in the compiler to make bug fixing easier

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 0389e0f1b47ed06cd295f32c8e9c0c6046677652
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Dec 17 11:35:15 2019 -0800

    UnexpectedExceptionProblem: reports the location of the exception in the compiler to make bug fixing easier
---
 .../apache/royale/compiler/problems/UnexpectedExceptionProblem.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler-common/src/main/java/org/apache/royale/compiler/problems/UnexpectedExceptionProblem.java b/compiler-common/src/main/java/org/apache/royale/compiler/problems/UnexpectedExceptionProblem.java
index 6b9397b..74a7c14 100644
--- a/compiler-common/src/main/java/org/apache/royale/compiler/problems/UnexpectedExceptionProblem.java
+++ b/compiler-common/src/main/java/org/apache/royale/compiler/problems/UnexpectedExceptionProblem.java
@@ -25,7 +25,7 @@ package org.apache.royale.compiler.problems;
 public final class UnexpectedExceptionProblem extends CompilerProblem
 {
     public static final String DESCRIPTION =
-        "Unexpected exception '${exceptionName}'.";
+        "Unexpected exception '${exceptionName}' at ${exceptionLocation}";
 
     public static final int errorCode = 1530;
     
@@ -33,7 +33,10 @@ public final class UnexpectedExceptionProblem extends CompilerProblem
     {
         super();
         this.exceptionName = throwable.getClass().getName();
+        StackTraceElement element = throwable.getStackTrace()[0];
+        this.exceptionLocation = element.getClassName() + "." + element.getMethodName() + ":" + element.getLineNumber();
     }
 
     public final String exceptionName;
+    public final String exceptionLocation;
 }