Comments (6)
PR submitted
from airtable.java.
Can you tell me how you solved this issue?
from airtable.java.
Hi, I don't think I did. :-)
However you could modify the Table.java class to use reflection to check for the SerializedName annotation as I indicate above. Maybe someone at sybit will make a patch to fix the issue.
from airtable.java.
Probably you could provide a PR, @fstuff ?
from airtable.java.
@stritti , having considered the code in question for a time, I think it should just be removed.
The function has to do with mapping Airtable column names to Java class fields. The Sybit Airtable.java library uses reflection to map airtable column names to java fields of the Table class with identical names as the column. I have determined that the warning exists because the Airtable API supports column names with virtually no limitations, while java field names are limited to what are called "java digits" and "java letters". For example, airtable column names can have whitespace and special characters such as $%^ but java field names cannot contain whitespace or most special characters. Additionally there are many java keywords that are reserved and cannot be used as the names of fields.
The Sybit Airtable.java library provides a solution where an airtable column name contains illegal characters--you can use the @@SerializedName annotation to associate a java field with an airtable column name that has illegal characters.
The warning that is the subject of my original post seems to be a half-hearted attempt to provide a warning where the supplied airtable column name contains characters that are illegal in java field names. But it only checks for whitespace (' ') and hyphen ('-'). It does not check for any of the other restrictions on java field names, nor does it check to see if the supplied key is a reserved java keyword. Therefore the way the function is written it will fail to catch many situations where a specified airtable column name contains characters that are illegal in java field names. Additionally, as indicated in my original post the code currently does not even check to see whether the SerializedName annotation is being used or not. Where the annotation is being used, there is no problem and therefore should be no warning.
In order to give proper coverage and generate a warning 100% of the time that we have an airtable column name that contains illegal characters for java fields, the check would have to be rewritten to check for all invalid characters and keywords. I am not sure that the overhead of doing so is worth it.
In consideration of this, I think it would be better to simply remove the warning and document the limitations mentioned above as part of the Table class documentation.
If you are agreeable to this I can of course submit a PR, but it would simply consist of deleting the few lines of code that log the warning.
from airtable.java.
Thank you very much for your improvement of the library.
from airtable.java.
Related Issues (20)
- Proxy: support of user/password
- Create new Data in Airtable Lookup,Linked Feilds? HOT 4
- More than 100 records in resultest HOT 2
- Add Integration Tests to build job
- I have problems creating an Airtable Object HOT 1
- Spurious "Invalid cookie header" warnings HOT 7
- need video
- Unexpected NOT FOUND error when select()ing a table with a accented name HOT 1
- Android HTTP AllowAllHostnameVerifier Error HOT 1
- Release in Maven HOT 3
- Support for abstract class inheritance
- Examples
- Getting record id from table HOT 1
- Error when trying to update HOT 1
- JCenter Shutdown HOT 1
- Migrate from Travis to Github Actions
- [Doc] add vitepress GitHub-Page for documentation
- Support new auth requirements HOT 1
- Deprecated Api keys? HOT 4
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 airtable.java.