You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/10/06 23:37:45 UTC

[GitHub] [maven-surefire] domdomegg commented on a change in pull request #320: [SUREFIRE-1851] Prevent NPE in SmartStackTraceParser

domdomegg commented on a change in pull request #320:
URL: https://github.com/apache/maven-surefire/pull/320#discussion_r500654392



##########
File path: surefire-providers/common-java5/src/test/java/org/apache/maven/surefire/report/SomeMockedException.java
##########
@@ -0,0 +1,58 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @author Adam Jones
+ */
+public class SomeMockedException extends RuntimeException
+{
+    public SomeMockedException() {}
+
+    @Override
+    public String getMessage()
+    {
+        return null;
+    }
+
+    @Override
+    public String getLocalizedMessage()
+    {
+        return null;
+    }
+
+    @Override
+    public synchronized Throwable getCause()

Review comment:
       There is no need for it to be synchronized, good catch. I will remove this.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org