Skip to content

Commit

Permalink
Fixing build.
Browse files Browse the repository at this point in the history
  • Loading branch information
onukristo committed Mar 22, 2024
1 parent f7c018a commit 4a9eabc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion build.common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ apply plugin: "java-library"
apply plugin: "checkstyle"
apply plugin: "idea"
apply plugin: "com.github.spotbugs"
apply plugin: "groovy"

apply from: "$rootProject.rootDir/build.libraries.gradle"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import com.wise.common.environment.WiseEnvironmentProperties.SubType;
import com.wise.common.environment.WiseEnvironmentProperties.Type;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public class DefaultWiseEnvironment implements WiseEnvironment {

private final Type type;
private final SubType subType;

@SuppressFBWarnings("CT")
public DefaultWiseEnvironment(WiseEnvironmentProperties wiseEnvironmentProperties) {
var type = wiseEnvironmentProperties.getType();
if (type == null) {
Expand All @@ -23,6 +25,10 @@ public DefaultWiseEnvironment(WiseEnvironmentProperties wiseEnvironmentPropertie
this.subType = wiseEnvironmentProperties.getSubType();
}

public void init(){

}

@Override
public boolean isProduction() {
return Type.PRODUCTION == type;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package com.wise.common.environment;

import java.util.Map;
import java.util.Properties;
import org.springframework.core.env.MapPropertySource;
import org.springframework.lang.Nullable;

public class WiseDefaultsPropertiesPropertySource extends MapPropertySource {

@SuppressWarnings({"rawtypes", "unchecked"})
public WiseDefaultsPropertiesPropertySource(String name, Properties source) {
super(name, (Map) source);
}

protected WiseDefaultsPropertiesPropertySource(String name, Map<String, Object> source) {
super(name, source);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public boolean containsProperty(String name) {
public Object getProperty(String name) {
String actualName = resolvePropertyName(name);
if (logger.isDebugEnabled() && !name.equals(actualName)) {
logger.debug("PropertySource '" + getName() + "' does not contain property '" + name +
"', but found equivalent '" + actualName + "'");
logger.debug("PropertySource '" + getName() + "' does not contain property '" + name
+ "', but found equivalent '" + actualName + "'");
}
return super.getProperty(actualName);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.wise.common.environment;

public interface WiseEnvironment {

boolean isProduction();

boolean isStaging();
Expand Down

0 comments on commit 4a9eabc

Please sign in to comment.