Skip to content

Commit

Permalink
more sonar identified stuff cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Jun 20, 2013
1 parent a6f00a4 commit 5179164
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 46 deletions.
11 changes: 6 additions & 5 deletions src/main/java/net/sf/jsqlparser/expression/DoubleValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ public class DoubleValue implements Expression {
private double value;
private String stringValue;

public DoubleValue(String value) {
if (value.charAt(0) == '+') {
value = value.substring(1);
public DoubleValue(final String value) {
String val = value;
if (val.charAt(0) == '+') {
val = val.substring(1);
}
this.value = Double.parseDouble(value);
this.stringValue = value;
this.value = Double.parseDouble(val);
this.stringValue = val;
}

@Override
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/net/sf/jsqlparser/expression/LongValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ public class LongValue implements Expression {
private long value;
private String stringValue;

public LongValue(String value) {
if (value.charAt(0) == '+') {
value = value.substring(1);
public LongValue(final String value) {
String val = value;
if (val.charAt(0) == '+') {
val = val.substring(1);
}
this.value = Long.parseLong(value);
this.stringValue = value;
this.value = Long.parseLong(val);
this.stringValue = val;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,6 @@
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
/*
* Copyright (C) 2013 toben.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package net.sf.jsqlparser.expression.operators.relational;

import java.util.ArrayList;
Expand Down
18 changes: 0 additions & 18 deletions src/main/java/net/sf/jsqlparser/statement/select/ValuesList.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,6 @@
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
/*
* Copyright (C) 2013 toben.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package net.sf.jsqlparser.statement.select;

import java.util.Iterator;
Expand Down

0 comments on commit 5179164

Please sign in to comment.