Skip to content

Commit

Permalink
TEZ-4387: reformat code before touching it
Browse files Browse the repository at this point in the history
  • Loading branch information
LA-Toth authored and abstractdog committed Dec 23, 2024
1 parent 9efa6f1 commit e2f1baf
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 322 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -31,14 +31,8 @@
import org.apache.tez.tools.javadoc.util.HtmlWriter;
import org.apache.tez.tools.javadoc.util.XmlWriter;

import com.sun.javadoc.AnnotationDesc;
import com.sun.javadoc.AnnotationDesc.ElementValuePair;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.DocErrorReporter;
import com.sun.javadoc.FieldDoc;
import com.sun.javadoc.LanguageVersion;
import com.sun.javadoc.RootDoc;
import com.sun.tools.doclets.standard.Standard;
import java.io.IOException;
import java.util.Map;

public final class ConfigStandardDoclet {

Expand Down Expand Up @@ -194,40 +188,34 @@ private static void processDoc(ClassDoc doc) {
}
}
}
}

configProperty.description = field.commentText();

}
HtmlWriter writer = new HtmlWriter();
try {
writer.write(config);
} catch (IOException e) {
throw new RuntimeException(e);
}

HtmlWriter writer = new HtmlWriter();
try {
writer.write(config);
} catch (IOException e) {
throw new RuntimeException(e);
}
XmlWriter xmlWriter = new XmlWriter();
try {
xmlWriter.write(config);
} catch (IOException e) {
throw new RuntimeException(e);
}
}

XmlWriter xmlWriter = new XmlWriter();
try {
xmlWriter.write(config);
} catch (IOException e) {
throw new RuntimeException(e);
}
private static String stripQuotes (String s){
if (s.charAt(0) == '"' && s.charAt(s.length() - 1) == '"') {
return s.substring(1, s.length() - 1);
}
return s;
}

}
public static int optionLength (String option){
return Standard.optionLength(option);
}

private static String stripQuotes(String s) {
if (s.charAt(0) == '"' && s.charAt(s.length()-1) == '"') {
return s.substring(1, s.length()-1);
public static boolean validOptions (String options[][],DocErrorReporter reporter){
return true;
}
}
return s;
}

public static int optionLength(String option) {
return Standard.optionLength(option);
}

public static boolean validOptions(String options[][], DocErrorReporter reporter) {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@

public class Config {

public final String templateName;
public final String configName;
public Map<String, ConfigProperty> configProperties;
public final String templateName;
public final String configName;
public Map<String, ConfigProperty> configProperties;

public Config(String configName, String templateName) {
this.configName = configName;
this.templateName = templateName;
this.configProperties = new TreeMap<String, ConfigProperty>();
}

public Config() {
this(null, null);
}
public Config(String configName, String templateName) {
this.configName = configName;
this.templateName = templateName;
this.configProperties = new TreeMap<String, ConfigProperty>();
}

public Config() {
this(null, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,26 @@

public class ConfigProperty {

public String propertyName;
public String defaultValue;
public String description;
public String type = "string";
public boolean isPrivate = false;
public boolean isUnstable = false;
public boolean isEvolving = false;
public boolean isValidConfigProp = false;
public String[] validValues;
public String inferredType;
public String propertyName;
public String defaultValue;
public String description;
public String type = "string";
public boolean isPrivate = false;
public boolean isUnstable = false;
public boolean isEvolving = false;
public boolean isValidConfigProp = false;
public String[] validValues;
public String inferredType;

@Override
public String toString() {
return "name=" + propertyName
+ ", defaultValue=" + defaultValue
+ ", description=" + description
+ ", type=" + type
+ ", inferredType=" + inferredType
+ ", private=" + isPrivate
+ ", validValues=" + (validValues == null ? "null" : validValues)
+ ", isConfigProp=" + isValidConfigProp;
}
@Override
public String toString() {
return "name=" + propertyName
+ ", defaultValue=" + defaultValue
+ ", description=" + description
+ ", type=" + type
+ ", inferredType=" + inferredType
+ ", private=" + isPrivate
+ ", validValues=" + (validValues == null ? "null" : validValues)
+ ", isConfigProp=" + isValidConfigProp;
}
}


Loading

0 comments on commit e2f1baf

Please sign in to comment.