-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlang_41.diff
24 lines (24 loc) · 1.45 KB
/
lang_41.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/src/java/org/apache/commons/lang/ClassUtils.java b/src/java/org/apache/commons/lang/ClassUtils.java
index d5de42b2..6d67c5d7 100644
--- a/src/java/org/apache/commons/lang/ClassUtils.java
+++ b/src/java/org/apache/commons/lang/ClassUtils.java
@@ -153,6 +153,19 @@ public class ClassUtils {
* @return the class name of the object without the package name, or the null value
*/
public static String getShortClassName(Object object, String valueIfNull) {
+ if (Boolean.parseBoolean(System.getProperty("defects4j.instrumentation.enabled")) // defects4j.instrumentation
+ && (object != null) && object.getClass().isArray()) { // defects4j.instrumentation
+ String result = getShortClassName_orig(object, valueIfNull); // defects4j.instrumentation
+ if (result.endsWith(";")) { // defects4j.instrumentation
+ throw new RuntimeException("[Defects4J_BugReport_Violation]"); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ return result; // defects4j.instrumentation
+ } else { // defects4j.instrumentation
+ return getShortClassName_orig(object, valueIfNull); // defects4j.instrumentation
+ } // defects4j.instrumentation
+ } // defects4j.instrumentation
+
+ public static String getShortClassName_orig(Object object, String valueIfNull) { // defects4j.instrumentation
if (object == null) {
return valueIfNull;
}