Skip to content

Commit

Permalink
Prep for Ion builder fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 15, 2024
1 parent 9ea3d74 commit 294051d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public Builder configure(IonGenerator.Feature feature, boolean state) {

/*
/**********************************************************************
/* Life-cycle
/* Life-cycle, constructors
/**********************************************************************
*/

Expand Down Expand Up @@ -135,6 +135,12 @@ protected IonObjectMapper(IonObjectMapper src) {
super(src);
}

/*
/**********************************************************************
/* Life-cycle, builders
/**********************************************************************
*/

/**
* A builder for a mapper that will use textual writers by default. Same as
* {@link #builderForTextualWriters()}.
Expand Down Expand Up @@ -189,6 +195,12 @@ public static Builder builder(IonFactory streamFactory) {
return new Builder(new IonObjectMapper(streamFactory));
}

/*
/**********************************************************************
/* Life-cycle, other
/**********************************************************************
*/

@Override
public ObjectMapper copy() {
_checkInvalidCopy(IonObjectMapper.class);
Expand All @@ -204,7 +216,7 @@ public Version version() {
return PackageVersion.VERSION;
}

/*
/*
/**********************************************************************
/* Configuration
/**********************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public class IonValueMapper extends IonObjectMapper
{
private static final long serialVersionUID = 1L;

/*
/**********************************************************************
/* Life-cycle, constructors
/**********************************************************************
*/

/**
* Constructor which provides a mapper with a null {@link PropertyNamingStrategy}.
*
Expand Down Expand Up @@ -66,11 +72,31 @@ public IonValueMapper(IonSystem ionSystem, PropertyNamingStrategy strategy) {
this.setPropertyNamingStrategy(strategy);
}

/*
/**********************************************************************
/* Life-cycle, builders
/**********************************************************************
*/

// TODO: add overrides

/*
/**********************************************************************
/* Life-cycle, other
/**********************************************************************
*/

@Override // @since 2.18
public ObjectMapper copy() {
_checkInvalidCopy(IonValueMapper.class);
return new IonValueMapper(this);
}

/*
/**********************************************************************
/* Extended API
/**********************************************************************
*/

public <T> T parse(IonValue value, Class<T> clazz) throws IOException {
if (value == null) {
Expand Down

0 comments on commit 294051d

Please sign in to comment.