Comments (9)
I agree on the take around adding a converter abstraction. I'd think that the spec would keep it very bare bones with implementations being allowed to provide more as they see fit. I do think that the list as provided is probably too broad (Logger?).
from batch.
We should probably break this apart and use this current issue for a relative few types. If we wanted to add a converter abstraction that could be done later/separately (or just left to impls).
What about starting from the list of JSF converters: https://docs.oracle.com/javaee/7/tutorial/jsf-page-core001.htm
BigDecimalConverter | javax.faces.BigDecimal
BigIntegerConverter | javax.faces.BigInteger
BooleanConverter | javax.faces.Boolean
ByteConverter | javax.faces.Byte
CharacterConverter | javax.faces.Character
DateTimeConverter | javax.faces.DateTime
DoubleConverter | javax.faces.Double
EnumConverter | javax.faces.Enum
FloatConverter | javax.faces.Float
IntegerConverter | javax.faces.Integer
LongConverter | javax.faces.Long
NumberConverter | javax.faces.Number
ShortConverter | javax.faces.Short
The JSF package would not be visible in the batch API in any way... it's just a useful set of primitive/almost-primitive types.
from batch.
Reading the comments we have had, the majority opinion seems to err on the side of specifying less rather than more (and leaving it up to the implementation).
So I'll propose we specify support for the java.lang types: (Boolean, Byte, Character, Double, Float, Integer, Long, Short) and the corresponding primitives, using the constructors w/ String parms.
I'm also going to raise the issue in the Config spec going forward.
from batch.
For reference, noting JBeret's function implemented here: https://github.com/jberet/jsr352/blob/master/jberet-core/src/main/java/org/jberet/creation/ValueConverter.java
from batch.
using the constructors w/ String parms
Why not parseXXX
as preferred since several versions?
otherwise +1
from batch.
Why not parseXXX as preferred since several versions?
I was looking at the Java 8 doc and didn't realize that so agree, when these are deprecated in newer versions we should use better ones like valueOf, parseXXX, etc.
from batch.
I removed Byte and Character since I didn't want to have to think about conversion to/from String.
from batch.
Hmm, Byte has valueOf no? And Character is mainly string.charAt(0) or fail. No need of the to conversion which is a toString btw ;).
But agree it is not a big deal to not handle it.
from batch.
Though it'd be trivial to come up with a sensible scheme... to take the time to research whatever precedent there is around these tiny details is just not worth it given that you can easily use another type.
from batch.
Related Issues (20)
- Define job registration mechanism with Java-defined job (e.g. at app startup?) HOT 3
- Batch TCK separation and integration with Platform TCK HOT 1
- Add module-info.java HOT 2
- Clarify precedence between runtime-provided JobOperator Bean vs. other (app)-provided HOT 1
- Provide well-defined behavior / ordering / etc. in case where ServiceLoader finds >1 JobOperator impl. HOT 4
- Final update for Batch 2.1 spec document
- Certification Request for jbatch v2.1.0-M2 + jakarta batch api v2.1.0 HOT 2
- Loading a batch artifact as a CDI Bean by bean name via @Producer in some other bean class HOT 1
- Finalize Jakarta Batch 2.1 Release HOT 1
- Batch 2.1.0 API JAR OSGi bundle headers are wrongly using 2.0 version values HOT 1
- Version 2.1.1 "specification" artifact released with "2.2" as the spec version in filename, spec header
- Use 'jakartaee' namespace prefix in job.xsd and batch.xsd (the convention used by other Jakarta specs). HOT 2
- Certification Request for JBeret 2.1.0.Final + jakarta batch api 2.1.0 HOT 1
- Consider a beforeSplitFlow/afterSplitFlow listener to give app control on the split-flow thread
- Move this repo to https://github.com/jakartaee HOT 5
- _ characters in some enum values in spec document HOT 1
- Jakarta Batch CDI integration language over-specifies behavior and wrongly describes implementation(Weld)-specific behavior HOT 1
- Question about the plan to support Jakarta EE Platform 11 HOT 2
- Can the `cdi-api` version be updated? HOT 5
- ClassifierCompositeItemWriter use contravariance for items classification, why? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from batch.