|
From: <de...@us...> - 2014-11-16 22:05:26
|
Revision: 8933
http://sourceforge.net/p/fudaa/svn/8933
Author: deniger
Date: 2014-11-16 22:05:21 +0000 (Sun, 16 Nov 2014)
Log Message:
-----------
maj versions finales
Modified Paths:
--------------
trunk/soft/fudaa-mascaret/server/src/test/java/org/fudaa/dodico/mascaret/CompleteStructureTest.java
Modified: trunk/soft/fudaa-mascaret/server/src/test/java/org/fudaa/dodico/mascaret/CompleteStructureTest.java
===================================================================
--- trunk/soft/fudaa-mascaret/server/src/test/java/org/fudaa/dodico/mascaret/CompleteStructureTest.java 2014-11-16 21:55:32 UTC (rev 8932)
+++ trunk/soft/fudaa-mascaret/server/src/test/java/org/fudaa/dodico/mascaret/CompleteStructureTest.java 2014-11-16 22:05:21 UTC (rev 8933)
@@ -6,6 +6,7 @@
import java.io.File;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
import org.fudaa.ctulu.CtuluLog;
import org.fudaa.dodico.corba.mascaret.SParametresCAS;
@@ -33,9 +34,11 @@
Object newInstance = in.newInstance();
Field[] declaredFields = in.getDeclaredFields();
for (Field field : declaredFields) {
- Class<?> declaringClass = field.getType();
- Object value = doInstanciation(declaringClass);
- field.set(newInstance, value);
+ if (!Modifier.isFinal(field.getModifiers())) {
+ Class<?> declaringClass = field.getType();
+ Object value = doInstanciation(declaringClass);
+ field.set(newInstance, value);
+ }
}
return newInstance;
}
@@ -114,15 +117,15 @@
}
/**
- * Just to check the content of the file.
- * //WARN the absolute path must be change.
+ * Just to check the content of the file. //WARN the absolute path must be change.
+ *
* @param args
- * @throws Exception
+ * @throws Exception
*/
public static void main(String[] args) throws Exception {
//to be modified: create a xml file in a hardcoded file.
SParametresCAS res = (SParametresCAS) instanciate(SParametresCAS.class);
-
+
createFile(res, new File("C:\\data\\tmp\\masc.xml"));
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|