Skip to content

Commit

Permalink
Bump commons-beanutils from 1.7.0 to 1.9.4 (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Du <[email protected]>
  • Loading branch information
BobDu committed Apr 13, 2024
1 parent 9f2e33c commit b132b1c
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.0</version>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void testFromObject_excludes_ignoreDefaults() {
jsonConfig.setIgnoreDefaultExcludes( true );
JSONObject json = JSONObject.fromObject( getSource(), jsonConfig );
assertJSONObject( json, getProperties() );
assertTrue( json.has( "class" ) );
assertTrue( !json.has( "class" ) );
assertTrue( !json.has( "pexcluded" ) );
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/net/sf/json/TestJSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public void testElement_Bean_exclusions_ignoreDefault() {
jsonConfig.setIgnoreDefaultExcludes( true );
jsonObject.element( "bean", new ObjectBean(), jsonConfig );
JSONObject actual = jsonObject.getJSONObject( "bean" );
Assertions.assertTrue( actual.has( "class" ) );
Assertions.assertTrue( !actual.has( "class" ) );
Assertions.assertTrue( !actual.has( "pexcluded" ) );
}

Expand Down Expand Up @@ -259,7 +259,7 @@ public void testElement_Collection2_exclusions_ignoreDefault() {
jsonObject.element( "list", list, jsonConfig );
JSONObject actual = jsonObject.getJSONArray( "list" )
.getJSONObject( 0 );
Assertions.assertTrue( actual.has( "class" ) );
Assertions.assertTrue( !actual.has( "class" ) );
Assertions.assertTrue( !actual.has( "pexcluded" ) );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ protected Object getSource() {
for( int i = 0; i < props.length; i++ ){
map.put( props[i], PropertyConstants.getPropertyClass( props[i] ) );
}
map.put( "class", Class.class );
map.put( "pexcluded", String.class );
MorphDynaClass dynaClass = new MorphDynaClass( map );
MorphDynaBean dynaBean = null;
Expand All @@ -49,7 +48,6 @@ protected Object getSource() {
for( int i = 0; i < props.length; i++ ){
dynaBean.set( props[i], PropertyConstants.getPropertyValue( props[i] ) );
}
dynaBean.set( "class", Object.class );
dynaBean.set( "pexcluded", "" );
}catch( Exception e ){
throw new RuntimeException( e );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ protected Object getSource() {
for( int i = 0; i < props.length; i++ ){
jsonObject.element( props[i], PropertyConstants.getPropertyValue( props[i] ) );
}
jsonObject.element( "class", Object.class );
jsonObject.element( "pexcluded", "" );
}catch( Exception e ){
throw new RuntimeException( e );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected Object getSource() {
public static class JsonBean implements JSONString {

public String toJSONString() {
return "{\"parray\":[1,2],\"plong\":9223372036854775807,\"pchar\":\"J\",\"pboolean\":true,\"pfloat\":3.4028234663852886E38,\"pbean\":{\"parray\":null,\"plong\":null,\"pchar\":null,\"pboolean\":null,\"pfloat\":null,\"pbean\":null,\"pshort\":null,\"pdouble\":null,\"pclass\":null,\"pstring\":null,\"pint\":null,\"plist\":null,\"pfunction\":null,\"pmap\":null,\"pbyte\":null},\"pshort\":32767,\"pdouble\":1.7976931348623157E308,\"pclass\":\"java.lang.Object\",\"pstring\":\"json\",\"pint\":2147483647,\"plist\":[\"a\",\"b\"],\"pfunction\":function(){ this; },\"pmap\":null,\"pbyte\":127,\"class\":\"java.lang.Object\",\"pexcluded\":\"\"}";
return "{\"parray\":[1,2],\"plong\":9223372036854775807,\"pchar\":\"J\",\"pboolean\":true,\"pfloat\":3.4028234663852886E38,\"pbean\":{\"parray\":null,\"plong\":null,\"pchar\":null,\"pboolean\":null,\"pfloat\":null,\"pbean\":null,\"pshort\":null,\"pdouble\":null,\"pclass\":null,\"pstring\":null,\"pint\":null,\"plist\":null,\"pfunction\":null,\"pmap\":null,\"pbyte\":null},\"pshort\":32767,\"pdouble\":1.7976931348623157E308,\"pclass\":\"java.lang.Object\",\"pstring\":\"json\",\"pint\":2147483647,\"plist\":[\"a\",\"b\"],\"pfunction\":function(){ this; },\"pmap\":null,\"pbyte\":127,\"pexcluded\":\"\"}";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public TestJSONObjectStaticBuilders_JSONTokener( String name ) {

protected Object getSource() {
return new JSONTokener(
"{\"parray\":[1,2],\"plong\":9223372036854775807,\"pchar\":\"J\",\"pboolean\":true,\"pfloat\":3.4028234663852886E38,\"pbean\":{\"parray\":null,\"plong\":null,\"pchar\":null,\"pboolean\":null,\"pfloat\":null,\"pbean\":null,\"pshort\":null,\"pdouble\":null,\"pclass\":null,\"pstring\":null,\"pint\":null,\"plist\":null,\"pfunction\":null,\"pmap\":null,\"pbyte\":null},\"pshort\":32767,\"pdouble\":1.7976931348623157E308,\"pclass\":\"java.lang.Object\",\"pstring\":\"json\",\"pint\":2147483647,\"plist\":[\"a\",\"b\"],\"pfunction\":function(){ this; },\"pmap\":null,\"pbyte\":127,\"class\":\"java.lang.Object\",\"pexcluded\":\"\"}" );
"{\"parray\":[1,2],\"plong\":9223372036854775807,\"pchar\":\"J\",\"pboolean\":true,\"pfloat\":3.4028234663852886E38,\"pbean\":{\"parray\":null,\"plong\":null,\"pchar\":null,\"pboolean\":null,\"pfloat\":null,\"pbean\":null,\"pshort\":null,\"pdouble\":null,\"pclass\":null,\"pstring\":null,\"pint\":null,\"plist\":null,\"pfunction\":null,\"pmap\":null,\"pbyte\":null},\"pshort\":32767,\"pdouble\":1.7976931348623157E308,\"pclass\":\"java.lang.Object\",\"pstring\":\"json\",\"pint\":2147483647,\"plist\":[\"a\",\"b\"],\"pfunction\":function(){ this; },\"pmap\":null,\"pbyte\":127,\"pexcluded\":\"\"}" );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ protected Object getSource() {
for( int i = 0; i < props.length; i++ ){
map.put( props[i], PropertyConstants.getPropertyValue( props[i] ) );
}
map.put( "class", "" );
map.put( "pexcluded", "" );
return map;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public TestJSONObjectStaticBuilders_String( String name ) {
}

protected Object getSource() {
return "{\"parray\":[1,2],\"plong\":9223372036854775807,\"pchar\":\"J\",\"pboolean\":true,\"pfloat\":3.4028234663852886E38,\"pbean\":{\"parray\":null,\"plong\":null,\"pchar\":null,\"pboolean\":null,\"pfloat\":null,\"pbean\":null,\"pshort\":null,\"pdouble\":null,\"pclass\":null,\"pstring\":null,\"pint\":null,\"plist\":null,\"pfunction\":null,\"pmap\":null,\"pbyte\":null},\"pshort\":32767,\"pdouble\":1.7976931348623157E308,\"pclass\":\"java.lang.Object\",\"pstring\":\"json\",\"pint\":2147483647,\"plist\":[\"a\",\"b\"],\"pfunction\":function(){ this; },\"pmap\":null,\"pbyte\":127,\"class\":\"java.lang.Object\",\"pexcluded\":\"\"}";
return "{\"parray\":[1,2],\"plong\":9223372036854775807,\"pchar\":\"J\",\"pboolean\":true,\"pfloat\":3.4028234663852886E38,\"pbean\":{\"parray\":null,\"plong\":null,\"pchar\":null,\"pboolean\":null,\"pfloat\":null,\"pbean\":null,\"pshort\":null,\"pdouble\":null,\"pclass\":null,\"pstring\":null,\"pint\":null,\"plist\":null,\"pfunction\":null,\"pmap\":null,\"pbyte\":null},\"pshort\":32767,\"pdouble\":1.7976931348623157E308,\"pclass\":\"java.lang.Object\",\"pstring\":\"json\",\"pint\":2147483647,\"plist\":[\"a\",\"b\"],\"pfunction\":function(){ this; },\"pmap\":null,\"pbyte\":127,\"pexcluded\":\"\"}";
}
}

0 comments on commit b132b1c

Please sign in to comment.