Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vollt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sonia Zorba
vollt
Commits
38d5bac3
Commit
38d5bac3
authored
11 years ago
by
gmantele
Browse files
Options
Downloads
Patches
Plain Diff
ADQL: Fix stupid error in the setReplace(...) function (error detected by Marc W. and findbugs)
parent
134327dc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/adql/query/operand/function/geometry/RegionFunction.java
+9
-5
9 additions, 5 deletions
src/adql/query/operand/function/geometry/RegionFunction.java
with
9 additions
and
5 deletions
src/adql/query/operand/function/geometry/RegionFunction.java
+
9
−
5
View file @
38d5bac3
...
...
@@ -16,11 +16,11 @@ package adql.query.operand.function.geometry;
* You should have received a copy of the GNU Lesser General Public License
* along with ADQLLibrary. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2012 - UDS/Centre de Données astronomiques de Strasbourg (CDS)
* Copyright 2012,2014 - UDS/Centre de Données astronomiques de Strasbourg (CDS),
* Astronomisches Rechen Institute (ARI)
*/
import
adql.query.ADQLObject
;
import
adql.query.operand.ADQLOperand
;
/**
...
...
@@ -37,8 +37,8 @@ import adql.query.operand.ADQLOperand;
* <p><b><u>Warning:</u><br />
* Inappropriate geometries for this construct SHOULD throw an error message, to be defined by the service making use of ADQL.</b></p>
*
* @author Grégory Mantelet (CDS)
* @version
06
/201
1
* @author Grégory Mantelet (CDS
;ARI
)
* @version
1.2 (02
/201
4)
*/
public
class
RegionFunction
extends
GeometryFunction
{
...
...
@@ -71,18 +71,22 @@ public class RegionFunction extends GeometryFunction {
parameter
=
(
ADQLOperand
)(
toCopy
.
parameter
.
getCopy
());
}
@Override
public
ADQLObject
getCopy
()
throws
Exception
{
return
new
RegionFunction
(
this
);
}
@Override
public
String
getName
(){
return
"REGION"
;
}
@Override
public
boolean
isNumeric
(){
return
false
;
}
@Override
public
boolean
isString
(){
return
true
;
}
...
...
@@ -112,7 +116,7 @@ public class RegionFunction extends GeometryFunction {
throw
new
NullPointerException
(
"Impossible to remove the only required parameter of a "
+
getName
()
+
" function !"
);
else
if
(
replacer
instanceof
ADQLOperand
){
ADQLOperand
replaced
=
parameter
;
parameter
=
replace
d
;
parameter
=
replace
r
;
return
replaced
;
}
else
throw
new
Exception
(
"Impossible to replace an ADQLOperand by a "
+
replacer
.
getClass
().
getName
()
+
" ("
+
replacer
.
toADQL
()
+
") !"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment