コード例 #1
0
ファイル: RuleKey.java プロジェクト: Nouhi/buck
 private Builder setVal(@Nullable RuleKey ruleKey) {
   if (ruleKey != null) {
     if (logElms != null) {
       logElms.add(
           String.format(
               "%sruleKey(sha1=%s):",
               ruleKey.isIdempotent() ? "" : "non-idempotent ", ruleKey.toString()));
     }
     feed(ruleKey.toString().getBytes()).mergeIdempotence(ruleKey.isIdempotent());
   }
   return separate();
 }
コード例 #2
0
ファイル: RuleKey.java プロジェクト: Nouhi/buck
 public RuleKey build() {
   RuleKey ruleKey = idempotent ? new RuleKey(hasher.hash()) : new RuleKey(null);
   if (logElms != null) {
     logger.info(
         String.format(
             "%sRuleKey %s=%s",
             ruleKey.isIdempotent() ? "" : "non-idempotent ",
             ruleKey.toString(),
             Joiner.on("").join(logElms)));
   }
   return ruleKey;
 }
コード例 #3
0
ファイル: RuleKeyTest.java プロジェクト: JoeHorn/buck
 @Test
 public void testRuleKeyFromHashString() {
   RuleKey ruleKey = new RuleKey("19d2558a6bd3a34fb3f95412de9da27ed32fe208");
   assertEquals("19d2558a6bd3a34fb3f95412de9da27ed32fe208", ruleKey.toString());
 }