Skip to content

Commit b01ed8d

Browse files
committed
org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceEntry.toReference(ReferenceStrength,
T, int) now throws IllegalArgumentException instead of Error
1 parent 759efd9 commit b01ed8d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<body>
2525
<release version="4.5.1" date="YYYY-MM-DD" description="This is a feature and maintenance release. Java 8 or later is required.">
2626
<!-- FIX -->
27+
<action type="fix" dev="ggregory" due-to="Gary Gregory">org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceEntry.toReference(ReferenceStrength, T, int) now throws IllegalArgumentException instead of Error</action>
2728
<!-- ADD -->
2829
<!-- UPDATE -->
2930
</release>

src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ protected <T> Object toReference(final ReferenceStrength type, final T referent,
368368
default:
369369
break;
370370
}
371-
throw new Error();
371+
throw new IllegalArgumentException(type.toString());
372372
}
373373
}
374374

0 commit comments

Comments
 (0)