• R/O
  • HTTP
  • SSH
  • HTTPS

stigmata-core: Commit

Stigmataのメインプログラムのためのリポジトリ.


Commit MetaInfo

Revisiona879f8a991ae5e434886f50e057ea5818ec173f0 (tree)
Time2014-11-27 20:49:09
AuthorHaruaki Tamada <tamada@cc.k...>
CommiterHaruaki Tamada

Log Message

update

Change Summary

Incremental Difference

--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,6 @@
1313
1414 <groupId>jp.sourceforge.stigmata</groupId>
1515 <artifactId>stigmata-core</artifactId>
16- <version>4.0</version>
1716 <packaging>jar</packaging>
1817
1918 <name>Stigmata: Java Birthmark Toolkit Core Library</name>
--- a/src/main/java/jp/sourceforge/stigmata/Main.java
+++ b/src/main/java/jp/sourceforge/stigmata/Main.java
@@ -5,7 +5,6 @@ import java.io.IOException;
55 import java.net.MalformedURLException;
66 import java.net.URL;
77 import java.util.ArrayList;
8-import java.util.Iterator;
98 import java.util.List;
109
1110 import jp.sourceforge.stigmata.command.HelpCommand;
@@ -54,7 +53,6 @@ public final class Main{
5453
5554 BirthmarkContext context = stigmata.createContext();
5655 updateContext(context, commandLine);
57- BirthmarkEnvironment env = context.getEnvironment();
5856
5957 StigmataCommandFactory factory = StigmataCommandFactory.getInstance();
6058 factory.registerCommand(new HelpCommand(options));
--- a/src/main/java/jp/sourceforge/stigmata/filter/BirthmarkElementCountComparisonPairFilter.java
+++ b/src/main/java/jp/sourceforge/stigmata/filter/BirthmarkElementCountComparisonPairFilter.java
@@ -168,6 +168,15 @@ public class BirthmarkElementCountComparisonPairFilter extends AbstractCompariso
168168 case LESS_THAN: sb.append(" < "); break;
169169 case EQUALS_AS: sb.append(" == "); break;
170170 case NOT_EQUALS_AS: sb.append(" != "); break;
171+ // The followings are not used.
172+ case ENDS_WITH:
173+ case MATCH:
174+ case NOT_ENDS_WITH:
175+ case NOT_MATCH:
176+ case NOT_STARTS_WITH:
177+ case STARTS_WITH:
178+ default:
179+ break;
171180 }
172181 sb.append(Integer.toString(getThreshold()));
173182
--- a/src/main/java/jp/sourceforge/stigmata/filter/SimilarityComparisonPairFilter.java
+++ b/src/main/java/jp/sourceforge/stigmata/filter/SimilarityComparisonPairFilter.java
@@ -91,6 +91,15 @@ public class SimilarityComparisonPairFilter extends AbstractComparisonPairFilter
9191 case LESS_THAN: sb.append(" < "); break;
9292 case EQUALS_AS: sb.append(" == "); break;
9393 case NOT_EQUALS_AS: sb.append(" != "); break;
94+ // The followings are not used.
95+ case ENDS_WITH:
96+ case MATCH:
97+ case NOT_ENDS_WITH:
98+ case NOT_MATCH:
99+ case NOT_STARTS_WITH:
100+ case STARTS_WITH:
101+ default:
102+ break;
94103 }
95104 sb.append(getThreshold());
96105 return new String(sb);
--- a/src/main/java/jp/sourceforge/stigmata/filter/TargetNameComparisonPairFilter.java
+++ b/src/main/java/jp/sourceforge/stigmata/filter/TargetNameComparisonPairFilter.java
@@ -153,12 +153,20 @@ public class TargetNameComparisonPairFilter extends AbstractComparisonPairFilter
153153 case ONE_OF_TARGETS: sb.append("(target1|target2).name"); break;
154154 }
155155 switch(getCriterion()){
156- case STARTS_WITH: sb.append(" starts with "); break;
157- case NOT_STARTS_WITH: sb.append(" not starts with "); break;
158- case ENDS_WITH: sb.append(" ends with "); break;
159- case NOT_ENDS_WITH: sb.append(" not ends with "); break;
160- case EQUALS_AS: sb.append(" equals as "); break;
161- case NOT_EQUALS_AS: sb.append(" not equals as "); break;
156+ case STARTS_WITH: sb.append(" starts with "); break;
157+ case NOT_STARTS_WITH: sb.append(" not starts with "); break;
158+ case ENDS_WITH: sb.append(" ends with "); break;
159+ case NOT_ENDS_WITH: sb.append(" not ends with "); break;
160+ case EQUALS_AS: sb.append(" equals as "); break;
161+ case NOT_EQUALS_AS: sb.append(" not equals as "); break;
162+ case GREATER_EQUALS: sb.append(" greater equals than"); break;
163+ case GREATER_THAN: sb.append(" greater than "); break;
164+ case LESS_EQUALS: sb.append(" less equals than "); break;
165+ case LESS_THAN: sb.append(" less than "); break;
166+ case MATCH: sb.append(" match "); break;
167+ case NOT_MATCH: sb.append(" not match "); break;
168+ default:
169+ break;
162170 }
163171 sb.append(getValue());
164172
--- a/src/main/java/jp/sourceforge/stigmata/filter/TotalElementCountComparisonPairFilter.java
+++ b/src/main/java/jp/sourceforge/stigmata/filter/TotalElementCountComparisonPairFilter.java
@@ -156,6 +156,15 @@ public class TotalElementCountComparisonPairFilter extends AbstractComparisonPai
156156 case LESS_THAN: sb.append(" < "); break;
157157 case EQUALS_AS: sb.append(" == "); break;
158158 case NOT_EQUALS_AS: sb.append(" != "); break;
159+ // The followings are not used.
160+ case ENDS_WITH:
161+ case MATCH:
162+ case NOT_ENDS_WITH:
163+ case NOT_MATCH:
164+ case NOT_STARTS_WITH:
165+ case STARTS_WITH:
166+ default:
167+ break;
159168 }
160169 sb.append(Integer.toString(getThreshold()));
161170
--- a/src/main/java/jp/sourceforge/stigmata/result/history/ExtractedBirthmarkServiceManager.java
+++ b/src/main/java/jp/sourceforge/stigmata/result/history/ExtractedBirthmarkServiceManager.java
@@ -110,13 +110,21 @@ public class ExtractedBirthmarkServiceManager{
110110 private void addValuesFromSystemFile(Set<String> values){
111111 File file = new File(BirthmarkEnvironment.getStigmataHome(), "storelocations.txt");
112112 if(file.exists()){
113+ BufferedReader in = null;
113114 try{
114- BufferedReader in = new BufferedReader(new FileReader(file));
115+ in = new BufferedReader(new FileReader(file));
115116 String line;
116117 while((line = in.readLine()) != null){
117118 values.add(line);
118119 }
119120 } catch(IOException e){
121+ } finally{
122+ if(in != null){
123+ try{
124+ in.close();
125+ } catch(IOException e){
126+ }
127+ }
120128 }
121129 }
122130 }
Show on old repository browser