Skip to content

Commit

Permalink
Ensure fileName is never null. See #4255
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Nov 8, 2016
1 parent c7e1459 commit 48cc9ba
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -13,7 +13,7 @@ public class RubyStackTraceElement implements java.io.Serializable {
public RubyStackTraceElement(StackTraceElement element) {
this.className = element.getClassName();
this.methodName = element.getMethodName();
this.fileName = element.getFileName();
this.fileName = (element.getFileName() == null) ? "unknown" : element.getFileName();
this.lineNumber = element.getLineNumber();
this.binding = false;
this.frameType = FrameType.METHOD;
Expand All @@ -28,7 +28,7 @@ public RubyStackTraceElement(String klass, String method, String file, int line,
public RubyStackTraceElement(String klass, String method, String file, int line, boolean binding, FrameType frameType) {
this.className = klass;
this.methodName = method;
this.fileName = file;
this.fileName = (file == null) ? "unknown" : file;
this.lineNumber = line;
this.binding = binding;
this.frameType = frameType;
Expand Down

0 comments on commit 48cc9ba

Please sign in to comment.