@@ -62,8 +62,8 @@ public abstract class ParserFactorySupport extends ProcessorSupport implements P
62
62
private PropertyAccessorFactory accessorFactory ;
63
63
private ClassLoader classLoader ;
64
64
65
- private LinkedList <Component > parserStack = new LinkedList <Component >();
66
- private LinkedList <Component > propertyStack = new LinkedList <Component >();
65
+ private LinkedList <Component > parserStack = new LinkedList <>();
66
+ private LinkedList <Component > propertyStack = new LinkedList <>();
67
67
68
68
/**
69
69
* Constructs a new <tt>ParserFactory</tt>.
@@ -76,6 +76,7 @@ public ParserFactorySupport() { }
76
76
* @return the new {@link Stream}
77
77
* @throws BeanIOConfigurationException if the configuration is invalid
78
78
*/
79
+ @ Override
79
80
public Stream createStream (StreamConfig config ) throws BeanIOConfigurationException {
80
81
if (config .getName () == null ) {
81
82
throw new BeanIOConfigurationException ("stream name not configured" );
@@ -232,7 +233,7 @@ protected void updateConstructor(Bean bean) {
232
233
233
234
if (property .getAccessor ().isConstructorArgument ()) {
234
235
if (args == null ) {
235
- args = new ArrayList <Property >();
236
+ args = new ArrayList <>();
236
237
}
237
238
args .add (property );
238
239
}
@@ -245,6 +246,7 @@ protected void updateConstructor(Bean bean) {
245
246
246
247
// sort arguments by constructor index
247
248
Collections .sort (args , new Comparator <Property >() {
249
+ @ Override
248
250
public int compare (Property o1 , Property o2 ) {
249
251
return o1 .getAccessor ().getConstructorArgumentIndex () -
250
252
o2 .getAccessor ().getConstructorArgumentIndex ();
@@ -1527,7 +1529,7 @@ protected Property createProperty(PropertyConfig config) {
1527
1529
if (config .getComponentType () == ComponentConfig .SEGMENT ) {
1528
1530
required = config .getMinOccurs () > 0 && !config .isNillable ();
1529
1531
}
1530
- boolean matchNull = !required && new Integer (0 ).equals (config .getMinOccurs ());
1532
+ boolean matchNull = !required && Integer . valueOf (0 ).equals (config .getMinOccurs ());
1531
1533
1532
1534
CollectionBean collection = new CollectionBean ();
1533
1535
collection .setName (config .getName ());
@@ -1538,7 +1540,7 @@ protected Property createProperty(PropertyConfig config) {
1538
1540
}
1539
1541
else {
1540
1542
boolean required = propertyStack .isEmpty ();
1541
- boolean matchNull = !required && new Integer (0 ).equals (config .getMinOccurs ());
1543
+ boolean matchNull = !required && Integer . valueOf (0 ).equals (config .getMinOccurs ());
1542
1544
1543
1545
Bean bean = new Bean ();
1544
1546
bean .setName (config .getName ());
@@ -1652,6 +1654,7 @@ protected Object parseDefaultValue(Field field, String text) {
1652
1654
* @param typeHandlerFactory the <tt>TypeHandlerFactory</tt> to use to
1653
1655
* create the stream definition
1654
1656
*/
1657
+ @ Override
1655
1658
public void setTypeHandlerFactory (TypeHandlerFactory typeHandlerFactory ) {
1656
1659
this .typeHandlerFactory = typeHandlerFactory ;
1657
1660
}
@@ -1721,6 +1724,7 @@ else if (parserFactoryBean.getInstance() != null) {
1721
1724
* (non-Javadoc)
1722
1725
* @see org.beanio.factory.ParserFactory#setClassLoader(java.lang.ClassLoader)
1723
1726
*/
1727
+ @ Override
1724
1728
public void setClassLoader (ClassLoader classLoader ) {
1725
1729
this .classLoader = classLoader ;
1726
1730
}
0 commit comments