Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
excludes="${excludes},**/bak/**"
source="${ant.build.javac.source}"
target="${ant.build.javac.target}"
includeantruntime="false"
>
<classpath>
<fileset refid="lib-fileset"/>
Expand Down Expand Up @@ -193,6 +194,7 @@
excludes="${excludes},**/bak/**"
source="${ant.build.javac.source}"
target="${ant.build.javac.target}"
includeantruntime="false"
>
<classpath>
<fileset refid="lib-fileset"/>
Expand Down
Binary file removed dist/bsh-2.1.9.jar
Binary file not shown.
1 change: 0 additions & 1 deletion dist/bsh-2.1.9.jar.sha512sum

This file was deleted.

2 changes: 1 addition & 1 deletion src/bsh/BSHLiteral.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void charSetup(String str)
ch = getEscapeChar(ch);
}

value = new Primitive(new Character(ch).charValue());
value = new Primitive(Character.valueOf(ch).charValue());
}

void stringSetup(String str)
Expand Down
16 changes: 8 additions & 8 deletions src/bsh/BSHUnaryExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private Object primitiveWrapperUnaryOperation(Object val, int kind)
Object operand = Primitive.promoteToInteger(val);

if ( operand instanceof Boolean )
return new Boolean(
return Boolean.valueOf(
Primitive.booleanUnaryOperation((Boolean)operand, kind));
else
if ( operand instanceof Integer )
Expand All @@ -112,21 +112,21 @@ private Object primitiveWrapperUnaryOperation(Object val, int kind)
if(kind == INCR || kind == DECR)
{
if(operandType == Byte.TYPE)
return new Byte((byte)result);
return Byte.valueOf((byte)result);
if(operandType == Short.TYPE)
return new Short((short)result);
return Short.valueOf((short)result);
if(operandType == Character.TYPE)
return new Character((char)result);
return Character.valueOf((char)result);
}

return new Integer(result);
return Integer.valueOf(result);
}
else if(operand instanceof Long)
return new Long(Primitive.longUnaryOperation((Long)operand, kind));
return Long.valueOf(Primitive.longUnaryOperation((Long)operand, kind));
else if(operand instanceof Float)
return new Float(Primitive.floatUnaryOperation((Float)operand, kind));
return Float.valueOf(Primitive.floatUnaryOperation((Float)operand, kind));
else if(operand instanceof Double)
return new Double(Primitive.doubleUnaryOperation((Double)operand, kind));
return Double.valueOf(Primitive.doubleUnaryOperation((Double)operand, kind));
else
throw new InterpreterError("An error occurred. Please call technical support.");
}
Expand Down
2 changes: 1 addition & 1 deletion src/bsh/BshClassManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static BshClassManager createClassManager( Interpreter interpreter )
// Try to load the module
// don't refer to it directly here or we're dependent upon it
Class clazz = Class.forName( "bsh.classpath.ClassManagerImpl" );
manager = (BshClassManager) clazz.newInstance();
manager = (BshClassManager) clazz.getDeclaredConstructor().newInstance();
} catch ( Exception e ) {
throw new InterpreterError("Error loading classmanager", e);
}
Expand Down
3 changes: 2 additions & 1 deletion src/bsh/NameSpace.java
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ protected Object unwrapVariable( Variable var )
/**
@deprecated See #setTypedVariable( String, Class, Object, Modifiers )
*/
@Deprecated
public void setTypedVariable(
String name, Class type, Object value, boolean isFinal )
throws UtilEvalError
Expand Down Expand Up @@ -1526,4 +1527,4 @@ private <T> List<T> clone(final List<T> list) {
return new ArrayList<T>(list);
}

}
}
Loading