This is an automated email from the ASF dual-hosted git repository.
ehsavoie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new ab7f385 [NETBEANS-2975]: Schema2Beans shouldn't return 'null' for
primitive types.
new 7337d1e Merge pull request #1420 from ehsavoie/NETBEANS-2975
ab7f385 is described below
commit ab7f3852b711a9010f4fc91c2506590dc334f54d
Author: Emmanuel Hugonnet <[email protected]>
AuthorDate: Mon Aug 12 12:08:21 2019 +0200
[NETBEANS-2975]: Schema2Beans shouldn't return 'null' for primitive types.
* Fixing the returned value.
Jira: https://issues.apache.org/jira/browse/NETBEANS-2975
---
.../src/org/netbeans/modules/schema2beansdev/BeanClass.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/BeanClass.java
b/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/BeanClass.java
index 0bc2e01..358e0ed 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/BeanClass.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/BeanClass.java
@@ -859,7 +859,7 @@ public class BeanClass extends AbstractCodeGeneratorClass
implements CodeGenerat
AttrProp attrProp = a.getAttrProp();
jw.comment("If our element does not exist, then the attribute
does not exist.");
jw.beginIf("size("+attributeOwner.constName+") == 0");
- jw.writeEol("return null");
+ jw.writeEol("return " +
JavaUtil.nullValueForType(a.getType()));
jw.endElseBegin();
jw.write("return ");
jw.writeEol(JavaUtil.genParseText(a.getType(),
"getAttributeValue("+attributeOwner.constName+ ((attributeOwner.isIndexed()) ?
", index" : "") +", \""+attrProp.getName()+"\")", config.isForME()));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists