gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lewis John McGibbney (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-536) Avoid calling Class#newInstance
Date Wed, 14 Mar 2018 15:26:00 GMT

    [ https://issues.apache.org/jira/browse/GORA-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398747#comment-16398747
] 

Lewis John McGibbney commented on GORA-536:
-------------------------------------------

Thanks [~yuzhihong@gmail.com], a quick look at the extent of this issue
{code}
lmcgibbn@LMC-056430 /usr/local/gora(GORA-397) $ grep -lr "newInstance" .
./gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
./gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/AvroSerialization/CassandraKey.java
./gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/AvroSerialization/CassandraRecord.java
./gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/ComplexTypes.java
./gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Document.java
./gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/User.java
./gora-cassandra/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
./gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
./gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
./gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
./gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm
./gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java
./gora-core/src/examples/java/org/apache/gora/examples/generated/ImmutableFields.java
./gora-core/src/examples/java/org/apache/gora/examples/generated/Metadata.java
./gora-core/src/examples/java/org/apache/gora/examples/generated/TokenDatum.java
./gora-core/src/examples/java/org/apache/gora/examples/generated/V2.java
./gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java
./gora-core/src/main/java/org/apache/gora/filter/FilterList.java
./gora-core/src/main/java/org/apache/gora/persistency/impl/BeanFactoryImpl.java
./gora-core/src/main/java/org/apache/gora/persistency/Persistent.java
./gora-core/src/main/java/org/apache/gora/persistency/ws/impl/BeanFactoryWSImpl.java
./gora-core/src/main/java/org/apache/gora/query/impl/QueryBase.java
./gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java
./gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
./gora-core/src/main/java/org/apache/gora/util/ReflectionUtils.java
./gora-core/src/test/java/org/apache/gora/mock/persistency/MockPersistent.java
./gora-couchdb/src/main/java/org/apache/gora/couchdb/query/CouchDBResult.java
./gora-couchdb/src/main/java/org/apache/gora/couchdb/store/CouchDBStore.java
./gora-dynamodb/src/examples/java/org/apache/gora/dynamodb/example/generated/Person.java
./gora-dynamodb/src/examples/java/org/apache/gora/dynamodb/example/generated/Webpage.java
./gora-dynamodb/src/main/java/org/apache/gora/dynamodb/compiler/GoraDynamoDBCompiler.java
./gora-dynamodb/src/main/java/org/apache/gora/dynamodb/store/DynamoDBNativeStore.java
./gora-goraci/src/main/java/org/apache/gora/goraci/chef/ChefSoftwareProvisioning.java
./gora-goraci/src/main/java/org/apache/gora/goraci/generated/CINode.java
./gora-goraci/src/main/java/org/apache/gora/goraci/generated/Flushed.java
./gora-goraci/src/main/java/org/apache/gora/goraci/rackspace/RackspaceOrchestration.java
./gora-hbase/src/main/java/org/apache/gora/hbase/query/HBaseResult.java
./gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java
./gora-hbase/src/main/java/org/apache/gora/hbase/util/HBaseFilterUtil.java
./gora-infinispan/src/main/java/org/apache/gora/infinispan/store/InfinispanClient.java
./gora-infinispan/src/main/java/org/apache/gora/infinispan/store/InfinispanStore.java
./gora-mongodb/src/main/java/org/apache/gora/mongodb/filters/MongoFilterUtil.java
./gora-mongodb/src/main/java/org/apache/gora/mongodb/query/MongoDBResult.java
./gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStore.java
./gora-solr/src/main/java/org/apache/gora/solr/query/SolrResult.java
./gora-solr/src/main/java/org/apache/gora/solr/store/SolrStore.java
./gora-solr-5/target/classes/org/apache/gora/solr/query/SolrResult.class
./gora-solr-5/target/classes/org/apache/gora/solr/store/SolrStore.class
./gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/MetricDatum.java
./gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java
{code}

> Avoid calling Class#newInstance
> -------------------------------
>
>                 Key: GORA-536
>                 URL: https://issues.apache.org/jira/browse/GORA-536
>             Project: Apache Gora
>          Issue Type: Task
>            Reporter: Ted Yu
>            Priority: Minor
>             Fix For: 0.9
>
>
> Class::newInstance is deprecated starting in Java 9 - https://bugs.openjdk.java.net/browse/JDK-6850612
- because it may throw undeclared checked exceptions.
> The suggested replacement is {{getDeclaredConstructor().newInstance()}}, which will wrap
the checked exceptions in InvocationException.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message