[Arakhnę-Dev] [186] * Add catching statements for assertion failures to ensure that failed assertions are forwarded and never skipped . |
[ Thread Index |
Date Index
| More arakhne.org/dev Archives
]
- To: dev@xxxxxxxxxxx
- Subject: [Arakhnę-Dev] [186] * Add catching statements for assertion failures to ensure that failed assertions are forwarded and never skipped .
- From: subversion@xxxxxxxxxxxxx
- Date: Tue, 21 Sep 2010 17:53:06 +0200
Revision: 186
Author: galland
Date: 2010-09-21 17:53:05 +0200 (Tue, 21 Sep 2010)
Log Message:
-----------
* Add catching statements for assertion failures to ensure that failed assertions are forwarded and never skipped.
Modified Paths:
--------------
trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractWeakSoftValueMap.java
trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/ComparableSoftReference.java
trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/ComparableWeakReference.java
trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/Caller.java
trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/FileSystem.java
trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/LibraryLoader.java
trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/ReflectionUtil.java
Modified: trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractWeakSoftValueMap.java
===================================================================
--- trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractWeakSoftValueMap.java 2010-09-19 20:31:34 UTC (rev 185)
+++ trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractWeakSoftValueMap.java 2010-09-21 15:53:05 UTC (rev 186)
@@ -342,6 +342,9 @@
expurgeNow();
return AbstractWeakSoftValueMap.this.map.containsKey(((Entry<?,?>)o).getKey());
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -359,6 +362,9 @@
try {
ok = AbstractWeakSoftValueMap.this.map.containsKey(((Entry<?,?>)o).getKey());
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -385,6 +391,9 @@
try {
return AbstractWeakSoftValueMap.this.map.remove(((Entry<?,?>)o).getKey())!=null;
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
Modified: trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/ComparableSoftReference.java
===================================================================
--- trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/ComparableSoftReference.java 2010-09-19 20:31:34 UTC (rev 185)
+++ trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/ComparableSoftReference.java 2010-09-21 15:53:05 UTC (rev 186)
@@ -87,6 +87,9 @@
try {
return ((Comparable<Object>)cur).compareTo(oth);
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -96,6 +99,9 @@
try {
return -((Comparable<Object>)oth).compareTo(cur);
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
Modified: trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/ComparableWeakReference.java
===================================================================
--- trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/ComparableWeakReference.java 2010-09-19 20:31:34 UTC (rev 185)
+++ trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/ComparableWeakReference.java 2010-09-21 15:53:05 UTC (rev 186)
@@ -87,6 +87,9 @@
try {
return ((Comparable<Object>)cur).compareTo(oth);
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -96,6 +99,9 @@
try {
return -((Comparable<Object>)oth).compareTo(cur);
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
Modified: trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/Caller.java
===================================================================
--- trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/Caller.java 2010-09-19 20:31:34 UTC (rev 185)
+++ trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/Caller.java 2010-09-21 15:53:05 UTC (rev 186)
@@ -188,6 +188,9 @@
assert(clazz.getName().equals(element.getClassName()));
return element.getMethodName();
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
throw new IllegalArgumentException();
}
Modified: trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/FileSystem.java
===================================================================
--- trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/FileSystem.java 2010-09-19 20:31:34 UTC (rev 185)
+++ trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/FileSystem.java 2010-09-21 15:53:05 UTC (rev 186)
@@ -857,6 +857,9 @@
filename.getRef());
return uri.toURL();
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -866,6 +869,9 @@
filename.getHost(),
buf.toString());
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
return null;
}
@@ -931,6 +937,9 @@
filename.getRef());
return uri.toURL();
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -940,6 +949,9 @@
filename.getHost(),
buf.toString());
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
return null;
}
Modified: trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/LibraryLoader.java
===================================================================
--- trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/LibraryLoader.java 2010-09-19 20:31:34 UTC (rev 185)
+++ trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/LibraryLoader.java 2010-09-21 15:53:05 UTC (rev 186)
@@ -302,6 +302,9 @@
try {
return Integer.parseInt(arch);
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -389,6 +392,9 @@
// library loaded
return;
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable e) {
System.err.println("could not load "+url); //$NON-NLS-1$
e.printStackTrace();
@@ -403,6 +409,9 @@
// library loaded
return;
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable e) {
System.err.println("could not load "+url); //$NON-NLS-1$
e.printStackTrace();
Modified: trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/ReflectionUtil.java
===================================================================
--- trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/ReflectionUtil.java 2010-09-19 20:31:34 UTC (rev 185)
+++ trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/ReflectionUtil.java 2010-09-21 15:53:05 UTC (rev 186)
@@ -333,6 +333,9 @@
try {
classes.add(Class.forName(entryClassname));
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -409,6 +412,9 @@
&&(allowEnum || !clazz.isEnum()))
classes.add((Class<? extends T>)clazz);
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}
@@ -462,6 +468,9 @@
&&(allowEnum || !clazz.isEnum()))
classes.add((Class<? extends T>)clazz);
}
+ catch(AssertionError e) {
+ throw e;
+ }
catch(Throwable _) {
//
}