Skip to content

Commit

Permalink
remove redundant casts, inheritdoc
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed Sep 1, 2021
1 parent b0e0203 commit 015d8e2
Show file tree
Hide file tree
Showing 917 changed files with 969 additions and 16,010 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -717,7 +717,7 @@ public void getAllEmployees() {
for (DynamicEntity employee : resultVector) {
xrDynEntityCol.add(employee);
xrDynEntityCol.add(employee.get("address"));
Vector<DynamicEntity> phones = (Vector<DynamicEntity>)employee.get("phones");
Vector<DynamicEntity> phones = employee.get("phones");
phones.size(); // trigger IndirectList
for (DynamicEntity phone : phones) {
xrDynEntityCol.add(phone);
Expand Down Expand Up @@ -745,7 +745,7 @@ public void buildEmployees() {
assertTrue("employee1 __pk incorrent", Integer.valueOf(1).equals(employee1.get("employeeId")));
assertTrue("employee1 first name incorrent", "Mike".equals(employee1.get("firstName")));
assertTrue("employee1 last name incorrent", "Norman".equals(employee1.get("lastName")));
ArrayList<DynamicEntity> phones = (ArrayList<DynamicEntity>)employee1.get("phones"); // phones
ArrayList<DynamicEntity> phones = employee1.get("phones"); // phones
assertTrue("employee1 has wrong number of phones", phones.size() == 2);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -39,9 +39,6 @@ public void setJpqlString(String sqlString) {
this.jpqlString = sqlString;
}

/**
* {@inheritDoc}
*/
@Override
public void initializeCall(XRServiceAdapter xrService, QueryOperation queryOperation,
DatabaseQuery databaseQuery) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -52,9 +52,6 @@ public void setDescriptor(String descriptor) {
this.descriptor = descriptor;
}

/**
* {@inheritDoc}
*/
@Override
public void validate(XRServiceAdapter xrService, QueryOperation queryOperation) {
if (descriptor != null) {
Expand Down Expand Up @@ -90,9 +87,6 @@ public void validate(XRServiceAdapter xrService, QueryOperation queryOperation)
}
}

/**
* {@inheritDoc}
*/
@Override
public void initialize(XRServiceAdapter xrService, QueryOperation queryOperation) {
if (descriptor != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -450,8 +450,8 @@ public Object invoke(XRServiceAdapter xrService, Invocation invocation) {
}
// handle BLOB types
if (value instanceof Blob) {
value = ((XMLConversionManager) xrService.getOXSession().
getDatasourcePlatform().getConversionManager()).
value = xrService.getOXSession().
getDatasourcePlatform().getConversionManager().
convertObject(value, ClassConstants.APBYTE);
}
return AttachmentHelper.buildAttachmentHandler((byte[])value, mimeType);
Expand Down Expand Up @@ -506,7 +506,7 @@ public Object invoke(XRServiceAdapter xrService, Invocation invocation) {
objs[0] = ((ArrayList<?>)value).get(0);
DatabaseRecord dr = new DatabaseRecord();
dr.add(new DatabaseField(ITEMS_STR), objs);
populateTargetObjectFromRecord(desc.getMappings(), (AbstractRecord) dr, targetObject, (AbstractSession)xrService.getORSession());
populateTargetObjectFromRecord(desc.getMappings(), dr, targetObject, (AbstractSession)xrService.getORSession());
}
value = targetObject;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -41,18 +41,12 @@ public void setSqlString(String sqlString) {
this.sqlString = sqlString;
}

/**
* {@inheritDoc}
*/
@Override
public void initialize(XRServiceAdapter xrService, QueryOperation queryOperation) {
super.initialize(xrService, queryOperation);
getDatabaseQuery().setIsUserDefined(true);
}

/**
* {@inheritDoc}
*/
@Override
public void initializeCall(XRServiceAdapter xrService, QueryOperation queryOperation,
DatabaseQuery databaseQuery) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -194,8 +194,8 @@ public void initializeCall(XRServiceAdapter xrService, QueryOperation queryOpera
field.setSqlType(queryOperation.getResult().getJdbcType());
field.setSqlTypeName(getTypeNameForJDBCType(queryOperation.getResult().getJdbcType()));
// replace the original field with the new one
((StoredFunctionCall)spCall).getParameters().remove(0);
((StoredFunctionCall)spCall).getParameters().add(0, field);
spCall.getParameters().remove(0);
spCall.getParameters().add(0, field);
}
// support stored function with out args
for (ProcedureOutputArgument arg : getOutArguments()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -43,17 +43,11 @@
@SuppressWarnings({ "rawtypes", "unchecked" })
public class FeatureResponseBuilderImpl implements FeatureResponseBuilder {

/**
* {@inheritDoc}
*/
@Override
public Object buildReadAllQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object> items, UriInfo uriInfo) {
return items;
}

/**
* {@inheritDoc}
*/
@Override
public Object buildReportQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object[]> results, List<ReportItem> items, UriInfo uriInfo) {
if ((results != null) && (!results.isEmpty())) {
Expand All @@ -64,9 +58,6 @@ public Object buildReportQueryResponse(PersistenceContext context, Map<String, O
}
}

/**
* {@inheritDoc}
*/
@Override
public Object buildAttributeResponse(PersistenceContext context, Map<String, Object> queryParams, String attribute, Object result, UriInfo uriInfo) {
if (result instanceof Collection) {
Expand All @@ -81,9 +72,6 @@ public Object buildAttributeResponse(PersistenceContext context, Map<String, Obj
return result;
}

/**
* {@inheritDoc}
*/
@Override
public Object buildSingleResultQueryResponse(PersistenceContext context, Map<String, Object> queryParams, Object result, List<ReportItem> items, UriInfo uriInfo) {
final SingleResultQueryList response = new SingleResultQueryList();
Expand All @@ -92,9 +80,6 @@ public Object buildSingleResultQueryResponse(PersistenceContext context, Map<Str
return response;
}

/**
* {@inheritDoc}
*/
@Override
public Object buildSingleEntityResponse(PersistenceContext context, Map<String, Object> queryParams, Object result, UriInfo uriInfo) {
return result;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -46,9 +46,6 @@
*/
public class FeatureSetPreV2 implements FeatureSet {

/**
* {@inheritDoc}
*/
@Override
public boolean isSupported(Feature feature) {
switch (feature) {
Expand All @@ -60,9 +57,6 @@ public boolean isSupported(Feature feature) {
}
}

/**
* {@inheritDoc}
*/
@Override
public FeatureResponseBuilder getResponseBuilder(Feature feature) {
switch (feature) {
Expand All @@ -73,9 +67,6 @@ public FeatureResponseBuilder getResponseBuilder(Feature feature) {
}
}

/**
* {@inheritDoc}
*/
@Override
public List<MetadataSource> getMetadataSources() {
final List<MetadataSource> metadataSources = new ArrayList<MetadataSource>();
Expand All @@ -98,17 +89,11 @@ public List<MetadataSource> getMetadataSources() {
return metadataSources;
}

/**
* {@inheritDoc}
*/
@Override
public MetadataSource getDynamicMetadataSource(AbstractSession session, String packageName) {
return new DynamicXMLMetadataSource(session, packageName);
}

/**
* {@inheritDoc}
*/
@Override
public SessionEventListener getSessionEventListener(AbstractSession session) {
return new PreLoginMappingAdapter(session);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -49,9 +49,6 @@
*/
public class FeatureSetV2 implements FeatureSet {

/**
* {@inheritDoc}
*/
@Override
public boolean isSupported(Feature feature) {
switch (feature) {
Expand All @@ -64,9 +61,6 @@ public boolean isSupported(Feature feature) {
}
}

/**
* {@inheritDoc}
*/
@Override
public FeatureResponseBuilder getResponseBuilder(Feature feature) {
switch (feature) {
Expand All @@ -77,9 +71,6 @@ public FeatureResponseBuilder getResponseBuilder(Feature feature) {
}
}

/**
* {@inheritDoc}
*/
@Override
public List<MetadataSource> getMetadataSources() {
final List<MetadataSource> metadataSources = new ArrayList<MetadataSource>();
Expand All @@ -104,17 +95,11 @@ public List<MetadataSource> getMetadataSources() {
return metadataSources;
}

/**
* {@inheritDoc}
*/
@Override
public MetadataSource getDynamicMetadataSource(AbstractSession session, String packageName) {
return new DynamicXmlV2MetadataSource(session, packageName);
}

/**
* {@inheritDoc}
*/
@Override
public SessionEventListener getSessionEventListener(AbstractSession session) {
return new PreLoginMappingAdapterV2();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -53,17 +53,11 @@
@SuppressWarnings({ "unchecked"})
public class SelfLinksResponseBuilder extends FeatureResponseBuilderImpl {

/**
* {@inheritDoc}
*/
@Override
public Object buildReadAllQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object> items, UriInfo uriInfo) {
return collectionResponse(context, items, uriInfo);
}

/**
* {@inheritDoc}
*/
@Override
public Object buildReportQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object[]> results, List<ReportItem> items, UriInfo uriInfo) {
ReportQueryResultCollection response = new ReportQueryResultCollection();
Expand All @@ -78,9 +72,6 @@ public Object buildReportQueryResponse(PersistenceContext context, Map<String, O
return response;
}

/**
* {@inheritDoc}
*/
@Override
public Object buildSingleResultQueryResponse(PersistenceContext context, Map<String, Object> queryParams, Object result, List<ReportItem> items, UriInfo uriInfo) {
final SingleResultQueryResult response = new SingleResultQueryResult();
Expand All @@ -94,9 +85,6 @@ public Object buildSingleResultQueryResponse(PersistenceContext context, Map<Str
return response;
}

/**
* {@inheritDoc}
*/
@Override
public Object buildAttributeResponse(PersistenceContext context, Map<String, Object> queryParams, String attribute, Object item, UriInfo uriInfo) {
if (item instanceof List) {
Expand All @@ -105,9 +93,6 @@ public Object buildAttributeResponse(PersistenceContext context, Map<String, Obj
return item;
}

/**
* {@inheritDoc}
*/
@Override
public Object buildSingleEntityResponse(PersistenceContext context, Map<String, Object> queryParams, Object result, UriInfo uriInfo) {
if (result instanceof PersistenceWeavedRest) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -46,9 +46,6 @@
*/
public class PagingResponseBuilder extends FeatureResponseBuilderImpl {

/**
* {@inheritDoc}
*/
@Override
public Object buildReadAllQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object> items, UriInfo uriInfo) {
ReadAllQueryResultCollection response = new ReadAllQueryResultCollection();
Expand All @@ -59,17 +56,11 @@ public Object buildReadAllQueryResponse(PersistenceContext context, Map<String,
return populatePagedCollectionLinks(queryParams, uriInfo, response);
}

/**
* {@inheritDoc}
*/
@Override
public Object buildReportQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object[]> results, List<ReportItem> items, UriInfo uriInfo) {
return populatePagedReportQueryCollectionLinks(queryParams, results, items, uriInfo);
}

/**
* {@inheritDoc}
*/
@Override
public Object buildAttributeResponse(PersistenceContext context, Map<String, Object> queryParams, String attribute, Object results, UriInfo uriInfo) {
if (results instanceof List) {
Expand Down
Loading

0 comments on commit 015d8e2

Please sign in to comment.