Revision: 19272
http://sourceforge.net/p/gate/code/19272
Author: markagreenwood
Date: 2016-05-05 08:51:53 +0000 (Thu, 05 May 2016)
Log Message:
-----------
make sure that no matter what weird values people might have entered for a type
in a schema if we can't match it we default to string to avoid random NPEs
popping up all over the shop
Modified Paths:
--------------
gate/trunk/src/main/gate/creole/AnnotationSchema.java
Modified: gate/trunk/src/main/gate/creole/AnnotationSchema.java
===================================================================
--- gate/trunk/src/main/gate/creole/AnnotationSchema.java 2016-05-05
01:22:32 UTC (rev 19271)
+++ gate/trunk/src/main/gate/creole/AnnotationSchema.java 2016-05-05
08:51:53 UTC (rev 19272)
@@ -52,7 +52,7 @@
/** A map between Java types and XSchema */
private static Map<Class<?>, String> java2xSchemaMap;
- /** This sets up two Maps between XSchema types and their coresponding
+ /** This sets up two Maps between XSchema types and their corresponding
* Java types + a DOM xml parser
*/
private static void setUpStaticData()
@@ -290,7 +290,7 @@
if (featureTypeName != null)
// Set it to the corresponding Java type
featureType = xSchema2JavaMap.get(featureTypeName);
-
+
// Get the value of use attribute
featureUse = anAttributeElement.getAttributeValue("use");
if (featureUse == null)
@@ -348,7 +348,8 @@
// Create an add a featureSchema object
FeatureSchema featureSchema = new FeatureSchema(
featureName,
- featureType,
+ //if for some reason we've
ended up with a null type default to String
+ featureType != null ?
featureType : String.class,
featureValue,
featureUse,
featurePermittedValuesSet);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs