Skip to content
Merged
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
18 changes: 0 additions & 18 deletions src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1896,24 +1896,6 @@ public ObjectMapper setDefaultPropertyInclusion(JsonInclude.Value incl) {
return this;
}

/**
* Method for setting default alternative radix that applies to integral types for serialization
* and deserialization of such types as strings.
* This configuration override is applied for all integral properties for which there are no per-type
* or per-property overrides (via annotations or config overrides).
*<p>
* NOTE: in Jackson 3.x all configuration goes through {@code ObjectMapper} builders,
* see {@link com.fasterxml.jackson.databind.cfg.MapperBuilder},
* and this method will be removed from 3.0.
*
* @since 2.21
*/
public ObjectMapper setDefaultFormat(String radix) {
_configOverrides.setDefaultRadix(radix);
return this;
}


/**
* Short-cut for:
*<pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public BaseSettings(ClassIntrospector ci, AnnotationIntrospector ai,
_defaultBase64 = defaultBase64;
_typeValidator = ptv;
_accessorNaming = accNaming;
_cacheProvider = cacheProvider;;
_cacheProvider = cacheProvider;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class ConfigOverrides
implements java.io.Serializable
{
private static final long serialVersionUID = 1L;
private static final String DEFAULT_RADIX = "10";

/**
* Per-type override definitions
Expand Down Expand Up @@ -56,14 +55,6 @@ public class ConfigOverrides
*/
protected Boolean _defaultLeniency;

/**
* Global default radix to apply to an integral type outputted as string. This has the lowest precedence out of all
* other methods of enforcing an alternative radix.
*
* @since 2.21
*/
protected String _defaultRadix;//TODO(Davyd Fridman): Change from string to int once JsonFormat has an actual radix field

/*
/**********************************************************************
/* Life cycle
Expand All @@ -76,32 +67,13 @@ public ConfigOverrides() {
JsonInclude.Value.empty(),
JsonSetter.Value.empty(),
VisibilityChecker.Std.defaultInstance(),
null, null, DEFAULT_RADIX
null, null
);
}

/**
* @since 2.21
*/
protected ConfigOverrides(Map<Class<?>, MutableConfigOverride> overrides,
JsonInclude.Value defIncl, JsonSetter.Value defSetter,
VisibilityChecker<?> defVisibility, Boolean defMergeable, Boolean defLeniency,
String defRadix)
{
_overrides = overrides;
_defaultInclusion = defIncl;
_defaultSetterInfo = defSetter;
_visibilityChecker = defVisibility;
_defaultMergeable = defMergeable;
_defaultLeniency = defLeniency;
_defaultRadix = defRadix;
}

/**
* @since 2.10
* @deprecated since 2.21
*/
@Deprecated
protected ConfigOverrides(Map<Class<?>, MutableConfigOverride> overrides,
JsonInclude.Value defIncl, JsonSetter.Value defSetter,
VisibilityChecker<?> defVisibility, Boolean defMergeable, Boolean defLeniency)
Expand Down Expand Up @@ -225,13 +197,6 @@ public VisibilityChecker<?> getDefaultVisibility() {
return _visibilityChecker;
}

/**
* @since 2.21
*/
public String getDefaultRadix() {
return _defaultRadix;
}

/**
* @since 2.9
*/
Expand Down Expand Up @@ -267,13 +232,6 @@ public void setDefaultVisibility(VisibilityChecker<?> v) {
_visibilityChecker = v;
}

/**
* @since 2.21
*/
public void setDefaultRadix(String v) {
this._defaultRadix = v;
}

/*
/**********************************************************************
/* Helper methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.util.function.Consumer;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
Expand Down Expand Up @@ -748,20 +747,6 @@ public B defaultPropertyInclusion(JsonInclude.Value incl) {
return _this();
}

/**
* Method for configured default radix to use for serialization/deserialization of integral types as strings.
*
* @param radix Default radix to use on integral properties
*
* @return This builder instance to allow call chaining
*
* @since 2.11
*/
public B defaultFormat(String radix) {
_mapper.setDefaultFormat(radix);
return _this();
}

/*
/**********************************************************************
/* Configuring Mix-ins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,14 +507,6 @@ public JsonInclude.Value getDefaultInclusion(Class<?> baseType,
return result;
}

/**
* Accessor for default radix to apply to integral types when serializing them as string.
* The radix obtained from this accessor should have the lowest precedence.
*
* @since 2.21
*/
public abstract String getDefaultRadix();

/**
* Accessor for default format settings to use for serialization (and, to a degree
* deserialization), considering baseline settings and per-type defaults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -777,11 +777,6 @@ public final JsonInclude.Value getDefaultInclusion(Class<?> baseType,
return def.withOverrides(v);
}

@Override
public String getDefaultRadix() {
return _configOverrides.getDefaultRadix();
}

@Override
public final JsonFormat.Value getDefaultPropertyFormat(Class<?> type) {
return _configOverrides.findFormatDefaults(type);
Expand Down

This file was deleted.

Loading