There's 163 warnings when open the Java Client in Eclipse IDE. Most of them is about Java generic problem. Here're the list of example warnings shown:
- NuxeoEntity is a raw type. References to generic type NuxeoEntity<T> should be parameterized
Operation.java
public class Operation extends NuxeoEntity { ^
- List is a raw type. References to generic type List<E> should be parameterized
TestRepository.java
List list = (List) document.getProperties().get("ds:fields"); ^ ^
- Type safety: The method execute(Callback, Object...) belongs to the raw type NuxeoEntity. References to generic type NuxeoEntity<T> should be parameterized
Repository.java
public void fetchDocumentRoot(Callback<Document> callback) { execute(callback); ^ }
- The type parameter T is hiding the type T
NuxeoResponseConverterFactory.java
public <T> T readJSON(Reader reader, Class javaType) { ^ try { return (T) objectMapper.readValue(reader, javaType); } catch (IOException reason) { throw new NuxeoClientException("...", reason); } }
Even though these issues does not have direct impact on Nuxeo users, but the code should be refactored to ensure the good understanding of Java generic in general.
- is related to
-
JAVACLIENT-128 Refactor the client
- Resolved